Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4984

Advanced users • Re: Setting gpio pullup in kernel module that is using the GPIO API

$
0
0
I think you have to go the Device Tree route. The "pinctrl" subsystem allows you to describe configurations for groups of pins - pulls, alternate functions, drive strengths etc. - and to request that the configuration is activated before instantiating one's driver. It is possible to declare multiple pin configurations and switch between them at runtime, but that doesn't avoid declaring them in DT in the first place.
Thanks PhilE. I did find reference to "pinctrl" in my search. Time to start learning the device tree. By any chance can you point me to an example of a dt overlay that uses "pinctrl".

In the long run a would like this kernel module to be flexible and be able to configure it with a flexible number of pins and pin values. If I need a DT overlay I was thinking I could create a python script to write a dt overlay (dts) file for the gpio pins to be configured.

Statistics: Posted by AndyD — Sat Dec 21, 2024 1:40 am



Viewing all articles
Browse latest Browse all 4984

Trending Articles