]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
staging: mt7621-gpio: make use 'bgpio_init' from GPIO_GENERIC
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Mon, 18 Jun 2018 09:36:03 +0000 (11:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jun 2018 12:50:57 +0000 (21:50 +0900)
commit8b9005072821bccbcb4a6456416dfa69e8e7dd7a
tree29b0127a2ceaaaacd8f4902d995e348d65ad4e7d
parent144e2643e2f57d29804cacb5403708cd22984b73
staging: mt7621-gpio: make use 'bgpio_init' from GPIO_GENERIC

Gpio complexity is just masking the fact that offset is always
0..n and writes to bits 0..n of some memory address. Because
of this whole thing can just me converted to use GPIO_GENERIC
and avoid duplications of a lot of driver custom functions.
So use bgpio_init instead of custom code adding GPIO_GENERIC
dependency to the Kconfig file. Also to make easier using
bgpio_init function offset for each gpio bank, enumeration
where register were defined has been replaced in favour of
some macros which handle each gpio offset taking into account
the bank where are located. Because of this change write and
read functions which are being used for remaining irq handling
stuff have been updated also as well as its dependencies along
the code.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-gpio/Kconfig
drivers/staging/mt7621-gpio/gpio-mt7621.c