[PATCH 0/4] can: mcp251xfd: add gpio functionality

From: Gregor Herburger
Date: Wed Apr 17 2024 - 09:44:27 EST


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. The second patch is to work around this erratum. I am not
sure if the place for the check and workaround in
mcp251xfd_regmap_crc_write is correct or if the check could be bypassed
with a direct call to mcp251xfd_regmap_crc_gather_write. If you have a
better suggestion where to add the check please let me know.

Patch 1 fixes a unwanted wakeup of the chip
Patch 2 is the fix/workaround for the aforementioned erratum
Patch 3 adds the gpio support
Patch 4 updates dt-binding

---
Gregor Herburger (4):
can: mcp251xfd: stop timestamp before sending chip to sleep
can: mcp251xfd: mcp251xfd_regmap_crc_write(): workaround for errata 5
can: mcp251xfd: add gpio functionality
dt-binding: can: mcp251xfd: add gpio-controller property

.../bindings/net/can/microchip,mcp251xfd.yaml | 2 +
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 139 ++++++++++++++++++++-
drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c | 56 ++++++++-
.../net/can/spi/mcp251xfd/mcp251xfd-timestamp.c | 5 +-
drivers/net/can/spi/mcp251xfd/mcp251xfd.h | 4 +
5 files changed, 200 insertions(+), 6 deletions(-)
---
base-commit: 1fdad13606e104ff103ca19d2d660830cb36d43e
change-id: 20240417-mcp251xfd-gpio-feature-29a1bf6acb54

Best regards,
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
https://www.tq-group.com/