All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Jacky Bai <ping.bai@nxp.com>
Cc: lee@kernel.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org,
	s.hauer@pengutronix.de, dmitry.torokhov@gmail.com,
	a.zummo@towertech.it, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-input@vger.kernel.org, linux-rtc@vger.kernel.org,
	kernel@pengutronix.de, linux-imx@nxp.com, festevam@gmail.com
Subject: Re: [PATCH v5 2/3] rtc: bbnsm: Add the bbnsm rtc support
Date: Tue, 21 Feb 2023 19:04:51 +0100	[thread overview]
Message-ID: <Y/UHw2Q0FL9zlfFk@mail.local> (raw)
In-Reply-To: <Y/UG7LT6e7+UySRs@mail.local>

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.

> > +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.

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

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

WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Jacky Bai <ping.bai@nxp.com>
Cc: lee@kernel.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org,
	s.hauer@pengutronix.de, dmitry.torokhov@gmail.com,
	a.zummo@towertech.it, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-input@vger.kernel.org, linux-rtc@vger.kernel.org,
	kernel@pengutronix.de, linux-imx@nxp.com, festevam@gmail.com
Subject: Re: [PATCH v5 2/3] rtc: bbnsm: Add the bbnsm rtc support
Date: Tue, 21 Feb 2023 19:04:51 +0100	[thread overview]
Message-ID: <Y/UHw2Q0FL9zlfFk@mail.local> (raw)
In-Reply-To: <Y/UG7LT6e7+UySRs@mail.local>

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.

> > +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.

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

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-02-21 18:05 UTC|newest]

Thread overview: 24+ 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 ` Jacky Bai
2023-02-15  2:41 ` [PATCH v5 1/3] input: bbnsm_pwrkey: Add bbnsm power key support Jacky Bai
2023-02-15  2:41   ` Jacky Bai
2023-02-21 22:45   ` Dmitry Torokhov
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-15  2:41   ` Jacky Bai
2023-02-21 18:01   ` Alexandre Belloni
2023-02-21 18:01     ` Alexandre Belloni
2023-02-21 18:04     ` Alexandre Belloni [this message]
2023-02-21 18:04       ` Alexandre Belloni
2023-02-22  7:09       ` Jacky Bai
2023-02-22  7:09         ` Jacky Bai
2023-02-22 11:26   ` (subset) " Alexandre Belloni
2023-02-22 11:26     ` Alexandre Belloni
2023-02-15  2:41 ` [PATCH v5 3/3] arm64: dts: imx93: Add the bbnsm dts node Jacky Bai
2023-02-15  2:41   ` Jacky Bai
2023-03-08  9:58   ` Jacky Bai
2023-03-08  9:58     ` Jacky Bai
2023-03-08 10:32     ` Alexander Stein
2023-03-08 10:32       ` Alexander Stein
2023-03-14  1:01   ` Shawn Guo
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=Y/UHw2Q0FL9zlfFk@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=a.zummo@towertech.it \
    --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=ping.bai@nxp.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.