Re: [PATCH 3/9] watchdog: s3c2410_wdt: update to use new exynos_pmu_*() apis

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux