Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp79758rwo; Tue, 1 Aug 2023 13:15:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlEmBFjHtJMhJB8AJScvNsYUqe1U3yFLGQOlDMXSpcTcBjF6r57AcxPGL0xqWzwbgNojRu3b X-Received: by 2002:a17:903:2308:b0:1b9:f97a:16ab with SMTP id d8-20020a170903230800b001b9f97a16abmr13630703plh.57.1690920937936; Tue, 01 Aug 2023 13:15:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690920937; cv=none; d=google.com; s=arc-20160816; b=pH7YSDvqTE4ZH/r3sXXFvnO2ryYQSh5oIMO/yia0tU0Amwpj5xmDtmtlwk/6gTZiNF XEN21NfNJ40VgET8b/drtlPwZoPqWIUQzulKMSlHC67qPLK3eNhjPgGuZGZdHvZqbT4c R7AVSpuXyYMrPoMbYjbrCkm/DsDbFfutvrzm5Bg0piWwvyxU2pD0+FBeN25x4YZiTT7/ /91ogBrnd1xBSErLY5+3/Pt0+5f65HfFIwH6NNHtfLpLKe40YeYKsJqTtq4J1UN8E19y LRTEywaOse4YH+hEobsA1amaVHNSulmFUf/1iJtucTjh4s+KRbn42JUMvDHfL7KAWOR9 bqmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BsYpmsk5UXxFoIUW2ui+3iBsF8PIHOr5des5QvHo2w4=; fh=+EZ4p/ytwqKjs/z2XfavVbASIvnJoW9RJ1x7HvdECf0=; b=FhyK4M6/5amMbl+fTTwlLOBFsEoGDFG+44mPbLKtfOIvJx+6kyHR3q4In8/YQ/zSZF VlMbr12/KY8uRK4SsHCF6vofyV8bkLjF4s6Cq9YbdZrzitHC6DKmlu42sv1Wdr1XLWDW gEolpCu4D5p6TEh45Y4fWxANF3vT1H00hwGF9gcMJqErH9m5LADfFX4KAlj/ZnRqbKpi dIZ7vSbwCANsSW+Qc3vGhS+6fYG3JRX4KJ3DBk/+VXfC/RTzdVYDQktH2fTOD4eMoWOZ YAb1u9apIab9eNPnd4EYmlBfxLWPLs5/IJsYbQtmLI0kBIgPatGquLjPTv7tkwllluQY ASFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kTGR30K5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020a1709029a8500b001b886a0c366si921102plp.122.2023.08.01.13.15.24; Tue, 01 Aug 2023 13:15:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kTGR30K5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232445AbjHATeN (ORCPT + 99 others); Tue, 1 Aug 2023 15:34:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230113AbjHATeN (ORCPT ); Tue, 1 Aug 2023 15:34:13 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A60C19A4; Tue, 1 Aug 2023 12:34:10 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id AE02EE0004; Tue, 1 Aug 2023 19:34:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1690918449; 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=BsYpmsk5UXxFoIUW2ui+3iBsF8PIHOr5des5QvHo2w4=; b=kTGR30K5YlIqYQjlZVe28aIOphjUiaPR05EgNKnNa0WmHNs83me4W5MpLVyYSjiFNo/O4I q28U+6wAwYYBeDFEwEG7YIv8JqTRaundDKZM3Qz/+9qCwYXftrBhgDkg/V6xD8jendZ/7N caplCwauTjIX44It3QZEja95qpYOKcxxey3QEKkb5rZw59n26vOf6I11Ctw+yUgkB2d7jw vkw2hAqeECUmuC48MDLWzDd4iOwm9px2Q4zHkgORa6XUA9b1gyomrchiz6J9lCzGE5J6ux wWBvZd2nAycnkslyYActplp/OxrXf1o/VKxAOHmkl/IJL9QMmHAx3SBHHN0Qig== Date: Tue, 1 Aug 2023 21:34:08 +0200 From: Alexandre Belloni To: Anvesh Jain P Cc: Alessandro Zummo , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, Venkata Rao Kakani Subject: Re: [PATCH] rtc: rtc-pm8xxx: control default alarm wake up capability Message-ID: <202308011934080c7083b9@mail.local> References: <20230801114549.26956-1-quic_ajainp@quicinc.com> <20230801124056fc665814@mail.local> <93722831-dc83-8ea3-4af9-33eaefcf81be@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <93722831-dc83-8ea3-4af9-33eaefcf81be@quicinc.com> X-GND-Sasl: alexandre.belloni@bootlin.com X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/08/2023 18:18:46+0530, Anvesh Jain P wrote: > In automotive systems, RTC should not wake up the device when it is parked > or when it is garage to avoid leakage current. providing a control from > device tree to avoid RTC wake up based on the use case is reason for this > patch. > Then simply avoid providing an IRQ or setting an alarm. > On 8/1/2023 6:10 PM, Alexandre Belloni wrote: > > On 01/08/2023 17:15:49+0530, Anvesh Jain P wrote: > > > Enable & disable rtc alarm wake up capability based on > > > default parameter passed from device tree. > > > > > > > I see what you are doing but not why this is necessary, NAK. > > > > > Signed-off-by: Venkata Rao Kakani > > > Signed-off-by: Anvesh Jain P > > > --- > > > drivers/rtc/rtc-pm8xxx.c | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c > > > index f6b779c12ca7..bed57be602b6 100644 > > > --- a/drivers/rtc/rtc-pm8xxx.c > > > +++ b/drivers/rtc/rtc-pm8xxx.c > > > @@ -523,6 +523,9 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) > > > if (rc) > > > return rc; > > > + if (of_property_read_bool(pdev->dev.of_node, "disable-alarm-wakeup")) > > > + device_set_wakeup_capable(&pdev->dev, false); > > > + > > > rc = dev_pm_set_wake_irq(&pdev->dev, rtc_dd->alarm_irq); > > > if (rc) > > > return rc; > > > > > > base-commit: 0a8db05b571ad5b8d5c8774a004c0424260a90bd > > > -- > > > 2.17.1 > > > > > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com