* [PATCH v1] mfd: mc13xxx: add I2C support fix building for v3.3
@ 2012-03-27 11:04 Alex Gershgorin
2012-03-28 13:32 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Alex Gershgorin @ 2012-03-27 11:04 UTC (permalink / raw)
To: Samuel Ortiz
Cc: broonie, linux-kernel, marc.reilly, s.hauer, fabio.estevam,
Alex Gershgorin
This patch fixes the following compilation errors,
when using a series mc13xxx-add-I2C-support-V4
1)
drivers/mfd/mc13xxx-spi.c:50: error: unknown field 'pad_bits'
specified in initializer
It fixed in include/linux/regmap.h
2)
drivers/mfd/mc13xxx-core.c: In function 'mc13xxx_probe_flags_dt':
drivers/mfd/mc13xxx-core.c:619: error: request for member 'of_node'
in something not a structure or union
It fexed in drivers/mfd/mc13xxx-core.c
3)
drivers/built-in.o: In function `mc13xxx_common_cleanup':
clkdev.c:(.text+0x3ee10): undefined reference to `regmap_exit'
drivers/built-in.o: In function `mc13xxx_reg_rmw':
clkdev.c:(.text+0x3ef98): undefined reference to `regmap_update_bits'
drivers/built-in.o: In function `mc13xxx_reg_write':
clkdev.c:(.text+0x3efd4): undefined reference to `regmap_write'
drivers/built-in.o: In function `mc13xxx_reg_read':
clkdev.c:(.text+0x3f08c): undefined reference to `regmap_read'
drivers/built-in.o: In function `mc13xxx_spi_probe':
clkdev.c:(.text+0x3fa50): undefined reference to `regmap_init_spi'
drivers/built-in.o: In function `mc13xxx_i2c_probe':
clkdev.c:(.text+0x3fb90): undefined reference to `regmap_init_i2c'
make: *** [.tmp_vmlinux1] Error 1
It fixed in drivers/mfd/Kconfig by adding CONFIG_REGMAP_I2C/CONFIG_REGMAP_SPI
It was successfully tested on Linux v3.3
Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
---
drivers/mfd/Kconfig | 2 ++
drivers/mfd/mc13xxx-core.c | 2 +-
include/linux/regmap.h | 2 ++
3 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 9da32a2..74e00cf 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -576,6 +576,8 @@ config MFD_MC13XXX
depends on SPI_MASTER || I2C
select MFD_CORE
select MFD_MC13783
+ select REGMAP_I2C if I2C
+ select REGMAP_SPI if SPI_MASTER
help
Enable support for the Freescale MC13783 and MC13892 PMICs.
This driver provides common support for accessing the device,
diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
index 31dbf91..5a60273 100644
--- a/drivers/mfd/mc13xxx-core.c
+++ b/drivers/mfd/mc13xxx-core.c
@@ -616,7 +616,7 @@ static int mc13xxx_add_subdevice(struct mc13xxx *mc13xxx, const char *format)
#ifdef CONFIG_OF
static int mc13xxx_probe_flags_dt(struct mc13xxx *mc13xxx)
{
- struct device_node *np = mc13xxx->dev.of_node;
+ struct device_node *np = mc13xxx->dev->of_node;
if (!np)
return -ENODEV;
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index eb93921..8c6f5e9 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -45,6 +45,7 @@ struct reg_default {
*
* @reg_bits: Number of bits in a register address, mandatory.
* @val_bits: Number of bits in a register value, mandatory.
+ * @pad_bits: Number of bits in a register pad, mandatory.
*
* @writeable_reg: Optional callback returning true if the register
* can be written to.
@@ -75,6 +76,7 @@ struct reg_default {
struct regmap_config {
int reg_bits;
int val_bits;
+ int pad_bits;
bool (*writeable_reg)(struct device *dev, unsigned int reg);
bool (*readable_reg)(struct device *dev, unsigned int reg);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v1] mfd: mc13xxx: add I2C support fix building for v3.3
2012-03-27 11:04 [PATCH v1] mfd: mc13xxx: add I2C support fix building for v3.3 Alex Gershgorin
@ 2012-03-28 13:32 ` Mark Brown
2012-03-28 13:48 ` Alex Gershgorin
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2012-03-28 13:32 UTC (permalink / raw)
To: Alex Gershgorin
Cc: Samuel Ortiz, linux-kernel, marc.reilly, s.hauer, fabio.estevam
[-- Attachment #1: Type: text/plain, Size: 467 bytes --]
On Tue, Mar 27, 2012 at 01:04:20PM +0200, Alex Gershgorin wrote:
> This patch fixes the following compilation errors,
> when using a series mc13xxx-add-I2C-support-V4
> 1)
> drivers/mfd/mc13xxx-spi.c:50: error: unknown field 'pad_bits'
> specified in initializer
This (and probably some of the other stuff) is already merged. Is this
just a backport of stuff for 3.4/5 to enable testing on 3.3 or are there
any errors that need to be fixed in the relevant places?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH v1] mfd: mc13xxx: add I2C support fix building for v3.3
2012-03-28 13:32 ` Mark Brown
@ 2012-03-28 13:48 ` Alex Gershgorin
0 siblings, 0 replies; 3+ messages in thread
From: Alex Gershgorin @ 2012-03-28 13:48 UTC (permalink / raw)
To: Mark Brown
Cc: Samuel Ortiz, linux-kernel@vger.kernel.org, marc.reilly@gmail.com,
s.hauer@pengutronix.de, fabio.estevam@freescale.com
Hi Mark,
> This patch fixes the following compilation errors,
> when using a series mc13xxx-add-I2C-support-V4
> 1)
> drivers/mfd/mc13xxx-spi.c:50: error: unknown field 'pad_bits'
> specified in initializer
> >This (and probably some of the other stuff) is already merged. Is this
> > just a backport of stuff for 3.4/5 to enable testing on 3.3 or are there
> >any errors that need to be fixed in the relevant places?
Yes, you're right for v3.4 is not need.
I'll send a patch for v3.4
Regards
Alex Gershgorin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-28 13:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-27 11:04 [PATCH v1] mfd: mc13xxx: add I2C support fix building for v3.3 Alex Gershgorin
2012-03-28 13:32 ` Mark Brown
2012-03-28 13:48 ` Alex Gershgorin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.