Re: gpio fiddling from userspace [Was: Re: gpio-mt7621 offset fix for 5.10 kernel series]

2022-10-19 Thread Peter Naulls
On 10/19/22 05:51, Lukas Zeller wrote: Hi, Lukas, thanks for this. I've read through everything and I agree with your concerns. I'll note also that Linus W's commentary is from 2018. On 19 Oct 2022, at 08:55, Petr Štetiar wrote: IMO there should be `ugpiod` daemon available over ubus,

Re: gpio fiddling from userspace [Was: Re: gpio-mt7621 offset fix for 5.10 kernel series]

2022-10-19 Thread Lukas Zeller
Hi, > On 19 Oct 2022, at 08:55, Petr Štetiar wrote: > > IMO there should be `ugpiod` daemon available over ubus, probably written in > ucode using libgpiod bindings. It should provide ubus events for GPIO inputs > and should be able to control GPIO outputs using ubus calls. What would that

Re: gpio fiddling from userspace [Was: Re: gpio-mt7621 offset fix for 5.10 kernel series]

2022-10-19 Thread Bjørn Mork
Petr Štetiar writes: >> Interesting. This property doesn't seem to be used much in OpenWrt if >> my grep foo is good. It should probably be added at least to every >> system where we want to access GPIOs from userspace? > > Yes, that is my[1] understanding as well. > > 1.

gpio fiddling from userspace [Was: Re: gpio-mt7621 offset fix for 5.10 kernel series]

2022-10-19 Thread Petr Štetiar
Lukas Zeller [2022-10-18 23:10:48]: Hi, > I did investigate this in June on this list [1] and in the openwrt forum [2] > and tried to ask some questions about the right way to handle this, but > apparently it did not echo for some reason back then. IMO there should be `ugpiod` daemon available

Re: gpio-mt7621 offset fix for 5.10 kernel series

2022-10-19 Thread Bjørn Mork
Sergio Paracuellos via openwrt-devel writes: > This is the reason we have 'gpio-line-names' property so you can set > up names for your pins and use it together with actual user space > tools libgpiod and gpiod. Any other gpio user space library is > considered deprecated in these days.

Re: gpio-mt7621 offset fix for 5.10 kernel series

2022-10-19 Thread Sergio Paracuellos
On Wed, Oct 19, 2022 at 6:02 AM Sergio Paracuellos wrote: > > On Wed, Oct 19, 2022 at 1:10 AM Rosen Penev wrote: > > > > On Tue, Oct 18, 2022 at 3:50 PM Peter Naulls wrote: > > > > > > On 10/18/22 17:10, Lukas Zeller wrote: > > > . > > > > > > > > Just not any more - the mt7621 had this too. I

Re: gpio-mt7621 offset fix for 5.10 kernel series

2022-10-18 Thread Sergio Paracuellos via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software.--- Begin Message --- On Wed, Oct 19, 2022 at 1:10 AM

Re: gpio-mt7621 offset fix for 5.10 kernel series

2022-10-18 Thread Rosen Penev
On Tue, Oct 18, 2022 at 3:50 PM Peter Naulls wrote: > > On 10/18/22 17:10, Lukas Zeller wrote: > . > > > > Just not any more - the mt7621 had this too. I currently patch it back into > > 22.03's gpio-mt7621.c for my builds and set base in the DTS, see [3] > > > > I can follow the rationale to get

Re: gpio-mt7621 offset fix for 5.10 kernel series

2022-10-18 Thread Peter Naulls
On 10/18/22 17:10, Lukas Zeller wrote: . Just not any more - the mt7621 had this too. I currently patch it back into 22.03's gpio-mt7621.c for my builds and set base in the DTS, see [3] I can follow the rationale to get rid of legacy GPIOs, but in the context of experimenting platforms, where

Re: gpio-mt7621 offset fix for 5.10 kernel series

2022-10-18 Thread Lukas Zeller
Hi Peter and Martin, > On 18 Oct 2022, at 22:02, Peter Naulls wrote: > > On 10/18/22 15:55, Martin Blumenstingl wrote: >> [...] my understanding is that the recommended way for >> accessing GPIOs from userspace (in case that's what you need) should >> be done through libgpiod. > > Thanks for

Re: gpio-mt7621 offset fix for 5.10 kernel series

2022-10-18 Thread Peter Naulls
On 10/18/22 15:55, Martin Blumenstingl wrote: Hello Peter, On Tue, Oct 18, 2022 at 9:34 PM Peter Naulls wrote: Looks like there was some code loss when the driver came from an earlier kernel series. Without this, my MT7621 board starts its GPIO offsets at 416 (why that number, I don't

Re: gpio-mt7621 offset fix for 5.10 kernel series

2022-10-18 Thread Martin Blumenstingl via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software.--- Begin Message --- Hello Peter, On Tue, Oct 18,

gpio-mt7621 offset fix for 5.10 kernel series

2022-10-18 Thread Peter Naulls
Looks like there was some code loss when the driver came from an earlier kernel series. Without this, my MT7621 board starts its GPIO offsets at 416 (why that number, I don't know): --- a/drivers/gpio/gpio-mt7621.c2022-10-18 15:03:42.596454871 -0400 +++ b/drivers/gpio/gpio-mt7621.c