From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: jingbao qiu <qiujingbao.dlmu@gmail.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
a.zummo@towertech.it, krzysztof.kozlowski+dt@linaro.org,
chao.wei@sophgo.com, unicorn_wang@outlook.com,
conor+dt@kernel.org, robh+dt@kernel.org, conor@kernel.org,
paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, linux-rtc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] rtc: add rtc controller support for Sophgo CV1800B SoC
Date: Wed, 29 Nov 2023 00:01:28 +0100 [thread overview]
Message-ID: <202311282301288a92d806@mail.local> (raw)
In-Reply-To: <CAJRtX8TU9Z3OXL1zw9+mGNhxugp_C2jo40k-s9V2byNCQeBoLQ@mail.gmail.com>
On 28/11/2023 21:22:52+0800, jingbao qiu wrote:
> >
> > > + ret = cv1800b_rtc_softinit(rtc);
> > > + if (ret)
> > > + goto err;
> > > + cv1800b_rtc_alarm_irq_enable(&pdev->dev, 1);
> > > + rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev);
> > > + if (IS_ERR(rtc->rtc_dev)) {
> > > + ret = PTR_ERR(rtc->rtc_dev);
> > > + goto err;
> > > + }
> > > + rtc->rtc_dev->range_max = U32_MAX;
> > > + rtc->rtc_dev->ops = &cv800b_rtc_ops;
> > > +
> > > + return rtc_register_device(rtc->rtc_dev);
>
> I find the commet of devm_rtc_device_register wirte
> “This function is deprecated, use devm_rtc_allocate_device and
> rtc_register_device instead”
> but all of code about this, they all use devm_rtc_device_register
They don't, they use devm_rtc_register_device
> function. So which one do you suggest I use?
>
> > > +err:
> > > + return dev_err_probe(&pdev->dev, ret, "Failed to init cv1800b rtc\n");
> >
> > Drop, just return.
>
> ok
>
> >
> > Best regards,
> > Krzysztof
> >
>
> Best regards,
> Jingbao Qiu
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2023-11-28 23:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-21 9:46 [PATCH 0/3] riscv: sophgo: add rtc support for CV1800B Jingbao Qiu
2023-11-21 9:46 ` [PATCH 1/3] dt-bindings: rtc: add binding for Sophgo CV1800B rtc controller Jingbao Qiu
2023-11-21 9:57 ` Krzysztof Kozlowski
2023-11-28 13:20 ` jingbao qiu
2023-11-21 10:37 ` Rob Herring
2023-11-21 9:46 ` [PATCH 2/3] rtc: add rtc controller support for Sophgo CV1800B SoC Jingbao Qiu
2023-11-21 10:01 ` Krzysztof Kozlowski
2023-11-28 13:22 ` jingbao qiu
2023-11-28 13:59 ` Krzysztof Kozlowski
2023-11-28 14:34 ` jingbao qiu
2023-11-28 23:01 ` Alexandre Belloni [this message]
2023-11-21 17:58 ` kernel test robot
2023-11-21 22:52 ` kernel test robot
2023-11-21 9:46 ` [PATCH 3/3] riscv: dts: sophgo: add rtc dt node for CV1800B Jingbao Qiu
2023-11-21 10:00 ` Krzysztof Kozlowski
2023-11-28 13:23 ` jingbao qiu
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=202311282301288a92d806@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=a.zummo@towertech.it \
--cc=aou@eecs.berkeley.edu \
--cc=chao.wei@sophgo.com \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=qiujingbao.dlmu@gmail.com \
--cc=robh+dt@kernel.org \
--cc=unicorn_wang@outlook.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).