[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6c72a521-1048-42eb-ac74-d8f718a90723@linaro.org>
Date: Tue, 23 Jan 2024 19:12:41 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Peter Griffin <peter.griffin@...aro.org>
Cc: arnd@...db.de, robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
linux@...ck-us.net, wim@...ux-watchdog.org, conor+dt@...nel.org,
alim.akhtar@...sung.com, jaewon02.kim@...sung.com,
chanho61.park@...sung.com, semen.protsenko@...aro.org,
kernel-team@...roid.com, tudor.ambarus@...aro.org, andre.draszik@...aro.org,
saravanak@...gle.com, willmcvicker@...gle.com, linux-fsd@...la.com,
linux-watchdog@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH 3/9] watchdog: s3c2410_wdt: update to use new
exynos_pmu_*() apis
On 23/01/2024 18:30, Peter Griffin wrote:
>>> dev_warn(wdt->dev, "Couldn't get RST_STAT register\n");
>>> else if (rst_stat & BIT(wdt->drv_data->rst_stat_bit))
>>> @@ -698,14 +699,6 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
>>> if (ret)
>>> return ret;
>>>
>>> - if (wdt->drv_data->quirks & QUIRKS_HAVE_PMUREG) {
>>> - wdt->pmureg = syscon_regmap_lookup_by_phandle(dev->of_node,
>>> - "samsung,syscon-phandle");
>>> - if (IS_ERR(wdt->pmureg))
>>> - return dev_err_probe(dev, PTR_ERR(wdt->pmureg),
>>> - "syscon regmap lookup failed.\n");
>>
>>
>> Continuing topic from the binding: I don't see how you handle probe
>> deferral, suspend ordering.
>
> The current implementation is simply relying on exynos-pmu being
> postcore_initcall level.
>
> I was just looking around for any existing Linux APIs that could be a
> more robust solution. It looks like
>
> of_parse_phandle()
> and
> of_find_device_by_node();
>
> Are often used to solve this type of probe deferral issue between
> devices. Is that what you would recommend using? Or is there something
> even better?
I think you should keep the phandle and then set device link based on
of_find_device_by_node(). This would actually improve the code, because
syscon_regmap_lookup_by_phandle() does not create device links.
Best regards,
Krzysztof
Powered by blists - more mailing lists