From: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
To: mkl@pengutronix.de, mani@kernel.org, thomas.kopp@microchip.com,
mailhol.vincent@wanadoo.fr, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, linus.walleij@linaro.org, brgl@bgdev.pl,
linux-can@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: mukesh.savaliya@oss.qualcomm.com, anup.kulkarni@oss.qualcomm.com,
Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
Subject: [PATCH v5 0/6] can: mcp251xfd: add gpio functionality
Date: Fri, 26 Sep 2025 19:00:12 +0530 [thread overview]
Message-ID: <20250926133018.3071446-1-viken.dadhaniya@oss.qualcomm.com> (raw)
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 v5:
- Removed #ifdef GPIOLIB and added select GPIOLIB in Kconfig
- Rebased patch on latest baseline
- Resolved Kernel Test Robot warnings
- Link to v4: https://lore.kernel.org/all/20250918064903.241372-1-viken.dadhaniya@oss.qualcomm.com/
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 +
drivers/net/can/spi/mcp251xfd/Kconfig | 1 +
.../net/can/spi/mcp251xfd/mcp251xfd-core.c | 285 +++++++++++++++---
.../net/can/spi/mcp251xfd/mcp251xfd-regmap.c | 114 +++++--
drivers/net/can/spi/mcp251xfd/mcp251xfd.h | 8 +
5 files changed, 347 insertions(+), 66 deletions(-)
--
2.34.1
next reply other threads:[~2025-09-26 13:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 13:30 Viken Dadhaniya [this message]
2025-09-26 13:30 ` [PATCH v5 1/6] can: mcp251xfd: move chip sleep mode into runtime pm Viken Dadhaniya
2025-09-26 13:30 ` [PATCH v5 2/6] can: mcp251xfd: utilize gather_write function for all non-CRC writes Viken Dadhaniya
2025-09-26 13:30 ` [PATCH v5 3/6] can: mcp251xfd: add workaround for errata 5 Viken Dadhaniya
2025-09-26 13:30 ` [PATCH v5 4/6] can: mcp251xfd: only configure PIN1 when rx_int is set Viken Dadhaniya
2025-09-26 13:30 ` [PATCH v5 5/6] can: mcp251xfd: add gpio functionality Viken Dadhaniya
2025-09-29 13:38 ` Bartosz Golaszewski
2025-09-30 11:25 ` Viken Dadhaniya
2025-09-26 13:30 ` [PATCH v5 6/6] dt-bindings: can: mcp251xfd: add gpio-controller property Viken Dadhaniya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250926133018.3071446-1-viken.dadhaniya@oss.qualcomm.com \
--to=viken.dadhaniya@oss.qualcomm.com \
--cc=anup.kulkarni@oss.qualcomm.com \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=mani@kernel.org \
--cc=mkl@pengutronix.de \
--cc=mukesh.savaliya@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=thomas.kopp@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®