Re: [PATCH 4/4] iio: hi8435: cleanup reset gpio

2017-05-29 Thread Linus Walleij
On Thu, May 25, 2017 at 8:27 AM, Nikita Yushchenko wrote: > - I found that chip's reset line is active low per datasheet, but device > tree for board I work with states it is active high There you have it, there is a bug in the device tree, because it is not properly describing the hardware. >

Re: [PATCH 4/4] iio: hi8435: cleanup reset gpio

2017-05-29 Thread Nikita Yushchenko
>> - Thinking further on this, I realized that for common case signal >> polarity is something defined by chip, and thus this knowledge belongs >> to chip's driver and not to chip user's device tree. Moreover, device >> tree writer could easily be not aware of signal polarity (too many >> datasheet

Re: [PATCH 4/4] iio: hi8435: cleanup reset gpio

2017-05-28 Thread Jonathan Cameron
On Thu, 25 May 2017 09:27:18 +0300 Nikita Yushchenko wrote: > > Reset GPIO is active low. > > > > Currently driver uses gpiod_set_value(1) to clean reset, which depends > > on device tree to contain GPIO_ACTIVE_HIGH - that does not match > > reality. > > > > This fixe

Re: [PATCH 4/4] iio: hi8435: cleanup reset gpio

2017-05-24 Thread Nikita Yushchenko
> Reset GPIO is active low. > > Currently driver uses gpiod_set_value(1) to clean reset, which depends > on device tree to contain GPIO_ACTIVE_HIGH - that does not match reality. > > This fixes driver to use _raw version of gpiod_set_value() to enforce > active-low seman

Re: [PATCH 4/4] iio: hi8435: cleanup reset gpio

2017-05-24 Thread Jonathan Cameron
On Wed, 24 May 2017 14:27:50 +0300 Vladimir Barinov wrote: > On 23.05.2017 11:18, Nikita Yushchenko wrote: > >>> Reset GPIO is active low. > >>> > >>> Currently driver uses gpiod_set_value(1) to clean reset, which depends > >>> on device tree to contain GPIO_ACTIVE_HIGH - that does not match real

Re: [PATCH 4/4] iio: hi8435: cleanup reset gpio

2017-05-24 Thread Vladimir Barinov
On 23.05.2017 11:18, Nikita Yushchenko wrote: Reset GPIO is active low. Currently driver uses gpiod_set_value(1) to clean reset, which depends on device tree to contain GPIO_ACTIVE_HIGH - that does not match reality. This fixes driver to use _raw version of gpiod_set_value() to enforce active-l

Re: [PATCH 4/4] iio: hi8435: cleanup reset gpio

2017-05-23 Thread Nikita Yushchenko
>> Reset GPIO is active low. >> >> Currently driver uses gpiod_set_value(1) to clean reset, which depends >> on device tree to contain GPIO_ACTIVE_HIGH - that does not match reality. >> >> This fixes driver to use _raw version of gpiod_set_value() to enforce >> active-low semantics despite of what'

Re: [PATCH 4/4] iio: hi8435: cleanup reset gpio

2017-05-20 Thread Jonathan Cameron
On 19/05/17 15:48, Nikita Yushchenko wrote: Reset GPIO is active low. Currently driver uses gpiod_set_value(1) to clean reset, which depends on device tree to contain GPIO_ACTIVE_HIGH - that does not match reality. This fixes driver to use _raw version of gpiod_set_value() to enforce active-low