lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 19 Dec 2019 09:15:02 +0000
From:   <Eugen.Hristev@...rochip.com>
To:     <alexandre.belloni@...tlin.com>
CC:     <jic23@...nel.org>, <robh+dt@...nel.org>,
        <Nicolas.Ferre@...rochip.com>, <linux-iio@...r.kernel.org>,
        <devicetree@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <linux-rtc@...r.kernel.org>,
        <a.zummo@...ertech.it>, <Ludovic.Desroches@...rochip.com>
Subject: Re: [PATCH 04/10] rtc: at91rm9200: use of_platform_populate as return
 value



On 18.12.2019 18:58, Alexandre Belloni wrote:
> On 18/12/2019 16:52:21+0000, Eugen.Hristev@...rochip.com wrote:
>>
>>
>> On 18.12.2019 18:43, Alexandre Belloni wrote:
>>
>>> Hi,
>>>
>>> On 18/12/2019 16:24:00+0000, Eugen.Hristev@...rochip.com wrote:
>>>> From: Eugen Hristev <eugen.hristev@...rochip.com>
>>>>
>>>> This allows the RTC node to have child nodes in DT.
>>>> This allows subnodes to be probed.
>>>>
>>>> Signed-off-by: Eugen Hristev <eugen.hristev@...rochip.com>
>>>> ---
>>>>    drivers/rtc/rtc-at91rm9200.c | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
>>>> index 3b833e0..f1b5b3d 100644
>>>> --- a/drivers/rtc/rtc-at91rm9200.c
>>>> +++ b/drivers/rtc/rtc-at91rm9200.c
>>>> @@ -421,7 +421,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
>>>>         at91_rtc_write_ier(AT91_RTC_SECEV);
>>>>
>>>>         dev_info(&pdev->dev, "AT91 Real Time Clock driver.\n");
>>>> -     return 0;
>>>> +     return of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
>>>>
>>>
>>> You can avoid the DT binding change and DT parsing by using
>>> platform_add_device here. I don't think there is any point describing
>>> the trigger as a child node (a watchdog functionality wouldn't be
>>> described for example).
>>>
>>
>> Hi,
>>
>> It's needed because the ADC needs a link to the trigger device. This is
>> a hardware link inside the SoC, so I thought the best way is to describe
>> this hardware is in the Device Tree.
>> Otherwise the ADC node is unaware of the RTC triggering possibility.
>> If we just assign the RTC trigger device to the ADC through the sysfs,
>> the ADC cannot distinguish between the RTC trigger and other various
>> triggers which can be attached.
>>
> 
> I'm not sure this links is required but I will let Jonathan review. Even
> if it is needed, you can still use the rtc node to describe that link.

Actually, the RTC node could potentially have two different ADC 
triggers. There is another OUT1 field that can do a second trigger for 
the ADC only for the last channel. Future development might add this 
trigger, so, with that in mind, I think it's best to link the exact 
trigger and not the RTC node.

> 
> --
> Alexandre Belloni, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ