Skip to content

Commit

Permalink
mfd: tc3589x: enforce device-tree only mode
Browse files Browse the repository at this point in the history
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>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Linus Walleij authored and Dmitry Torokhov committed Apr 4, 2015
1 parent 8b6f53c commit 6112559
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 21 deletions.
1 change: 1 addition & 0 deletions drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions drivers/gpio/gpio-tc3589x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 0 additions & 9 deletions drivers/input/keyboard/tc3589x-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,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)
{
Expand Down Expand Up @@ -368,14 +367,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)
{
Expand Down
1 change: 1 addition & 0 deletions drivers/mfd/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1210,6 +1210,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.
Expand Down
9 changes: 0 additions & 9 deletions drivers/mfd/tc3589x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6112559

Please sign in to comment.