You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I would like to write a service driver for an LCD display. My hardware is designed so that most of the GPIOs are internal. However, due to many other peripheral devices, additional GPIO expanders could not be avoided. The LCD is therefore connected to an expander for the reset line and a less important line. Unlike Linux via systfs, internal and external GPIOs cannot be abstracted together as far as I know, which is why I cannot write my driver in a generalised way. So I can either use the ioexpander interface or the gpio interface, right?
I have tried to provide the GPIOs of my STM32F4 via ioexpander, which works in principle, but is certainly not intended that way.
Does it make sense to include something in nuttx that provides a similar abstraction as the systfs in Linux?
If this possibility already exists, I would be very pleased about corresponding references.
Tobias
The text was updated successfully, but these errors were encountered:
Hi @tobiasjaster I think you found a common issue that many people face when trying to write generic drivers using external GPIO on NuttX. Actually since Linux kernel 4.7/4.8 the GPIO export over /sysfs was replaces with something called gpiolib that exports GPIOs as char devices, similar to NuttX DEV_GPIO:
Yes, something similar to gpiolib should be useful to keep NuttX more compatible with Linux and also fix this asymmetry when using internal GPIO vs external GPIO (via ioexpander).
@xiaoxiang781216 do you already implemented something similar to it? I think it is important to verify because otherwise @tobiasjaster could spend time on something that already exist.
Hello,
I would like to write a service driver for an LCD display. My hardware is designed so that most of the GPIOs are internal. However, due to many other peripheral devices, additional GPIO expanders could not be avoided. The LCD is therefore connected to an expander for the reset line and a less important line. Unlike Linux via systfs, internal and external GPIOs cannot be abstracted together as far as I know, which is why I cannot write my driver in a generalised way. So I can either use the ioexpander interface or the gpio interface, right?
I have tried to provide the GPIOs of my STM32F4 via ioexpander, which works in principle, but is certainly not intended that way.
Does it make sense to include something in nuttx that provides a similar abstraction as the systfs in Linux?
If this possibility already exists, I would be very pleased about corresponding references.
Tobias
The text was updated successfully, but these errors were encountered: