linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] gpio: generic: add option to read output value from set register
@ 2015-04-29 15:34 Vladimir Zapolskiy
  2015-04-29 15:34 ` [PATCH 1/4] Revert "gpio: generic: clamp retured value to [0,1]" Vladimir Zapolskiy
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Vladimir Zapolskiy @ 2015-04-29 15:34 UTC (permalink / raw)
  To: Linus Walleij, Alexandre Courbot; +Cc: linux-gpio

The changeset introduces BGPIOF_READ_OUTPUT_REG_SET flag to
bgpio_init() function, which is if provided allows to get
stored value of output GPIO line in "set" register instead
of default "data" register.

The same functionality is already implemented in moxart driver by
a private function, move it to gpio-generic.c since at least iMX
GPIO controllers require it as well.

Fixes a problem on iMX platforms:

  % echo out > /sys/class/gpio/gpio9/direction
  % cat /sys/class/gpio/gpio9/value
  0
  % echo 1 > /sys/class/gpio/gpio9/value
  % cat /sys/class/gpio/gpio9/value
  0

Vladimir Zapolskiy (4):
  Revert "gpio: generic: clamp retured value to [0,1]"
  gpio: gpio-generic: add flag to read out output value from reg_set
  gpio: moxart: get value of output gpio from generic driver
  gpio: mxc: read output value from GPIO_DR register

 drivers/gpio/gpio-generic.c     |   24 ++++++++++++++++++++----
 drivers/gpio/gpio-moxart.c      |   17 +++--------------
 drivers/gpio/gpio-mxc.c         |    3 ++-
 include/linux/basic_mmio_gpio.h |    1 +
 4 files changed, 26 insertions(+), 19 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-05-12 11:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-29 15:34 [PATCH 0/4] gpio: generic: add option to read output value from set register Vladimir Zapolskiy
2015-04-29 15:34 ` [PATCH 1/4] Revert "gpio: generic: clamp retured value to [0,1]" Vladimir Zapolskiy
2015-05-11  9:46   ` Linus Walleij
2015-05-11 13:12     ` Vladimir Zapolskiy
2015-05-12  7:45       ` Alexandre Courbot
2015-05-12  7:54         ` Vladimir Zapolskiy
2015-05-12 11:52           ` Linus Walleij
2015-04-29 15:34 ` [PATCH 2/4] gpio: gpio-generic: add flag to read out output value from reg_set Vladimir Zapolskiy
2015-05-11  9:50   ` Linus Walleij
2015-05-11 13:28     ` Vladimir Zapolskiy
2015-04-29 15:35 ` [PATCH 3/4] gpio: moxart: get value of output gpio from generic driver Vladimir Zapolskiy
2015-05-11  9:52   ` Linus Walleij
2015-05-11 12:17     ` Jonas Jensen
2015-05-11 13:17       ` Vladimir Zapolskiy
2015-04-29 15:35 ` [PATCH 4/4] gpio: mxc: read output value from GPIO_DR register Vladimir Zapolskiy
2015-05-11  9:54   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).