[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y+JsML07a6v7GOml@hovoldconsulting.com>
Date: Tue, 7 Feb 2023 16:20:16 +0100
From: Johan Hovold <johan@...nel.org>
To: David Collins <quic_collinsd@...cinc.com>
Cc: Johan Hovold <johan+linaro@...nel.org>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Bjorn Andersson <andersson@...nel.org>,
Andy Gross <agross@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Alessandro Zummo <a.zummo@...ertech.it>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Maximilian Luz <luzmaximilian@...il.com>,
linux-arm-msm@...r.kernel.org, linux-rtc@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 13/22] rtc: pm8xxx: refactor read_time()
On Mon, Feb 06, 2023 at 07:16:09PM -0800, David Collins wrote:
> On 2/2/23 07:54, Johan Hovold wrote:
> > In preparation for adding support for setting the time by means of an
> > externally stored offset, refactor read_time() by adding a new helper
> > that can be used to retrieve the raw time as stored in the RTC.
> >
> > Signed-off-by: Johan Hovold <johan+linaro@...nel.org>
> > ---
> > drivers/rtc/rtc-pm8xxx.c | 54 ++++++++++++++++++++++++----------------
> > 1 file changed, 33 insertions(+), 21 deletions(-)
> >
> > diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
> > index b1ce246c501a..2f96a178595c 100644
> > --- a/drivers/rtc/rtc-pm8xxx.c
> > +++ b/drivers/rtc/rtc-pm8xxx.c
> > @@ -59,6 +59,37 @@ struct pm8xxx_rtc {
> > struct device *dev;
> > };
> >
> > +static int pm8xxx_rtc_read_raw(struct pm8xxx_rtc *rtc_dd, u32 *secs)
>
> I think that pm8xxx_rtc_read_time_raw() might be a better name for this
> function to avoid any possible confusion if it is being used to read the
> RTC time or the alarm time.
Thanks, that's a good suggestion. I don't think there's any real risk
for confusion here, but if I'm sending a v3 I can rename this one.
> The patch looks good to me otherwise.
Johan
Powered by blists - more mailing lists