[OpenWrt-Devel] [PATCH] ath79: convert devices to interrupt-driven gpio-keys

Christian Lamparter chunkeey at gmail.com
Fri Aug 2 16:21:49 EDT 2019


On Friday, August 2, 2019 8:03:17 PM CEST Jeff Kletsky wrote:
> 
> On 8/2/19 7:46 AM, Adrian Schmutzler wrote:
> > This converts all remaining devices to use interrupt-driven
> > gpio-keys compatible instead of gpio-keys-polled.
> > The poll-interval is removed.
> >
> 
> Not that this proposed change makes the situation any different, but 
> many devices have switches that are poorly handled by the "key-press" 
> approach.
> 
> One specific case that has bothered me (but not enough to dig into it) 
> is the Archer C7v2 that has an "rfkill" switch. Not only is it 
> "backwards" (label "Off" is really "wireless on"), but it only responds 
> to changes in state, so its state at boot is not respected. You can't, 
> as I recall, set it for "wireless off", plug in the device, and have the 
> wireless be off when OpenWrt boots.
> 
> The GL-AR300M series and the GL-AR750S also have a multi-position "mode" 
> switch.
> 
> Right now, all these switches have to be toggled twice to have their 
> position be properly respected by the OS if they're not in the 
> "expected" position.
> 
> It would seem that, at some point, switches like these would be better 
> served by a driver that can both detect position, as well as transition. 
> This would likely also require a way to poll the position at 
> "impacted-service start" and ubus support along with changes in existing 
> hotplug scripts.



More information about the openwrt-devel mailing list