Re: [PATCH 1/4] gpio-imx: Do not use gpio_set_value()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Do not use gpio_set_value() in imx_gpio_direction_output() for two
> reasons:
> 
> 	- Since we don't check gpio_set_value's result, using it
>           instead of imx_gpio_set_value doesn't seem to have any
>           advantages
> 
> 	- Using gpiolib's function at this level makes it hard to
>           implement 'active low' support (commit that follows) since
>           gpio driver is dealing with physical GPIO levels, whereas
>           gpiolib is explected to accept logical levels.
> 
> As a remedy swithch imx_gpio_direction_output() to using
> imx_gpio_set_value().

I'd say calling back into subsystem from driver is generally invalid
pattern, and this patch fixes that.

Acked-by: Nikita Yushchenko <nikita.yoush@xxxxxxxxxxxxxxxxxx>

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux