Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp364660ybe; Mon, 2 Sep 2019 02:55:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJRVkd+M920NPa3O9r/SMIJd4ZUROOF8sH8X3ZWDVSqsL7ggt2zSJKKuiniefOIxZkbdXR X-Received: by 2002:a62:cdc3:: with SMTP id o186mr33627642pfg.168.1567418116729; Mon, 02 Sep 2019 02:55:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567418116; cv=none; d=google.com; s=arc-20160816; b=s7RIRNk5bNCzX6Zw09iRrJey0LxYzi+dFabSPoCugwOdRavXsvAXjiKaKW46ZNZkq2 0z/XOTUV5omMghxvkX2KV9hnUP7O1s5GlAGpckM1U/2iCDnfigCEstnmOqIez+kxIDxP G7QymeGnYIENwbHWY7gla7ci2E3PcCAN9DpPoxbGBFWYc7nE0s9gaCx7uyyLpEIFTdRA VLd7dgxypE/b7Ywk+NSx8o7cBdA+cDfkPh+q9aVmWm+9Wm1DBV63YAd5X6hZ019oAM3f KgVMqtqgWvdMMHoI9kp2/81BJkLT3DSRtHeDQf7HW0JFGZadCJ1WetWxZipwmYJZNpzW h3nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=d0Fmd8+tPhsncECjkpyfN40FKyAZ9dwp7GhgzrHppXE=; b=Oqacfzf+3xGQC9CsflaEH34/dgb1B+k3cKIkF76yrl82Qmd7VEpo9Ak0CkIf5YBe0Z +ceyPe3f8vwjkMTesNrQhVpeqyA2JYPIuPICE86hTmbUAISSq14u7O0JwCv1SvHj6HUp lGX7gaJgLu2mp/v93+LpwzJgaOgeFOXVHd31PaspM/xDR0G4d8OzynAWlb/rC53aIlOE G487dDupbYxA5/OUO6EwLPc2LUzGCgrpHwuyLvkwYhdUC6J3rxlaAQGHd9uuiFj7KpYX Hokv/vwd/mi1J+afsTzY56fwwt0L2dqA0YM/i42JjBIHF0brsR0l4ANaYbSACL5Fb49N lWjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qVngIIwu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s2si11623566pji.79.2019.09.02.02.55.01; Mon, 02 Sep 2019 02:55:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qVngIIwu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730925AbfIBJrF (ORCPT + 99 others); Mon, 2 Sep 2019 05:47:05 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51922 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730287AbfIBJrF (ORCPT ); Mon, 2 Sep 2019 05:47:05 -0400 Received: by mail-wm1-f68.google.com with SMTP id k1so13814652wmi.1 for ; Mon, 02 Sep 2019 02:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=d0Fmd8+tPhsncECjkpyfN40FKyAZ9dwp7GhgzrHppXE=; b=qVngIIwui1J9tByelwV/mGZbVHFBFHyDB8d+zUgLu3YBU/pt2PyBLaNu6aJVP3PZu+ ihkRHhUgNreGoIsCbkx1FNEXIz6W3YzxsPtykCOFZra1Ph5YrfDGBk5pUhNPXnyQhdOw D9ABWajSIFLGxjIDL3ZgE8fjcP4o/qvxAq8ScG/ooH2FuTnduj/fyZWm7jHaTjH42E/D Ei0dGMTfBr8owiAqXxN0DezEgPDMt9Z1EvGzVnLLyrgPVWZ3lXxJ9oZIffCqMvqKZt1l C76KOLTdO84oTFmQbF26UtdsQg6gT2TxP7R0Ue3uQ2+bt919+f7rtplpS6l1WtkiwEYy +qOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=d0Fmd8+tPhsncECjkpyfN40FKyAZ9dwp7GhgzrHppXE=; b=qAzxvc9XFAOtETWeA7sZ1RqJ+0/063i2Lwujf4TP9cZ82lwfqU02dYPfJww+wGF8tO GS3sJzDduLOK5z3qstzDScj3RwyTGlKzP3OUm9fcrQ+qpARqrnVgiu0fSZYGl8JgQT9d gPpiKrLYlpfQ3s4XYmND+YYohALIzR9ZhxjKqjQ5QeSWAngjFBBXFNr8WXdHb3TiyW+u J4Xi9BQwl2LqinXp1sE+JUU3EnwFpsJcCwV9KfDcDjAYNLpR5Ny66Kbwbc8zdyvb6Lkp zY9BH1ZzUZDUURs8nQvll2do1O1UCrmYpd87ryYJVo/4jB9MQO0tc2whQwxH71QDKqyG VXnA== X-Gm-Message-State: APjAAAWH6eQQ/CfsnF5w/s2KVLK+GSoFHfVqtDblG7BOAaBr6xvCQioT Tv8xybt7bDPi3a1ZC6xiwIvzpg== X-Received: by 2002:a1c:f106:: with SMTP id p6mr31938241wmh.148.1567417622917; Mon, 02 Sep 2019 02:47:02 -0700 (PDT) Received: from dell ([95.147.198.93]) by smtp.gmail.com with ESMTPSA id b18sm18199417wro.34.2019.09.02.02.47.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Sep 2019 02:47:02 -0700 (PDT) Date: Mon, 2 Sep 2019 10:47:00 +0100 From: Lee Jones To: Frank Wunderlich Cc: linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, "linux-arm-kernel @ lists . infradead . org Alessandro Zummo" , Alexandre Belloni , Eddie Huang , Josef Friedl , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, Mark Rutland , Matthias Brugger , Rob Herring , Sean Wang , Sebastian Reichel , Tianping Fang Subject: Re: [PATCH v6 05/13] rtc: mt6397: move some common definitions into rtc.h Message-ID: <20190902094700.GS32232@dell> References: <20190818135611.7776-1-frank-w@public-files.de> <20190818135611.7776-6-frank-w@public-files.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190818135611.7776-6-frank-w@public-files.de> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 18 Aug 2019, Frank Wunderlich wrote: > From: Josef Friedl > > move code to separate header-file to reuse definitions later > in poweroff-driver (drivers/power/reset/mt6323-poweroff.c) > > Suggested-by: Frank Wunderlich > Signed-off-by: Josef Friedl > Signed-off-by: Frank Wunderlich > --- > changes since v5: none > changes since v4: none > changes since v3: none > changes since v2: add missing commit-message > --- > drivers/rtc/rtc-mt6397.c | 55 +------------------------- > include/linux/mfd/mt6397/rtc.h | 71 ++++++++++++++++++++++++++++++++++ > 2 files changed, 72 insertions(+), 54 deletions(-) > create mode 100644 include/linux/mfd/mt6397/rtc.h > > diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c > index b46ed4dc7015..c08ee5edf865 100644 > --- a/drivers/rtc/rtc-mt6397.c > +++ b/drivers/rtc/rtc-mt6397.c > @@ -9,60 +9,7 @@ > #include > #include > #include > -#include > -#include > -#include > -#include > -#include > -#include > - > -#define RTC_BBPU 0x0000 > -#define RTC_BBPU_CBUSY BIT(6) > - > -#define RTC_WRTGR 0x003c > - > -#define RTC_IRQ_STA 0x0002 > -#define RTC_IRQ_STA_AL BIT(0) > -#define RTC_IRQ_STA_LP BIT(3) > - > -#define RTC_IRQ_EN 0x0004 > -#define RTC_IRQ_EN_AL BIT(0) > -#define RTC_IRQ_EN_ONESHOT BIT(2) > -#define RTC_IRQ_EN_LP BIT(3) > -#define RTC_IRQ_EN_ONESHOT_AL (RTC_IRQ_EN_ONESHOT | RTC_IRQ_EN_AL) > - > -#define RTC_AL_MASK 0x0008 > -#define RTC_AL_MASK_DOW BIT(4) > - > -#define RTC_TC_SEC 0x000a > -/* Min, Hour, Dom... register offset to RTC_TC_SEC */ > -#define RTC_OFFSET_SEC 0 > -#define RTC_OFFSET_MIN 1 > -#define RTC_OFFSET_HOUR 2 > -#define RTC_OFFSET_DOM 3 > -#define RTC_OFFSET_DOW 4 > -#define RTC_OFFSET_MTH 5 > -#define RTC_OFFSET_YEAR 6 > -#define RTC_OFFSET_COUNT 7 > - > -#define RTC_AL_SEC 0x0018 > - > -#define RTC_PDN2 0x002e > -#define RTC_PDN2_PWRON_ALARM BIT(4) > - > -#define RTC_MIN_YEAR 1968 > -#define RTC_BASE_YEAR 1900 > -#define RTC_NUM_YEARS 128 > -#define RTC_MIN_YEAR_OFFSET (RTC_MIN_YEAR - RTC_BASE_YEAR) > - > -struct mt6397_rtc { > - struct device *dev; > - struct rtc_device *rtc_dev; > - struct mutex lock; > - struct regmap *regmap; > - int irq; > - u32 addr_base; > -}; > +#include > > static int mtk_rtc_write_trigger(struct mt6397_rtc *rtc) > { > diff --git a/include/linux/mfd/mt6397/rtc.h b/include/linux/mfd/mt6397/rtc.h > new file mode 100644 > index 000000000000..b702c29e8c74 > --- /dev/null > +++ b/include/linux/mfd/mt6397/rtc.h > @@ -0,0 +1,71 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright (C) 2014-2018 MediaTek Inc. This is out of date. Once corrected, please apply my: For my own reference: Acked-for-MFD-by: Lee Jones -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog