From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41653C636D7 for ; Tue, 21 Feb 2023 18:06:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d6Svjin+XBe0fHMus0C6M6PCD8neJuFfMnzOH+cZCCM=; b=GMpV2blYO79C1l 3ncl1m5HXjQd6lp91IZwM+LpTallM0MYdjXUPymsvPuUc7j2VvcGuQUGZlBjtQrpwduwiES2Shdmz mz9clqIHmhIlFcEYBNmZZV9QluSb4B7GsIx3cS8Nb8pNcGDWeqtHaIdsiodoVpr8dYFJ9YBIIuw9B aOVaURMYgSzIAhP08TQaGjGopX+y6CcEKZFypKvumbkJ1uIsK9moa+NhWJiBdTmyYxTAbJPt/c3X+ IlCJnUQUlXDdr9UgdcbLrDAjCu2AF3OJcul1wjUa5B4CKIhTGjyzQmZwQ5AraedCPD+LIL7jAdERn F5zBp9LQfYsQtHr3L0Pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUX0l-009HIp-Em; Tue, 21 Feb 2023 18:05:07 +0000 Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUX0d-009HDm-5O for linux-arm-kernel@lists.infradead.org; Tue, 21 Feb 2023 18:05:01 +0000 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 712B260005; Tue, 21 Feb 2023 18:04:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1677002694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=th5oVun89F1CjoNpW3raiplVH4YZiPGNROtimdr74Ys=; b=PU9cgx04rXx10Nt5B3tiF7EtxoCsmUJanG451qwj5Od76mF928b3PAwxcM4FqeGKnaPLhJ jkhHHpTb6PDw+QFOcR1n7f9SpMJJ6zbG7FMreUMf/xN0peoVs3uGTMJA7OH5DzphbG4heW XEw3ZLmLdmi2omm5HbDj4tTsU/xbjNsXiTWCXqGtXMIN6gkjYDbCDOIYiF507ZqHeJAK9A T1p6zq7m1jZ2NKnJ2X0wTvmQw+ywN82wG1tHiSuIsOppy9RU+0v8DDAbeRs4TlOtY5MPjd HkTtjuY1KU5zFYGBUYE8NWdWtJrG6zgkJonzIcmUUXFfsGVu3UddvpbgZqqPwA== Date: Tue, 21 Feb 2023 19:04:51 +0100 From: Alexandre Belloni To: Jacky Bai 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 Message-ID: References: <20230215024117.3357341-1-ping.bai@nxp.com> <20230215024117.3357341-3-ping.bai@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230221_100459_379529_E350C891 X-CRM114-Status: GOOD ( 17.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > > Reviewed-by: Peng Fan > Acked-by: Alexandre Belloni > 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