On Tue, 15 Dec 2015 09:09:04 +0100 Alexander Stein <alexander.stein@xxxxxxxxxxxxxxxxxxxxx> wrote: > On Monday 07 December 2015 09:22:59, Timo Teras wrote: > > On Mon, 07 Dec 2015 07:53:08 +0100 > > Alexander Stein <alexander.stein@xxxxxxxxxxxxxxxxxxxxx> wrote: > > > > The other side is: Why would my gpio-keys input mapping > > specification need know to what kind of GPIO input it is connected > > to? What if I switch the GPIO expander - or the hardware schema? I > > need to edit 10 different places rather than one - places that are > > about the high-level functionality, not the hardware. Normally the > > pullup settings are hardware layout dependant, so GPIO > > configuration would be the logical place. > > gpio-keys need to know this when selecting active low or active high. > You usually need the corresponding pull up/down for this to work. To me it looks active_low is just software invert. My understanding is that pullups are practically always fixed configuration depending on how the connection is physically wired. The only exception being that you have development board where the physical wiring is subject to change. > > One generally wants to configure pullups correctly for all GPIOs > > regardless of if they are connected or not; or if the relevant > > high-level gpio driver is loaded or not. And this should be done as > > early as possible - even before the driver for that specific GPIO > > pin functionality is loaded. > > This is also a valid point. > > > Perphaps others have more arguments for the per-pin configuration? > > I get the impression both ways would be needed... which is kinda > error-prone. But yeah. If there's valid use cases for pullups to be changed, it would justify both ways. But if needing to choose, I would prefer specifying pullup register data in one place. Thus I chose that way for the patch. Perhaps this patch could be considered applied as-is then? Or is there wishes to unify the OF property name? Thanks, Timo -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html