public inbox for linux-amlogic@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Meson8b: fix requesting GPIOs greater than GPIOZ_3
@ 2018-02-25 11:38 Martin Blumenstingl
  2018-02-25 11:38 ` [PATCH] Meson8b GPIO fix - WiP Martin Blumenstingl
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Martin Blumenstingl @ 2018-02-25 11:38 UTC (permalink / raw)
  To: linus-amlogic

GPIOs greater GPIOZ_3 (whose ID is 83 - as a reminder: this is exactly
the number of actual GPIO lines on Meson8b) could not be requested. Using
CARD_6 (ID 100, "base of the GPIO controller is 382) as an example:
$ echo 482 > /sys/class/gpio/export
export_store: invalid GPIO 482

This was discovered by Linus L?ssing when he was adding SD card support
on the Odroid-C1.


changes since RFC v1 at [0]:
- dropped RFC prefix
- instead of adding a hack to override the "ngpio" field this now splits
  the register definitions as suggested by Jerome (and based on the
  discussion of RFC v1). see the description of PATCH #1 for a more
  detailed explanation


@Kevin: PATCH #2 is based on my other patch from [1]:
"ARM: dts: meson8b: add the I2C clocks"


[0] http://lists.infradead.org/pipermail/linux-amlogic/2018-January/006259.html
[1] http://lists.infradead.org/pipermail/linux-amlogic/2018-February/006473.html


Martin Blumenstingl (2):
  pinctrl: meson: meson8b: fix requesting GPIOs greater than GPIOZ_3
  ARM: dts: meson8b: the CBUS GPIO controller only has 83 GPIOs

 arch/arm/boot/dts/meson8b.dtsi          |   2 +-
 drivers/pinctrl/meson/pinctrl-meson8b.c |  20 +++---
 include/dt-bindings/gpio/meson8b-gpio.h | 121 ++++++++++++++++++++++++++++----
 3 files changed, 121 insertions(+), 22 deletions(-)

-- 
2.16.2

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-03-02 20:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-25 11:38 [PATCH v2 0/2] Meson8b: fix requesting GPIOs greater than GPIOZ_3 Martin Blumenstingl
2018-02-25 11:38 ` [PATCH] Meson8b GPIO fix - WiP Martin Blumenstingl
2018-02-25 11:43   ` Martin Blumenstingl
2018-02-25 11:38 ` [PATCH v2 1/2] pinctrl: meson: meson8b: fix requesting GPIOs greater than GPIOZ_3 Martin Blumenstingl
2018-02-25 14:10   ` Jerome Brunet
2018-03-02  9:48   ` Linus Walleij
2018-03-02 20:56     ` Martin Blumenstingl
2018-02-25 11:38 ` [PATCH v2 2/2] ARM: dts: meson8b: the CBUS GPIO controller only has 83 GPIOs Martin Blumenstingl
2018-02-25 14:10   ` Jerome Brunet
2018-03-02  9:49   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox