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 22EF6C636D7 for ; Tue, 21 Feb 2023 18:02:23 +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=aDVopmghrsMLLlQ0elBAMPyQSfVhiaHvbEfJueTYMsE=; b=gOpr4/BrCxH7Ry eQ1gex5EWKof/8Etp04obzY82oqmqmKpxBpbsYOwXOriCGqeIqaQJF3WVkDSThyGqMt6zp1zXzfNN GNRRC1rWlIO2KGCS80NRCDh6X1kIdwonOmKe9YhydF407uZpxhndLeOKk1vM6dlBnG1MeMNEtk1ZR Q48PJSSjZqbcYwQ96XZS2Ooja181ghszVGdkar408qSOhB/qfuvaQgG85rHNjarub8UqLe3n2eH3Y YinecoILGsbRTdp2/hegKnaXh6x7+VVqG5ib9o9yL7x5SHlHI8xSes+/CZ8963ivqPpSfoeK6VS0E a4lFABjIGQ4tf642SUqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUWxH-009GRg-0j; Tue, 21 Feb 2023 18:01:31 +0000 Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUWxC-009GQD-JY for linux-arm-kernel@lists.infradead.org; Tue, 21 Feb 2023 18:01:29 +0000 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 7AEC54000A; Tue, 21 Feb 2023 18:01:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1677002479; 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=Dl/vHzsChoRqURGkFf3UDkzsWYJfRyvJJaZzJSZYqoQ=; b=PMGa1G918k2xKC5oHsniJ3R27Sw2TLgPKt2QohT6f9QBB/FLLtG9/6y+5uIaStrAoyI0pI 9eLkvDFFNilMUk0/amdPVYPkhCFV16/2Nbo61mByNbMklUsTJE/QIfjyaPXGnJZG/IM4+Y MSoPM7jS/PvHXxmudBzAWhcy2zRt+urlXiDaOu3jwvTtPqOEu4uNVrNf+3s5VFaq9YXecv 3ihm49kaq6sMeEiB7yVQxGTKpn30DPaNLo+KzRE/2Y/NRd7w/m92SySr/SB79GRX/lYrPC bnlv4P2km6sFon8aXVjKKFGYGU12D4yu+zRpn6eIJTfjWJDlU9gh3VYjMsQRtg== Date: Tue, 21 Feb 2023 19:01:16 +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: <20230215024117.3357341-3-ping.bai@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230221_100126_845383_5CD657B7 X-CRM114-Status: GOOD ( 13.98 ) 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 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 > +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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel