mfd: select REGMAP_I2C for config MFD_MAX77693
PATCH 1/2 mfd: select REGMAP_I2C for config MFD_MAX77693
max77693 driver uses regmap api, thus need to select REGMAP_I2C. This fixes below build error when CONFIG_REGMAP=y && CONFIG_REGMAP_I2C=m:
LD init/built-in.odrivers/built-in.o: In function `max77693_i2c_probe':
clk-fixed-factor.c:(.text+0x541f8): undefined reference to `devm_regmap_init_i2c'
make: *** [vmlinux] Error 1
--- drivers/mfd/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/mfd/Kconfig +1 -0
@@ -426,6 +426,7 @@ config MFD_MAX77693 bool "Maxim Semiconductor MAX77693 PMIC Support" depends on I2C=y && GENERIC_HARDIRQS select MFD_CORE + select REGMAP_I2C help Say yes here to support for Maxim Semiconductor MAX77693. This is a companion Power Management IC with Flash, Haptic, Charger,
Signature · 1 line
1.7.5.4
PATCH 2/2 mfd: max77693: Remove unused iolock mutex
Now this driver is using regmap APIs, the iolock mutex is not used and can be removed.
--- drivers/mfd/max77693.c | 2 -- include/linux/mfd/max77693-private.h | 1 - 2 files changed, 0 insertions(+), 3 deletions(-)
drivers/mfd/max77693.c +0 -2
@@ -138,8 +138,6 @@ static int max77693_i2c_probe(struct i2c_client *i2c, max77693->wakeup = pdata->wakeup; -mutex_init (&max77693->iolock); -if (max77693_read_reg (max77693->regmap,MAX77693_PMIC_REG_PMIC_ID2 , ®_data) <0 ) {dev_err (max77693->dev,"device not found on this channel\n" );
include/linux/mfd/max77693-private.h +0 -1
@@ -190,7 +190,6 @@ struct max77693_dev {struct i2c_client *i2c;/* 0xCC , PMIC, Charger, Flash LED */ struct i2c_client *muic;/* 0x4A , MUIC */ struct i2c_client *haptic;/* 0x90 , Haptic */ -struct mutex iolock;int type;
Signature · 1 line
1.7.5.4
Re: [PATCH 2/2] mfd: max77693: Remove unused iolock mutex
Hi Axel,
Quoted 8 lines · Axel Lin
Now this driver is using regmap APIs, the iolock mutex is not used and can be removed.
Signed-off-by Axel Lin <[email protected]>--- drivers/mfd/max77693.c | 2 -- include/linux/mfd/max77693-private.h | 1 - 2 files changed, 0 insertions(+), 3 deletions(-)
Patch applied, thanks.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Chanwoo Choi
maintainerHi Axel Lin,
Quoted 18 lines · Axel Lin
max77693 driver uses regmap api, thus need to select
REGMAP_I2C. This fixes below build error whenCONFIG_REGMAP=y&&CONFIG_REGMAP_I2C=m:LD
init/built-in.odrivers/built-in.o: In function `max77693_i2c_probe':
clk-fixed-factor.c:(.text+0x541f8): undefined reference to `devm_regmap_init_i2c'
make: *** [vmlinux] Error 1Signed-off-by Axel Lin <[email protected]>--- drivers/mfd/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/mfd/Kconfig +0
-0
drivers/mfd/Kconfig config MFD_MAX77693 · line 432
Quoted 7 lines
drivers/mfd/Kconfig +1
-0@@ -426,6 +426,7 @@ config MFD_MAX77693 bool "Maxim Semiconductor MAX77693 PMIC Support" depends on I2C=y && GENERIC_HARDIRQS select MFD_CORE + select REGMAP_I2C help Say yes here to support for Maxim Semiconductor MAX77693. This is a companion Power Management IC with Flash, Haptic, Charger,
I sent this patch yesterday due to same issue and it was applied to mfd-2.6.git
by Samuel Ortiz. You can check it on below URL.
http://www.spinics.net/lists/kernel/msg1346801.html
Thank you,
Chanwoo Choi