linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* GPIOs not correctly exported via sysfs on ATSAMA5D2
@ 2020-02-28 10:58 Romain Izard
  2020-02-28 12:39 ` Ludovic Desroches
  2020-03-02  8:39 ` Uwe Kleine-König
  0 siblings, 2 replies; 11+ messages in thread
From: Romain Izard @ 2020-02-28 10:58 UTC (permalink / raw)
  To: Linux GPIO List, linux-arm-kernel
  Cc: Ludovic Desroches, Linus Walleij, Nicolas Ferre,
	Alexandre Belloni

Hello,

While experimenting with a new chip, I connected it on the SDIO
interface on my board based on a SAMA5D2 SoC. For a first step, I need
to drive the pins on the SDIO bus at a given level to program this new
chip. To do so, I tried to control the GPIO lines manually by unbinding
the SDHCI controller, and using /sys/class/gpio/export to control the
pins, with the following code:

echo a0000000.sdio-host > /sys/bus/platform/drivers/sdhci-at91/unbind
echo 4 > /sys/class/gpio/export
echo low > /sys/class/gpio/PA4/direction

Unfortunately, the state of the pin does not change and it remains
driven to 1. I checked the configuration register with devmem2, and it
appeared that the selected function remains the SDIO function even after
calling export.

The issue does not appear when I use a GPIO in a driver with an explicit
pinctrl configuration in the device tree, which explains why I did not
see it until now.

The kernel version used is Linux 5.4.22

Is this a user error from my part, or is there something missing in the
AT91 PIO4 pinctrl driver ?

Best regards,
-- 
Romain Izard

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

end of thread, other threads:[~2020-03-03 13:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-28 10:58 GPIOs not correctly exported via sysfs on ATSAMA5D2 Romain Izard
2020-02-28 12:39 ` Ludovic Desroches
2020-02-28 12:46   ` Russell King - ARM Linux admin
2020-02-28 13:36   ` Linus Walleij
2020-03-02  8:47     ` Uwe Kleine-König
2020-03-02  8:39 ` Uwe Kleine-König
2020-03-02  9:36   ` Russell King - ARM Linux admin
2020-03-02 16:34     ` Linus Walleij
2020-03-02 16:44       ` Russell King - ARM Linux admin
2020-03-02 21:30       ` Uwe Kleine-König
2020-03-03 13:10         ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).