pinctrl-bcm2835: Runtime configuration of pull-ups?
swarren at wwwdotorg.org
Fri Aug 14 20:16:50 PDT 2015
On 08/14/2015 07:56 AM, Gottfried Haider wrote:
> Hello all,
> I understand that the pinctrl driver can enable the pins' internal
> pull-ups (or pull-downs) based on device tree configuration.
> Are there
> plans to expose this functionality to user-space, so that one could
> dynamically enable or disable the pull-up of exported GPIO pins?
I'm not aware of any plans for a user-space pinctrl API. However, your
best bet to get up-to-date information is to ask the pinctrl subsystem
maintainer; see the "PIN CONTROL SUBSYSTEM" entry in the MAINTAINERS
file in the Linux source.
I suspect you could already make this work by dynamically
loading/unloading a device tree overlay that contained the desired
pinctrl configuration? You might need the DT overlay to trigger the
loading of a new driver in order to actually activate any pinctrl
configuration in the DT overlay though.
> I haven't done any coding in the kernel before, but I would be happy
> to give it a try, if its feasible for me to do, and relevant for other
> people as well?
I'd suggest asking the pinctrl maintainers whether this is a feature
they'd accept. For background on writing kernel patches, see the
following files in the kernel source tree:
(and likely more!)
More information about the linux-rpi-kernel