linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add support for TI TPS65219 PMIC GPIO interface.
@ 2023-05-11 14:09 Jerome Neanne
  2023-05-11 14:09 ` [PATCH v2 1/2] gpio: tps65219: add GPIO support for TPS65219 PMIC Jerome Neanne
  2023-05-11 14:09 ` [PATCH v2 2/2] mfd: tps65219: Add gpio cell instance Jerome Neanne
  0 siblings, 2 replies; 15+ messages in thread
From: Jerome Neanne @ 2023-05-11 14:09 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Tony Lindgren, Lee Jones
  Cc: linux-kernel, linux-gpio, linux-omap, Jonathan Cormier,
	Jerome Neanne

GPIO interface consist in 3 pins:
Two GPIOS are output only: GPO1, GPO2.

GPIO0 is used for multi device support:
- The input-functionality is only used in multi-PMIC configuration
- In single-PMIC, it can be used as an output

The configuration is static and flashed in NVM in factory.
Description tps65219.pdf chapter 7.3.13

Linux must not change MULTI_DEVICE_ENABLE bit at run time.

This was done for test purpose only to check input/output
correct behavior on EVM board (no access to different NVM config).

Tested on k3-am62x-lp-sk board. This board MULTI_DEVICE_ENABLE=0

Despite the register bits are out of order,
driver is remapping in natural order:
GPIO0 is gpiochip line 0
GPO1/2 are gpiochip line 1/2

Initial version by Jon Cormier on TI Mainline.
Ported upstream by Jerome Neanne

PMIC datasheet:
Link: https://www.ti.com/lit/ds/symlink/tps65219.pdf

Changes in v2:
andy.shevchenko review
- Typo and indentation in commit message.
- Clarify Co-developer role.
- Specify name for module.
- Code simplification for tps65219_gpio_set
- Put test code into #if 0 ... #endif to make it easier to re-use
- Formatting for .driver
- remove dupplicated error management => dead code

Previous version:
v1 - https://lore.kernel.org/all/20230224113837.874264-1-jneanne@baylibre.com/

Co-developed-by: Jonathan Cormier <jcormier@criticallink.com>
Signed-off-by: Jonathan Cormier <jcormier@criticallink.com>
Signed-off-by: Jerome Neanne <jneanne@baylibre.com>

Jerome Neanne (2):
  gpio: tps65219: add GPIO support for TPS65219 PMIC
  mfd: tps65219: Add gpio cell instance

 MAINTAINERS                  |   1 +
 drivers/gpio/Kconfig         |  13 +++
 drivers/gpio/Makefile        |   1 +
 drivers/gpio/gpio-tps65219.c | 167 +++++++++++++++++++++++++++++++++++
 drivers/mfd/tps65219.c       |   7 +-
 5 files changed, 188 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpio/gpio-tps65219.c

--
2.34.1

---
Jerome Neanne (2):
      gpio: tps65219: add GPIO support for TPS65219 PMIC
      mfd: tps65219: Add gpio cell instance

 MAINTAINERS                  |   1 +
 drivers/gpio/Kconfig         |  17 +++++
 drivers/gpio/Makefile        |   1 +
 drivers/gpio/gpio-tps65219.c | 173 +++++++++++++++++++++++++++++++++++++++++++
 drivers/mfd/tps65219.c       |   2 +-
 5 files changed, 193 insertions(+), 1 deletion(-)
---
base-commit: 1a5304fecee523060f26e2778d9d8e33c0562df3
change-id: 20230511-tps65219-add-gpio-support-322bdb4e0297

Best regards,
-- 
Jerome Neanne <jneanne@baylibre.com>


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

end of thread, other threads:[~2023-05-26 13:31 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-11 14:09 [PATCH v2 0/2] Add support for TI TPS65219 PMIC GPIO interface Jerome Neanne
2023-05-11 14:09 ` [PATCH v2 1/2] gpio: tps65219: add GPIO support for TPS65219 PMIC Jerome Neanne
2023-05-11 20:57   ` Linus Walleij
2023-05-12  7:13     ` jerome Neanne
2023-05-17  6:33       ` Tony Lindgren
2023-05-22 12:26         ` jerome Neanne
2023-05-15 15:36   ` Bartosz Golaszewski
2023-05-16 13:49     ` jerome Neanne
2023-05-20  9:44     ` andy.shevchenko
2023-05-22  7:47       ` jerome Neanne
2023-05-22 11:18         ` Andy Shevchenko
2023-05-23  9:09           ` jerome Neanne
2023-05-26 13:31             ` Bartosz Golaszewski
2023-05-11 14:09 ` [PATCH v2 2/2] mfd: tps65219: Add gpio cell instance Jerome Neanne
2023-05-11 20:59   ` 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).