mfd: Register tps65910 gpios as an mfd device
authorLaxman Dewangan <ldewangan@nvidia.com>
Fri, 11 May 2012 13:07:44 +0000 (15:07 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 20 May 2012 15:26:59 +0000 (17:26 +0200)
As gpio support for tps65910 is on gpio driver, registering
gpio support as the mfd sub devices instead of calling gpio_init()
from the core probe.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/Kconfig
drivers/mfd/tps65910.c
include/linux/mfd/tps65910.h

index 1e9a7d5ec9196f62fcc38536e4f79f0f8934c21b..b914483cd630cdb611910e02320d6713c10143af 100644 (file)
@@ -189,7 +189,6 @@ config MFD_TPS65910
        bool "TPS65910 Power Management chip"
        depends on I2C=y && GPIOLIB
        select MFD_CORE
-       select GPIO_TPS65910
        select REGMAP_I2C
        help
          if you say yes here you get support for the TPS65910 series of
index 22fa430706596cd6a51702a93a7a0e5af94ea039..553574da361117bcfbffacb75351f1b4ac8b9a8e 100644 (file)
 #include <linux/err.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
-#include <linux/gpio.h>
 #include <linux/mfd/core.h>
 #include <linux/regmap.h>
 #include <linux/mfd/tps65910.h>
 #include <linux/of_device.h>
 
 static struct mfd_cell tps65910s[] = {
+       {
+               .name = "tps65910-gpio",
+       },
        {
                .name = "tps65910-pmic",
        },
@@ -250,8 +252,6 @@ static __devinit int tps65910_i2c_probe(struct i2c_client *i2c,
        init_data->irq = pmic_plat_data->irq;
        init_data->irq_base = pmic_plat_data->irq_base;
 
-       tps65910_gpio_init(tps65910, pmic_plat_data->gpio_base);
-
        tps65910_irq_init(tps65910, init_data->irq, init_data);
 
        tps65910_sleepinit(tps65910, pmic_plat_data);
index 949f1da661d25722a3077485c5784750e243add1..c2673ee5e70f67ac6eea3842a3141beafba525e0 100644 (file)
@@ -830,9 +830,6 @@ struct tps65910 {
        struct tps65910_rtc *rtc;
        struct tps65910_power *power;
 
-       /* GPIO Handling */
-       struct gpio_chip gpio;
-
        /* IRQ Handling */
        struct mutex irq_lock;
        int chip_irq;
@@ -846,7 +843,6 @@ struct tps65910_platform_data {
        int irq_base;
 };
 
-void tps65910_gpio_init(struct tps65910 *tps65910, int gpio_base);
 int tps65910_irq_init(struct tps65910 *tps65910, int irq,
                struct tps65910_platform_data *pdata);
 int tps65910_irq_exit(struct tps65910 *tps65910);