From: Jacky Bai <ping.bai@nxp.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: "lee@kernel.org" <lee@kernel.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
"a.zummo@towertech.it" <a.zummo@towertech.it>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
dl-linux-imx <linux-imx@nxp.com>,
"festevam@gmail.com" <festevam@gmail.com>
Subject: RE: [PATCH v5 2/3] rtc: bbnsm: Add the bbnsm rtc support
Date: Wed, 22 Feb 2023 07:09:59 +0000 [thread overview]
Message-ID: <AS8PR04MB8642279B6FEF4D239AB927BA87AA9@AS8PR04MB8642.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <Y/UHw2Q0FL9zlfFk@mail.local>
Hi Alexandre,
> Subject: Re: [PATCH v5 2/3] rtc: bbnsm: Add the bbnsm rtc support
>
> On 21/02/2023 19:01:16+0100, Alexandre Belloni wrote:
> > On 15/02/2023 10:41:16+0800, Jacky Bai wrote:
> > > The BBNSM module includes a real time counter with alarm.
> > > Add a RTC driver for this function.
> > >
> > > Signed-off-by: Jacky Bai <ping.bai@nxp.com>
> > > Reviewed-by: Peng Fan <peng.fan@nxp.com>
> > Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> >
>
> Actually, as there is no dependency anymore, I'm going to apply that directly.
>
Do I need to resend or you will directly apply this V5 patch?
BR
> > > +static int bbnsm_rtc_probe(struct platform_device *pdev) {
> > > + struct device_node *np = pdev->dev.of_node;
> > > + struct bbnsm_rtc *bbnsm;
> > > + int ret;
> > > +
> > > + bbnsm = devm_kzalloc(&pdev->dev, sizeof(*bbnsm), GFP_KERNEL);
> > > + if (!bbnsm)
> > > + return -ENOMEM;
> > > +
> > > + bbnsm->rtc = devm_rtc_allocate_device(&pdev->dev);
> > > + if (IS_ERR(bbnsm->rtc))
> > > + return PTR_ERR(bbnsm->rtc);
> > > +
> > > + bbnsm->regmap = syscon_node_to_regmap(np->parent);
> > > + if (IS_ERR(bbnsm->regmap)) {
> > > + dev_dbg(&pdev->dev, "bbnsm get regmap failed\n");
> > > + return PTR_ERR(bbnsm->regmap);
> > > + }
> > > +
> > > + bbnsm->irq = platform_get_irq(pdev, 0);
> > > + if (bbnsm->irq < 0)
> > > + return bbnsm->irq;
> > > +
> > > + platform_set_drvdata(pdev, bbnsm);
> > > +
> > > + /* clear all the pending events */
> > > + regmap_write(bbnsm->regmap, BBNSM_EVENTS, 0x7A);
> > > +
> > > + device_init_wakeup(&pdev->dev, true);
> > > + dev_pm_set_wake_irq(&pdev->dev, bbnsm->irq);
> > > +
> > > + ret = devm_request_irq(&pdev->dev, bbnsm->irq,
> bbnsm_rtc_irq_handler,
> > > + IRQF_SHARED, "rtc alarm", &pdev->dev);
> >
> > This is not properly aligned, you can fix that if you ever have to
> > resend.
>
> >
> >
> > --
next prev parent reply other threads:[~2023-02-22 7:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 2:41 [PATCH v5 0/3] Add nxp bbnsm module support Jacky Bai
2023-02-15 2:41 ` [PATCH v5 1/3] input: bbnsm_pwrkey: Add bbnsm power key support Jacky Bai
2023-02-21 22:45 ` Dmitry Torokhov
2023-02-15 2:41 ` [PATCH v5 2/3] rtc: bbnsm: Add the bbnsm rtc support Jacky Bai
2023-02-21 18:01 ` Alexandre Belloni
2023-02-21 18:04 ` Alexandre Belloni
2023-02-22 7:09 ` Jacky Bai [this message]
2023-02-22 11:26 ` (subset) " Alexandre Belloni
2023-02-15 2:41 ` [PATCH v5 3/3] arm64: dts: imx93: Add the bbnsm dts node Jacky Bai
2023-03-08 9:58 ` Jacky Bai
2023-03-08 10:32 ` Alexander Stein
2023-03-14 1:01 ` Shawn Guo
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=AS8PR04MB8642279B6FEF4D239AB927BA87AA9@AS8PR04MB8642.eurprd04.prod.outlook.com \
--to=ping.bai@nxp.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/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).