[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230511-tps65219-add-gpio-support-v5-0-ebb94281c854@baylibre.com>
Date: Wed, 07 Jun 2023 16:39:30 +0200
From: Jerome Neanne <jneanne@...libre.com>
To: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Tony Lindgren <tony@...mide.com>, Lee Jones <lee@...nel.org>
Cc: khilman@...libre.com, msp@...libre.com, francesco@...cini.it,
linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-omap@...r.kernel.org,
Jonathan Cormier <jcormier@...ticallink.com>,
Jerome Neanne <jneanne@...libre.com>
Subject: [PATCH v5 0/2] Add support for TI TPS65219 PMIC GPIO interface.
Changes in v5:
- andy.shevchenko review:
- Use ENOTSUPP instead of EOPNOTSUPP.
- Nits:
- Use Datasheet tag in commit message and cover.
- Indentation, use 80 column width for Kconfig and 100
colums for C files.
- Format comment.
- Link to v4: https://lore.kernel.org/r/20230511-tps65219-add-gpio-support-v4-0-b5d6a764d722@baylibre.com
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
Changes in v4:
- andy.shevchenko review:
- Nits:
- move blank line before link in this cover.
- Kconfig indentation.
- Formatting: Comments; indentation; line length 100.
- Do not split string literals.
- Add var *dev = gpio->tps->dev and replace to get shorter blocks.
- Evaluate GPIO0 MULTI_DEVICE_ENABLE only once.
- Explicit include of bits.h
Change to CONFIG_DEBUG_GPIO: debug options from Kconfig for GPIO only.
- Link to v3: https://lore.kernel.org/r/20230511-tps65219-add-gpio-support-v3-0-19837a34d820@baylibre.com
Changes in v3:
- Linus Walleij Review:
- put test code under IS_ENABLED(DEBUG)
- Bartosz Golaszewski Review:
- nits: alphabetical ordering for includes, newline after
return,
- Add error message on regmap_update_bits failure.
- Change variable name in: tps65219_template_chip so that it's
clear that gpio_chip get's a copy of this template structure.
- Link to v2: https://lore.kernel.org/r/20230511-tps65219-add-gpio-support-v2-0-60feb64d649a@baylibre.com
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
- Link to v1: https://lore.kernel.org/all/20230224113837.874264-1-jneanne@baylibre.com/
Datasheet: https://www.ti.com/lit/ds/symlink/tps65219.pdf
Co-developed-by: Jonathan Cormier <jcormier@...ticallink.com>
Signed-off-by: Jonathan Cormier <jcormier@...ticallink.com>
Signed-off-by: Jerome Neanne <jneanne@...libre.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 | 16 ++++
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-tps65219.c | 185 +++++++++++++++++++++++++++++++++++++++++++
drivers/mfd/tps65219.c | 2 +-
5 files changed, 204 insertions(+), 1 deletion(-)
---
base-commit: 8ded96e4d9a6da88bdbad61350cc6147b7c0c00c
change-id: 20230511-tps65219-add-gpio-support-322bdb4e0297
Best regards,
--
Jerome Neanne <jneanne@...libre.com>
Powered by blists - more mailing lists