[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bd81118a-5ee3-476e-a7bc-61684a362eea@kernel.org>
Date: Tue, 18 Nov 2025 12:01:58 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Arun Muthusamy <arun.muthusamy@...sler.com>, robh@...nel.org,
krzk+dt@...nel.org, conor+dt@...nel.org, mkl@...gutronix.de,
mailhol@...nel.org
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-can@...r.kernel.org, Daniel Hellstrom <daniel@...sler.com>
Subject: Re: [PATCH 04/10] can: grcan: Add clock handling
On 18/11/2025 10:21, Arun Muthusamy wrote:
> From: Daniel Hellstrom <daniel@...sler.com>
>
> Add clock handling and add error messages for missing 'freq' DT property.
>
> Signed-off-by: Arun Muthusamy <arun.muthusamy@...sler.com>
> Signed-off-by: Daniel Hellstrom <daniel@...sler.com>
> ---
> drivers/net/can/grcan.c | 19 ++++++++++++++++---
> 1 file changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c
> index 3b1b09943436..538a9b4f82ab 100644
> --- a/drivers/net/can/grcan.c
> +++ b/drivers/net/can/grcan.c
> @@ -34,7 +34,7 @@
> #include <linux/spinlock.h>
> #include <linux/of.h>
> #include <linux/of_irq.h>
> -
> +#include <linux/clk.h>
> #include <linux/dma-mapping.h>
>
> #define DRV_NAME "grcan"
> @@ -1644,6 +1644,7 @@ static int grcan_probe(struct platform_device *ofdev)
> {
> struct device_node *np = ofdev->dev.of_node;
> struct device_node *sysid_parent;
> + struct clk *clk;
> u32 sysid, ambafreq;
> int irq, err;
> void __iomem *base;
> @@ -1663,8 +1664,20 @@ static int grcan_probe(struct platform_device *ofdev)
>
> err = of_property_read_u32(np, "freq", &ambafreq);
> if (err) {
> - dev_err(&ofdev->dev, "unable to fetch \"freq\" property\n");
> - goto exit_error;
> + clk = devm_clk_get(&ofdev->dev, NULL);
Nope, your binding said there is no clock... you cannot add undocumented
ABI.
Best regards,
Krzysztof
Powered by blists - more mailing lists