]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mfd: tc3589x: Enforce device-tree only mode
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 19 Mar 2015 14:52:45 +0000 (15:52 +0100)
committerLee Jones <lee.jones@linaro.org>
Thu, 26 Mar 2015 14:20:17 +0000 (14:20 +0000)
All systems using the TC3589x multifunction expander uses
devicetree, so don't clutter the place with a lot of
and assume it is there.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/gpio/Kconfig
drivers/gpio/gpio-tc3589x.c
drivers/input/keyboard/tc3589x-keypad.c
drivers/mfd/Kconfig
drivers/mfd/tc3589x.c

index c1e2ca3d9a51b15763739f0d9783ab06abab0260..dc1aaa83a3474c3299895487ef7f82fca36cf250 100644 (file)
@@ -669,6 +669,7 @@ config GPIO_STP_XWAY
 config GPIO_TC3589X
        bool "TC3589X GPIOs"
        depends on MFD_TC3589X
+       depends on OF_GPIO
        select GPIOLIB_IRQCHIP
        help
          This enables support for the GPIOs found on the TC3589X
index 11aed26710655073af1e3887a417572f80d27214..31b244cffabb2ff9f862e479061e8bcd7e140d7e 100644 (file)
@@ -260,10 +260,7 @@ static int tc3589x_gpio_probe(struct platform_device *pdev)
        tc3589x_gpio->chip.ngpio = tc3589x->num_gpio;
        tc3589x_gpio->chip.dev = &pdev->dev;
        tc3589x_gpio->chip.base = -1;
-
-#ifdef CONFIG_OF_GPIO
        tc3589x_gpio->chip.of_node = np;
-#endif
 
        /* Bring the GPIO module out of reset */
        ret = tc3589x_set_bits(tc3589x, TC3589x_RSTCTRL,
index 8ff612d160b07ec61b7084d668f04468ee116b36..aa695a80ec32566d07ea06168e9aa980b13291b8 100644 (file)
@@ -296,7 +296,6 @@ static void tc3589x_keypad_close(struct input_dev *input)
        tc3589x_keypad_disable(keypad);
 }
 
-#ifdef CONFIG_OF
 static const struct tc3589x_keypad_platform_data *
 tc3589x_keypad_of_probe(struct device *dev)
 {
@@ -346,14 +345,6 @@ tc3589x_keypad_of_probe(struct device *dev)
 
        return plat;
 }
-#else
-static inline const struct tc3589x_keypad_platform_data *
-tc3589x_keypad_of_probe(struct device *dev)
-{
-       return ERR_PTR(-ENODEV);
-}
-#endif
-
 
 static int tc3589x_keypad_probe(struct platform_device *pdev)
 {
index 5e68fdef64e745b2bd33b76ac75e0fbd2049bb2a..ba097f7ce26f24feb092d2b547f03930b756da55 100644 (file)
@@ -1260,6 +1260,7 @@ config MFD_TIMBERDALE
 config MFD_TC3589X
        bool "Toshiba TC35892 and variants"
        depends on I2C=y
+       depends on OF
        select MFD_CORE
        help
          Support for the Toshiba TC35892 and variants I/O Expander.
index aacb3720065c5e1d924d0d007755671b993cf84b..cf356395c9e980ead324e17299dcc09a2db6b941 100644 (file)
@@ -318,7 +318,6 @@ static int tc3589x_device_init(struct tc3589x *tc3589x)
        return ret;
 }
 
-#ifdef CONFIG_OF
 static const struct of_device_id tc3589x_match[] = {
        /* Legacy compatible string */
        { .compatible = "tc3589x", .data = (void *) TC3589X_UNKNOWN },
@@ -359,14 +358,6 @@ tc3589x_of_probe(struct device *dev, enum tc3589x_version *version)
 
        return pdata;
 }
-#else
-static inline struct tc3589x_platform_data *
-tc3589x_of_probe(struct device *dev, enum tc3589x_version *version)
-{
-       dev_err(dev, "no device tree support\n");
-       return ERR_PTR(-ENODEV);
-}
-#endif
 
 static int tc3589x_probe(struct i2c_client *i2c,
                                   const struct i2c_device_id *id)