We use cookies to provide our visitors with an optimal site experience. View our privacy notice and cookie notice to learn more about how we use cookies and how to manage your settings. By proceeding on our website you consent to the use of cookies.
Robert,
Thank you for keeping me informed. My colleague and I like the idea of the ‘line’ class. I work with digital inputs(s) and output(s) every day. From my embedded controller perspective most of my outputs are to relays, coils, solenoids, control signals to other digital devices… with a few connected to indicators (LEDs, bulbs). Most inputs are toggle-switches, push-buttons, control signals from other digital devices… none are from keypads. I now understand better that using the gpio-led class is used as ‘output’ and gpio-keypad is used as ‘input’. However ‘gpio-line’ is a much better description.
I see that Rodolfo has gotten feedback from Linus Walleij. I am keeping an eye on their conversation.
Can you show me an example on how to setup the gpio as pull up input on mode 7? I need to configure pins P8-7 through P8-19. I’ve managed to get the output gpio working fine, but i’ve tried many times with the input and I just can’t figure it out.
I think I have followed this whole discussion quite thoroughly and everything seems clear, but I have to go back to the basic question posed by taek8461: “How to set gpio pin when booting” but, I would like to use the pin bindings created in /sys/class/gpio/ (I wouldn’t want to use the script and systemd for this). I saw that is possible write a device-tree overlay to create such a structure in /sys/class/gpio/ at boot time. Could you please give some hints on how to write .dts or give an example. Below is my sample:
Actually, I just want the pins to be exported after booting in /sys/class/gpio/. Nothing more.
I am using version
Linux beaglebone 4.14.49-ti-r54 #1 SMP PREEMPT Fri Jun 15 22:14:13 UTC 2018 armv7l GNU/Linux
Right now, after booting, I have only ~gpio12 and ~gpio13 ready (as I heard, these pins reserved for use by other capes and shouldn’t be modified). So now, I have to manually (or script) export the rest of the pins I need - ok, its work, but…
If I have a choice :), then let’s say that I would like to have selected pins available after the system start (let it be 8 pullup inputs and 9 outputs in the off state) - but let’s not exaggerate - the rule of how to do it in the overlay will be enough.
Pins shouldn’t be a hog-pins. It should be possible to change the direction of the pin and modify or read the value file.
As already mentioned, I have seen a similar overlay that worked this way, but I have no way of finding out from the author how it achieved it.