[PATCH v2 3/6] pinctrl: Add a possibility to configure pins from a gpiolib based drivers

2017-01-10 Thread Mika Westerberg
When a GPIO driver is backed by a pinctrl driver the GPIO driver often needs to call the pinctrl driver to configure certain things, like whether the pin is used as input or output. In addition to this there are other pin configurations applicable to GPIOs such as debounce timeout. To support this

Re: [PATCH v2 3/6] pinctrl: Add a possibility to configure pins from a gpiolib based drivers

2017-01-18 Thread Linus Walleij
On Fri, Jan 13, 2017 at 5:33 PM, Mika Westerberg wrote: > On Fri, Jan 13, 2017 at 04:36:42PM +0100, Linus Walleij wrote: >> On Thu, Jan 12, 2017 at 10:22 AM, Mika Westerberg >> wrote: >> >> > Hmm, looking at users of .set_debounce() I can see that the debounce >> > time can be quite large. For ex

Re: [PATCH v2 3/6] pinctrl: Add a possibility to configure pins from a gpiolib based drivers

2017-01-13 Thread Mika Westerberg
On Fri, Jan 13, 2017 at 04:36:42PM +0100, Linus Walleij wrote: > On Thu, Jan 12, 2017 at 10:22 AM, Mika Westerberg > wrote: > > > Hmm, looking at users of .set_debounce() I can see that the debounce > > time can be quite large. For example some signals which are connected to > > physical push-but

Re: [PATCH v2 3/6] pinctrl: Add a possibility to configure pins from a gpiolib based drivers

2017-01-11 Thread Linus Walleij
On Tue, Jan 10, 2017 at 3:31 PM, Mika Westerberg wrote: > When a GPIO driver is backed by a pinctrl driver the GPIO driver often > needs to call the pinctrl driver to configure certain things, like > whether the pin is used as input or output. In addition to this there > are other pin configurati

Re: [PATCH v2 3/6] pinctrl: Add a possibility to configure pins from a gpiolib based drivers

2017-01-11 Thread Mika Westerberg
On Wed, Jan 11, 2017 at 02:06:56PM +0100, Linus Walleij wrote: > On Tue, Jan 10, 2017 at 3:31 PM, Mika Westerberg > wrote: > > > When a GPIO driver is backed by a pinctrl driver the GPIO driver often > > needs to call the pinctrl driver to configure certain things, like > > whether the pin is use

Re: [PATCH v2 3/6] pinctrl: Add a possibility to configure pins from a gpiolib based drivers

2017-01-12 Thread Mika Westerberg
On Wed, Jan 11, 2017 at 03:33:04PM +0200, Mika Westerberg wrote: > > But let's first pause and discuss this, because I have some stuff on my > > mind here. > > > > First this kernel-internal ABI from : > > > > struct gpio_chip { > > (...) > > int (*set_debounce)(struct

Re: [PATCH v2 3/6] pinctrl: Add a possibility to configure pins from a gpiolib based drivers

2017-01-13 Thread Linus Walleij
On Thu, Jan 12, 2017 at 10:22 AM, Mika Westerberg wrote: > Hmm, looking at users of .set_debounce() I can see that the debounce > time can be quite large. For example some signals which are connected to > physical push-buttons may need > 64ms debounce time. > > However, the current pinconfig valu