devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/6] can: mcp251xfd: add gpio functionality
@ 2025-09-18  6:48 Viken Dadhaniya
  2025-09-18  6:48 ` [PATCH v4 1/6] can: mcp251xfd: move chip sleep mode into runtime pm Viken Dadhaniya
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Viken Dadhaniya @ 2025-09-18  6:48 UTC (permalink / raw)
  To: mkl, mani, thomas.kopp, mailhol.vincent, robh, krzk+dt, conor+dt,
	linus.walleij, brgl, linux-can, devicetree, linux-kernel
  Cc: mukesh.savaliya, anup.kulkarni, Viken Dadhaniya

Hi all,

The mcp251xfd allows two pins to be configured as GPIOs. This series
adds support for this feature.

The GPIO functionality is controlled with the IOCON register which has
an erratum.

Patch 1 from https://lore.kernel.org/linux-can/20240429-mcp251xfd-runtime_pm-v1-3-c26a93a66544@pengutronix.de/
Patch 2 refactor of no-crc functions to prepare workaround for non-crc writes
Patch 3 is the fix/workaround for the aforementioned erratum
Patch 4 only configure pin1 for rx-int
Patch 5 adds the gpio support
Patch 6 updates dt-binding

As per Marc's comment on below patch, we aim to get this series into
linux-next since the functionality is essential for CAN on the RB3 Gen2
board. As progress has stalled, Take this series forward with minor code
adjustments. Include a Tested-by tag to reflect validation performed on the
target hardware.

https://lore.kernel.org/all/20240806-industrious-augmented-crane-44239a-mkl@pengutronix.de/
---
Changes in v4:
- Moved GPIO register initialization into mcp251xfd_register after enabling
  runtime PM to avoid GPIO request failures when using the gpio-hog
  property to set default GPIO state.
- Added Tested-by and Signed-off-by tags.
- Dropped the 1st and 2nd patches from the v3 series as they have already been merged.
- Link to v3: https://lore.kernel.org/linux-can/20240522-mcp251xfd-gpio-feature-v3-0-8829970269c5@ew.tq-group.com/

Changes in v3:
- Implement workaround for non-crc writes
- Configure only Pin1 for rx-int feature
- moved errata check to .gather_write callback function
- Added MCP251XFD_REG_IOCON_*() macros
- Added Marcs suggestions
- Collect Krzysztofs Acked-By
- Link to v2: https://lore.kernel.org/r/20240506-mcp251xfd-gpio-feature-v2-0-615b16fa8789@ew.tq-group.com

Changes in v2:
- picked Marcs patches from https://lore.kernel.org/linux-can/20240429-mcp251xfd-runtime_pm-v1-0-c26a93a66544@pengutronix.de/
- Drop regcache
- Add pm_runtime in mcp251xfd_gpio_request/mcp251xfd_gpio_free
- Implement mcp251xfd_gpio_get_multiple/mcp251xfd_gpio_set_multiple
- Move check for rx_int/gpio conflict to mcp251xfd_gpio_request
- Link to v1: https://lore.kernel.org/r/20240417-mcp251xfd-gpio-feature-v1-0-bc0c61fd0c80@ew.tq-group.com

---
Gregor Herburger (5):
  can: mcp251xfd: utilize gather_write function for all non-CRC writes
  can: mcp251xfd: add workaround for errata 5
  can: mcp251xfd: only configure PIN1 when rx_int is set
  can: mcp251xfd: add gpio functionality
  dt-bindings: can: mcp251xfd: add gpio-controller property

Marc Kleine-Budde (1):
  can: mcp251xfd: move chip sleep mode into runtime pm

 .../bindings/net/can/microchip,mcp251xfd.yaml |   5 +
 .../net/can/spi/mcp251xfd/mcp251xfd-core.c    | 292 +++++++++++++++---
 .../net/can/spi/mcp251xfd/mcp251xfd-regmap.c  | 114 +++++--
 drivers/net/can/spi/mcp251xfd/mcp251xfd.h     |  10 +
 4 files changed, 355 insertions(+), 66 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2025-09-22 15:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18  6:48 [PATCH v4 0/6] can: mcp251xfd: add gpio functionality Viken Dadhaniya
2025-09-18  6:48 ` [PATCH v4 1/6] can: mcp251xfd: move chip sleep mode into runtime pm Viken Dadhaniya
2025-09-18  6:48 ` [PATCH v4 2/6] can: mcp251xfd: utilize gather_write function for all non-CRC writes Viken Dadhaniya
2025-09-18  6:49 ` [PATCH v4 3/6] can: mcp251xfd: add workaround for errata 5 Viken Dadhaniya
2025-09-18  6:49 ` [PATCH v4 4/6] can: mcp251xfd: only configure PIN1 when rx_int is set Viken Dadhaniya
2025-09-20 15:04   ` kernel test robot
2025-09-18  6:49 ` [PATCH v4 5/6] can: mcp251xfd: add gpio functionality Viken Dadhaniya
2025-09-18 10:46   ` Bartosz Golaszewski
2025-09-18 10:58     ` Marc Kleine-Budde
2025-09-22 13:15       ` Viken Dadhaniya
2025-09-22 14:28       ` Bartosz Golaszewski
2025-09-22 14:43         ` Marc Kleine-Budde
2025-09-22 14:49           ` Bartosz Golaszewski
2025-09-22 15:11             ` Marc Kleine-Budde
2025-09-18  6:49 ` [PATCH v4 6/6] dt-bindings: can: mcp251xfd: add gpio-controller property Viken Dadhaniya

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).