linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Peng Fan <peng.fan@oss.nxp.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>, Peng Fan <peng.fan@nxp.com>,
	"cristian.marussi@arm.com" <cristian.marussi@arm.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	"arm-scmi@vger.kernel.org" <arm-scmi@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>
Subject: Re: [PATCH 0/4] rtc/scmi: Support multiple RTCs
Date: Thu, 13 Feb 2025 09:20:32 +0100	[thread overview]
Message-ID: <20250213082032315c4327@mail.local> (raw)
In-Reply-To: <20250213033033.GA21937@localhost.localdomain>

On 13/02/2025 11:30:33+0800, Peng Fan wrote:
> >> IIUC on any pure DT based system, a device node exists per RTC and hence
> >> platform device associated with it. And the RTC devices are created with
> >> parent pointing to unique platform 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.
> >> >
> >
> >I want you to keep your changes local to your driver. I already stated
> >back in 2018 that you were on your own with the imx-sc driver and that I
> >don't like seeing multiple abstractions for existing RTCs. What is the
> >actual use case behind needing to access both RTCs using Linux?
> >Shouldn't this be handled on your firmware side?
> 
> The firmware exports two RTCs, RTC0 could be handled by Linux, RTC1
> could only be read by Linux and configuable by M7 per current i.MX95 EVK
> firmware.

This doesn't answer the main question, why is this useful? Where is the
time of RTC1 coming from and why would linux set a different time on
RTC0 ? Can't the firwmare just set the same time on both RTC0 and RTC1?
What would someone do if RTC0 and RTC1 don't agree on the time?

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


  reply	other threads:[~2025-02-13  8:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-20  2:25 [PATCH 0/4] rtc/scmi: Support multiple RTCs Peng Fan (OSS)
2025-01-20  2:25 ` [PATCH 1/4] firmware: arm_scmi: imx: Support more event sources Peng Fan (OSS)
2025-01-20  2:25 ` [PATCH 2/4] firmware: arm_scmi: imx: Introduce bbm_info hook Peng Fan (OSS)
2025-01-20  2:25 ` [PATCH 3/4] rtc: Introduce devm_rtc_allocate_device_priv Peng Fan (OSS)
2025-01-20 10:57   ` Dan Carpenter
2025-01-21 14:35     ` Peng Fan
2025-01-21 15:15       ` Dan Carpenter
2025-01-20  2:25 ` [PATCH 4/4] rtc: imx-sm-bbm: Support multiple RTCs Peng Fan (OSS)
2025-02-11 17:01   ` Sudeep Holla
2025-02-12  6:41     ` Peng Fan
2025-02-12 10:44       ` Sudeep Holla
2025-01-20 10:21 ` [PATCH 0/4] rtc/scmi: " Alexandre Belloni
2025-01-21 14:31   ` Peng Fan
2025-02-03 11:50     ` Peng Fan
2025-02-11 16:59     ` Sudeep Holla
2025-02-12  6:35       ` Peng Fan
2025-02-12 10:43         ` Sudeep Holla
2025-02-12 17:01           ` Alexandre Belloni
2025-02-13  3:30             ` Peng Fan
2025-02-13  8:20               ` Alexandre Belloni [this message]
2025-02-13 10:52                 ` Peng Fan
2025-02-13 11:26                   ` Alexandre Belloni
2025-02-13 13:35                     ` Peng Fan
2025-02-13 12:54                       ` Alexandre Belloni
2025-02-14  3:55                         ` Peng Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250213082032315c4327@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=arm-scmi@vger.kernel.org \
    --cc=cristian.marussi@arm.com \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).