diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2017-09-24 13:39:12 -0400 |
|---|---|---|
| committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2017-10-07 05:27:48 -0400 |
| commit | f3d0d8d938b4d71be1f7fb003ca2ac9250b3be4d (patch) | |
| tree | 7659e78e461701800520f9de90604572b44a7a3f /include/linux/mtd | |
| parent | e8901f3ab5b5c2ce75abdcd182b07d00fd6746fe (diff) | |
mtd: nand: gpio: Convert to use GPIO descriptors
There is exactly one board in the kernel that defines platform data
for the GPIO NAND driver.
Use the feature to provide a lookup table for the GPIOs in the board
file so we can convert the driver as a whole to just use GPIO
descriptors.
After this we can cut the use of <linux/of_gpio.h> and use the GPIO
descriptor management from <linux/gpio/consumer.h> alone to grab and use
the GPIOs used in the driver.
I also created a local struct device *dev in the probe() function
because I was getting annoyed with all the &pdev->dev dereferencing.
Cc: arm@kernel.org
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Frans Klaver <fransklaver@gmail.com>
Cc: Gerhard Sittig <gsi@denx.de>
Cc: Jamie Iles <jamie.iles@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Jamie Iles <jamie.iles@oracle.com>
Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'include/linux/mtd')
| -rw-r--r-- | include/linux/mtd/nand-gpio.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/include/linux/mtd/nand-gpio.h b/include/linux/mtd/nand-gpio.h index be4f45d89be2..98f71908212d 100644 --- a/include/linux/mtd/nand-gpio.h +++ b/include/linux/mtd/nand-gpio.h | |||
| @@ -4,11 +4,6 @@ | |||
| 4 | #include <linux/mtd/rawnand.h> | 4 | #include <linux/mtd/rawnand.h> |
| 5 | 5 | ||
| 6 | struct gpio_nand_platdata { | 6 | struct gpio_nand_platdata { |
| 7 | int gpio_nce; | ||
| 8 | int gpio_nwp; | ||
| 9 | int gpio_cle; | ||
| 10 | int gpio_ale; | ||
| 11 | int gpio_rdy; | ||
| 12 | void (*adjust_parts)(struct gpio_nand_platdata *, size_t); | 7 | void (*adjust_parts)(struct gpio_nand_platdata *, size_t); |
| 13 | struct mtd_partition *parts; | 8 | struct mtd_partition *parts; |
| 14 | unsigned int num_parts; | 9 | unsigned int num_parts; |
