linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/1] gpio: mmio: add get_set inverted direction io support
@ 2018-07-30  9:34 Tomer Maimon
  2018-07-30  9:34 ` [PATCH v1 1/1] gpio: mmio: add inverted direction get_set " Tomer Maimon
  0 siblings, 1 reply; 4+ messages in thread
From: Tomer Maimon @ 2018-07-30  9:34 UTC (permalink / raw)
  To: linus.walleij; +Cc: linux-kernel, linux-gpio, Tomer Maimon

When bgpio direction register use dirin and setting  
BGPIOF_READ_OUTPUT_REG_SET flag, the get_set I/O functions reading 
the inverted set register of each direction, it means:

when direction=in the get_set function read set register.
when direction=out the get_set function read dat register.

but is should be inverted.

conversion about it with Linus Walleij:
https://www.spinics.net/lists/devicetree/msg241973.html

to solve it, adding get_set_inv_dir and get_set_multiple_inv_dir
I/O functions to call the data register when the direction is input and
set register when the direction is output.
the functions will linked to the I/O get functions if the user set
BGPIOF_INVERTED_REG_DIR flag in the bgpio initialization.

Tomer Maimon (1):
  gpio: mmio: add inverted direction get_set io support

 drivers/gpio/gpio-mmio.c    | 48 ++++++++++++++++++++++++++++++++++++++++++---
 include/linux/gpio/driver.h |  1 +
 2 files changed, 46 insertions(+), 3 deletions(-)

-- 
2.14.1

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

end of thread, other threads:[~2018-08-02 23:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-30  9:34 [PATCH v1 0/1] gpio: mmio: add get_set inverted direction io support Tomer Maimon
2018-07-30  9:34 ` [PATCH v1 1/1] gpio: mmio: add inverted direction get_set " Tomer Maimon
2018-07-30 17:14   ` Andy Shevchenko
2018-08-02 23:34   ` 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).