Hi,

----- Alexander Graf <[email protected]> a écrit :
> 
> 
> On 05.09.18 11:00, Volker Kuhlmann wrote:
> > On Wed 05 Sep 2018 19:42:18 NZST +1200, Alexander Graf wrote:
> > 
> >> You need to first make sure the pin is muxed properly as GPIO and not
> >> associated with a special function:
> >>
> >>   /sys/kernel/debug/pinctrl/3f200000.gpio/pinmux-pins
> >>
> >> Once that's clear, you can use the GPIO export to actually access the
> >> GPIO function.
> > 
> > Ahh, how obvious... ;-) Thanks! OK, makes sense.
> > grep gpio4 pinmux-pins says
> >   pin 4 (gpio4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
> > and I guess it ought to not say "MUX UNCLAIMED".
> > 
> > But I can't find how to do that. All online instructions go straight to
> > exporting the pin (assuming a base of 0...).
> > 
> > Appending
> >   [all]
> >   gpio=4=op,dh
> >   gpio=462=op,dh
> > to /boot/efi/extraconfig.txt and rebooting makes no difference.
> > 
> > I'm stuck again :-(
> 
> Looks like the pin muxing actually happens automatically :)
> 
> rpi:~ # grep 'pin 4 ' /sys/kernel/debug/pinctrl/3f200000.gpio/pins
> pin 4 (gpio4) function gpio_in in hi; irq 83 (none)
> rpi:~ # echo $(( 458 + 4 )) > /sys/class/gpio/export
> rpi:~ # echo out > /sys/class/gpio/gpio462/direction
> rpi:~ # grep 'pin 4 ' /sys/kernel/debug/pinctrl/3f200000.gpio/pins
> pin 4 (gpio4) function gpio_out in lo; irq 83 (none)
> rpi:~ # echo 1 > /sys/class/gpio/gpio462/value
> rpi:~ # grep 'pin 4 ' /sys/kernel/debug/pinctrl/3f200000.gpio/pins
> pin 4 (gpio4) function gpio_out in hi; irq 83 (none)

For information, I created a wiki page for GPIO as it seems to be a problem for 
some people: 
  https://en.opensuse.org/openSUSE:GPIO

It is general usage information, not specific to a board (even if there are 
output examples)


Guillaume


> 
> 
> Alex
> -- 
> To unsubscribe, e-mail: [email protected]
> To contact the owner, e-mail: [email protected]
> 

--
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to