]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
gpio: 74x164: Remove non-DT support
authorAlexander Shiyan <shc_work@mail.ru>
Sat, 7 Dec 2013 10:08:22 +0000 (14:08 +0400)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 12 Dec 2013 13:27:57 +0000 (14:27 +0100)
Commit 20bc4d5d565159eb2b942bf4b7fae86fba94e32c
(gpio: 74x164: Add support for the daisy-chaining) introduce check
for DT for the driver, so driver cannot be used without DT.
There are no in-tree users of this driver, so remove non-DT support
completely.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/Kconfig
drivers/gpio/gpio-74x164.c
include/linux/spi/74x164.h [deleted file]

index ae3682d25a3c1d0303e895a2808c686a140e48b0..4127f68412eb60463a71130be835577e3c0d354d 100644 (file)
@@ -714,10 +714,10 @@ config GPIO_MC33880
 
 config GPIO_74X164
        tristate "74x164 serial-in/parallel-out 8-bits shift register"
-       depends on SPI_MASTER
+       depends on SPI_MASTER && OF
        help
-         Platform driver for 74x164 compatible serial-in/parallel-out
-         8-outputs shift registers. This driver can be used to provide access
+         Driver for 74x164 compatible serial-in/parallel-out 8-outputs
+         shift registers. This driver can be used to provide access
          to more gpio outputs.
 
 comment "AC97 GPIO expanders:"
index ddb831232407b8315cf73d030e60bec6f23e6ac9..4d4e15ca67e08dd44fdc87a6980eaf94f620fca5 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/init.h>
 #include <linux/mutex.h>
 #include <linux/spi/spi.h>
-#include <linux/spi/74x164.h>
 #include <linux/gpio.h>
 #include <linux/of_gpio.h>
 #include <linux/slab.h>
@@ -108,14 +107,8 @@ static int gen_74x164_direction_output(struct gpio_chip *gc,
 static int gen_74x164_probe(struct spi_device *spi)
 {
        struct gen_74x164_chip *chip;
-       struct gen_74x164_chip_platform_data *pdata;
        int ret;
 
-       if (!spi->dev.of_node) {
-               dev_err(&spi->dev, "No device tree data available.\n");
-               return -EINVAL;
-       }
-
        /*
         * bits_per_word cannot be configured in platform data
         */
@@ -129,12 +122,6 @@ static int gen_74x164_probe(struct spi_device *spi)
        if (!chip)
                return -ENOMEM;
 
-       pdata = dev_get_platdata(&spi->dev);
-       if (pdata && pdata->base)
-               chip->gpio_chip.base = pdata->base;
-       else
-               chip->gpio_chip.base = -1;
-
        mutex_init(&chip->lock);
 
        spi_set_drvdata(spi, chip);
@@ -145,6 +132,7 @@ static int gen_74x164_probe(struct spi_device *spi)
        chip->gpio_chip.direction_output = gen_74x164_direction_output;
        chip->gpio_chip.get = gen_74x164_get_value;
        chip->gpio_chip.set = gen_74x164_set_value;
+       chip->gpio_chip.base = -1;
 
        if (of_property_read_u32(spi->dev.of_node, "registers-number", &chip->registers)) {
                dev_err(&spi->dev, "Missing registers-number property in the DT.\n");
diff --git a/include/linux/spi/74x164.h b/include/linux/spi/74x164.h
deleted file mode 100644 (file)
index 0aa6acc..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef LINUX_SPI_74X164_H
-#define LINUX_SPI_74X164_H
-
-struct gen_74x164_chip_platform_data {
-       /* number assigned to the first GPIO */
-       unsigned        base;
-};
-
-#endif