Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5AE2C4360F for ; Wed, 3 Apr 2019 04:27:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 92830206C0 for ; Wed, 3 Apr 2019 04:27:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dETtsbPx"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ti.com header.i=@ti.com header.b="dn7wjlal" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92830206C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8toikU/gFFCos1TI8fKGPtqLIzb/oXhKx79yg78OtbY=; b=dETtsbPxTWs1i5MelCvG2bFPz zS7h1DmZqt1mslS3qr6li2twAVBMiB/R2YOSvfAOguyelrrnlVYVXpvkhvOO9T0/3y30anmWAy+UX oGvXHqBLdtRnJA2Pmn0EGFFc5Ciegu9QFyUFRNECzMeYbzU8XRHXwhCAzgHpqa3ophxh4/e+eBgQz BwIdZkJq1LCCZ4QrU7gCatH91mdgQpWf3c04LcXArnU/oATya5y7jYslmBap42QXK9QgPw8gV3fa+ JzC85t8S1WlvSRWKvzDV27J12mXxG8m2qNlnKgtZFfJzdxMp3m5KTIuLPY4M6bK+BobIra0emBTf/ xiAEkTsnA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBXUk-0001jt-CV; Wed, 03 Apr 2019 04:27:26 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBXUh-0001ja-Me for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2019 04:27:25 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x334RBnK114477; Tue, 2 Apr 2019 23:27:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554265631; bh=2rxWI6hP/lVz3GN/7z3TBLQs+geIkYSvd2Ea3AtbD+s=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=dn7wjlalo3HuGo3R27VaNzOwIrJp4AnrRWGQqBLPT/NlF5jXex2dVWYnpB+UH01jo MZx5D+CfmrgENT1sgO4U9x1xTQMYWxUz7JP8PxDFpLlNXM9LY9imBOTymqrTY9LA/l Y/SJGPqOJbzRCoHyF9WazhXsbQ6xU5MN2xDnJTTg= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x334RBJc005181 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 2 Apr 2019 23:27:11 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 2 Apr 2019 23:27:11 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 2 Apr 2019 23:27:11 -0500 Received: from [172.24.191.45] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x334R8Jm126446; Tue, 2 Apr 2019 23:27:08 -0500 Subject: Re: [PATCH v2 2/5] rtc: interface: Add power_off_program to rtc_class_ops To: Alexandre Belloni , Tony Lindgren References: <20190402034253.4928-1-j-keerthy@ti.com> <20190402034253.4928-3-j-keerthy@ti.com> <20190402173232.GP49658@atomide.com> <20190402210742.GH22216@piout.net> From: Keerthy Message-ID: <0c362e51-caaf-b282-6169-1deab7b18409@ti.com> Date: Wed, 3 Apr 2019 09:57:35 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190402210742.GH22216@piout.net> Content-Language: en-US X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190402_212723_865190_CAFC546F X-CRM114-Status: GOOD ( 19.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rtc@vger.kernel.org, a.zummo@towertech.it, d-gerlach@ti.com, t-kristo@ti.com, ssantosh@kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 03/04/19 2:37 AM, Alexandre Belloni wrote: > On 02/04/2019 10:32:32-0700, Tony Lindgren wrote: >> * Keerthy [190402 03:43]: >>> Add an interface function to set up the rtc for a power_off >>> mode. >>> >>> Signed-off-by: Keerthy >>> --- >>> drivers/rtc/interface.c | 12 ++++++++++++ >>> drivers/rtc/rtc-omap.c | 1 + >>> include/linux/rtc.h | 2 ++ >>> 3 files changed, 15 insertions(+) >>> >>> diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c >>> index ccb7d6b4da3b..4846ec897067 100644 >>> --- a/drivers/rtc/interface.c >>> +++ b/drivers/rtc/interface.c >>> @@ -1070,3 +1070,15 @@ int rtc_set_offset(struct rtc_device *rtc, long offset) >>> trace_rtc_set_offset(offset, ret); >>> return ret; >>> } >>> + >>> +/** >>> + * rtc_power_off_program - Some of the rtc are hooked on to PMIC_EN >>> + * line and can be used to power off the SoC. >>> + * >>> + * Kernel interface to program rtc to power off >>> + */ >>> +int rtc_power_off_program(struct rtc_device *rtc) >>> +{ >>> + return rtc->ops->power_off_program(rtc->dev.parent); >>> +} >>> +EXPORT_SYMBOL_GPL(rtc_power_off_program); >> >> This whole series looks OK to me. Not sure about the naming for >> rtc_power_off_program(), would rtc_power_off_device() be more >> generic? >> > > Well, even if this is more generic, this feels way too ad-hoc to me. > The series is adding a function and a callback to the core for, from > what I understand, only one particular board. > > You may as well simply export the function directly from the rtc-omap > driver as anyway, this is added as a dependency in the last patch. > > Something else I would be open to but I'm not completely sure this fits > your use case is a new interface that would take an alarm index as a > parameter to allow setting any alarm on the RTC. This would at least be > usable for multiple other drivers. Agreed that this is pretty specific to am43 as of now. As you suggested i will export out omap_rtc_poweroff_program. I will post v3 with the interface patch removed. Thanks for your feedback. > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel