Devicetree
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Jisheng Zhang <jszhang@kernel.org>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	 Vincent Mailhol <mailhol@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>
Cc: linux-can@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] can: arasan-canfd: add driver for arasan CAN-FD controller
Date: Mon, 03 Aug 2026 17:21:31 +0200	[thread overview]
Message-ID: <156581f4ba49cdae4ff1a19767eb32ffa64ec900.camel@pengutronix.de> (raw)
In-Reply-To: <20260803140531.12692-3-jszhang@kernel.org>

On Mo, 2026-08-03 at 22:05 +0800, Jisheng Zhang wrote:
> Add driver for the arasan CAN-FD controller.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>  drivers/net/can/Kconfig        |    6 +
>  drivers/net/can/Makefile       |    1 +
>  drivers/net/can/arasan-canfd.c | 1057 ++++++++++++++++++++++++++++++++
>  3 files changed, 1064 insertions(+)
>  create mode 100644 drivers/net/can/arasan-canfd.c
> 
[...]
> diff --git a/drivers/net/can/arasan-canfd.c b/drivers/net/can/arasan-canfd.c
> new file mode 100644
> index 000000000000..63a6191f84f6
> --- /dev/null
> +++ b/drivers/net/can/arasan-canfd.c
> @@ -0,0 +1,1057 @@
[...]
> +static int arasan_canfd_probe(struct platform_device *pdev)
> +{
> +	struct net_device *ndev;
> +	struct arasan_canfd_priv *priv;
> +	struct phy *transceiver;
> +	void __iomem *addr;
> +	int ret;
> +
> +	addr = devm_platform_ioremap_resource(pdev, 0);
> +	if (IS_ERR(addr))
> +		return PTR_ERR(addr);
> +
> +	ndev = alloc_candev(sizeof(struct arasan_canfd_priv), CAN_MAX_TX_QUEUE);
> +	if (!ndev)
> +		return -ENOMEM;
> +	priv = netdev_priv(ndev);
> +
> +	priv->sys_rst = devm_reset_control_get(&pdev->dev, "sys");
> +	if (IS_ERR(priv->sys_rst)) {
> +		dev_err(&pdev->dev, "failed to get sys reset\n");
> +		ret = PTR_ERR(priv->sys_rst);
> +		goto err_free;
> +	}
> +	reset_control_assert(priv->sys_rst);
> +	reset_control_deassert(priv->sys_rst);
> +
> +	priv->can_rst = devm_reset_control_get(&pdev->dev, "can");

Please use devm_reset_control_get_exclusive() directly.


regards
Philipp

  parent reply	other threads:[~2026-08-03 15:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 14:05 [PATCH 0/2] can: add arasan canfd controller support Jisheng Zhang
2026-08-03 14:05 ` [PATCH 1/2] dt-bindings: can: add arasan canfd controller Jisheng Zhang
2026-08-03 14:31   ` sashiko-bot
2026-08-03 15:17   ` Krzysztof Kozlowski
2026-08-03 14:05 ` [PATCH 2/2] can: arasan-canfd: add driver for arasan CAN-FD controller Jisheng Zhang
2026-08-03 14:43   ` sashiko-bot
2026-08-03 15:21   ` Philipp Zabel [this message]
2026-08-03 16:05   ` Oliver Hartkopp

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=156581f4ba49cdae4ff1a19767eb32ffa64ec900.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jszhang@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=robh@kernel.org \
    /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