Re: [PATCH] gpiolib: Don't allow drivers to specify a base with DT

2014-08-11 Thread Mark Brown
On Mon, Aug 04, 2014 at 01:21:57PM +0900, Alexandre Courbot wrote: > On Thu, Jul 31, 2014 at 9:07 PM, Mark Brown wrote: > > DT based systems should have no reason to use fixed GPIO numbers but some > > drivers that work on both DT and non-DT platforms specify them anyway. In > > order to improve

Re: [PATCH] gpiolib: Don't allow drivers to specify a base with DT

2014-08-11 Thread Mark Brown
On Mon, Aug 11, 2014 at 09:26:49AM +0200, Linus Walleij wrote: > On Thu, Jul 31, 2014 at 2:07 PM, Mark Brown wrote: > > - if (base < 0) { > > + if (base < 0 || of_have_populated_dt()) { > > base = gpiochip_find_base(chip->ngpio); > But here I worry about breaking in-t

Re: [PATCH] gpiolib: Don't allow drivers to specify a base with DT

2014-08-11 Thread Linus Walleij
On Thu, Jul 31, 2014 at 2:07 PM, Mark Brown wrote: > From: Mark Brown > > DT based systems should have no reason to use fixed GPIO numbers but some > drivers that work on both DT and non-DT platforms specify them anyway. In > order to improve robustness in cases where drivers use gpio_is_valid()

Re: [PATCH] gpiolib: Don't allow drivers to specify a base with DT

2014-08-03 Thread Alexandre Courbot
On Thu, Jul 31, 2014 at 9:07 PM, Mark Brown wrote: > From: Mark Brown > > DT based systems should have no reason to use fixed GPIO numbers but some > drivers that work on both DT and non-DT platforms specify them anyway. In > order to improve robustness in cases where drivers use gpio_is_valid()

[PATCH] gpiolib: Don't allow drivers to specify a base with DT

2014-07-31 Thread Mark Brown
From: Mark Brown DT based systems should have no reason to use fixed GPIO numbers but some drivers that work on both DT and non-DT platforms specify them anyway. In order to improve robustness in cases where drivers use gpio_is_valid() to check for a valid GPIO on data initialized to zero as a de