mtd: rawnand: ams-delta: Request data port GPIO resource
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>
Wed, 21 Nov 2018 11:08:04 +0000 (12:08 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 7 Dec 2018 09:38:27 +0000 (10:38 +0100)
commit9773861304f15bec54b55ff1b6e6e6a7f99ebe5b
treedaf164b71f652ac839e1882a823464a68fd1e217
parent02e1ca60f4c36c0f9635f79e172b72d811b8a627
mtd: rawnand: ams-delta: Request data port GPIO resource

Data port used by the driver is actually an OMAP MPUIO device, already
under control of gpio-omap driver.  For that reason we used to not
request the memory region of the port as that would fail because the
region is already busy.  Despite that, we are still accessing the port
by just ioremapping it and performing read/write operations.  Moreover,
we are doing that without any proteciton from other users legally
manipulating the port pins over GPIO API.

The plan is to convert the driver to access the port over GPIO consumer
API.  Before that happens, already prevent from other users accessing
the port pins by requesting an array of its GPIO descriptors.

Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/ams-delta.c