Re: [PATCH 0/4] rtc/scmi: Support multiple RTCs

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

 



On Tue, Feb 11, 2025 at 04:59:53PM +0000, Sudeep Holla wrote:
>On Tue, Jan 21, 2025 at 02:31:55PM +0000, Peng Fan wrote:
>> 
>> It is the i.MX SCMI Protocol exports two RTCs using one protocol.
>> 
>> Two RTC devices are created, but share one parent device.
>> 
>> Do you mean each RTC device should have a unique parent device?
>>
>
>Can you point where is this check for unique parent ? I am not so familiar
>with RTC but I couldn't find myself with quick search.

The RTC ops takes the rtc parent as input parameter
https://elixir.bootlin.com/linux/v6.13.2/source/drivers/rtc/interface.c#L94
"err = rtc->ops->read_time(rtc->dev.parent, tm);"

So in the rtc device driver, there is no way to know which rtc it is just
from the parent device.

However i.MX SCMI BBM exports two RTCs(id: 0, id: 1), so to make it work for
current RTC framework, we could only pick one RTC and pass the id to BBM
server side.

I am not sure whether Alexandre wanna me to update the code following each
parent could only support one RTC or else.

Regards
Peng

>
>-- 
>Regards,
>Sudeep




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux