linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Accessing GPIOs from userspace using recent kernels
@ 2014-05-14  8:46 Peter TB Brett
  2014-05-14 10:00 ` Javier Martinez Canillas
  0 siblings, 1 reply; 11+ messages in thread
From: Peter TB Brett @ 2014-05-14  8:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

We have several pieces of software that make use of the /sys/class/gpio 
userspace interface to the GPIO subsystem.

One important prerequisite to being able to use the userspace GPIO 
interface is to be able to put the corresponding package pins into GPIO 
mode, by modifying the chip's mux settings.

With Fedora 19 on the Pandaboard, we were able to achieve this by poking 
around in /sys/kernel/debug/omap_mux.  However, when running Fedora 20, 
this directory is empty.  My assumption is that this functionality has 
been subsumed by the pinctrl subsystem in recent kernels.  
Unfortunately, there doesn't seem to be any documented userspace API.

If there is no longer a userspace API for these settings, is there any 
way  that I can simply amend the device tree in order to change a couple 
of mux settings?

I've figured out that I would need a stanza that looks something like:

&omap4_pmx_core
{
  foo_pins: pinmux_foo_pins {
    pinctrl-single,pins = <
      0x5e (PIN_INPUT | MUX_MODE3)  /* gpmc_ad15.gpio_39 */ /* IRQ */
      0x12e (PIN_INPUT | MUX_MODE3) /* i2c4_scl.gpio_132 */ /* RST */
  };
};

But I can't work out what else I need to modify in order for these mux 
settings to take effect.

Thanks for any pointers!

                                                    Peter



-- 
Dr Peter Brett <peter@peter-b.co.uk>

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

end of thread, other threads:[~2014-05-31  0:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-14  8:46 Accessing GPIOs from userspace using recent kernels Peter TB Brett
2014-05-14 10:00 ` Javier Martinez Canillas
2014-05-15 14:06   ` Peter TB Brett
2014-05-15 18:54     ` Javier Martinez Canillas
2014-05-16 10:15       ` Peter TB Brett
2014-05-17 12:16         ` Javier Martinez Canillas
2014-05-23 11:35         ` Linus Walleij
2014-05-23 15:11           ` Tony Lindgren
2014-05-30 19:35             ` Javier Martinez Canillas
2014-05-30 20:25               ` Tony Lindgren
2014-05-31  0:40                 ` Javier Martinez Canillas

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).