Skip to contentSkip to conversation

mfd: select REGMAP_I2C for config MFD_MAX77693

PATCH In review Axel Lin 3 participants 4 messages May 24, 2012 – Jun 29, 2012

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

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.o
drivers/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
index 4db63b1..e129c82 100644
@@ -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
author
#1 lore raw

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
index e9e4278..4055bc2 100644
@@ -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, &reg_data) < 0) {
 		dev_err(max77693->dev, "device not found on this channel\n");
include/linux/mfd/max77693-private.h +0 -1
index 68263c5..1eeae5c 100644
@@ -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
#2 lore raw

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.

---
 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/
maintainer
#3 lore raw
In reply to Axel Lin

Hi Axel Lin,

Quoted 18 lines · Axel Lin

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.o
drivers/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 +0 -0
index 4db63b1..e129c82 100644

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