]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mtd: nand: gpio: Convert to use GPIO descriptors
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 24 Sep 2017 17:39:12 +0000 (19:39 +0200)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Sat, 7 Oct 2017 09:27:48 +0000 (11:27 +0200)
commitf3d0d8d938b4d71be1f7fb003ca2ac9250b3be4d
tree7659e78e461701800520f9de90604572b44a7a3f
parente8901f3ab5b5c2ce75abdcd182b07d00fd6746fe
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>
arch/arm/mach-pxa/cm-x255.c
drivers/mtd/nand/gpio.c
include/linux/mtd/nand-gpio.h