Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1618772ybl; Sun, 18 Aug 2019 07:06:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzW1atS+13pVoIDIcMBD8V01th3AaYvJM622TCpmXYeOswThm7TgnZj3Q2dG6MPTehY7D8c X-Received: by 2002:a17:902:a409:: with SMTP id p9mr18369419plq.218.1566137170630; Sun, 18 Aug 2019 07:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566137170; cv=none; d=google.com; s=arc-20160816; b=JDTukbqDRni/UKffZAugk1mm05EZ6wrNzjzCDNMmIEG0Bi3c+HtC43YFTFVQkJj2r3 OOC9h4IeFoxWCcF6d61LxPUS7tS0NOgQH4b8uh6cvNmC3/Lpcoc3C+LeUAWLLw7E08Sx ja9epSI4AvN7yFrRAoXSeYyq4tJHb6Gxkxf7dqyZ7mYZ7YicWfaP9wUCjcBoUV6J60+G fCotXBeEpQaOIJsWS6SfijIJOYvUPZBpi5OvISwaj91GhWyKDZUXltgVCPlSGzhnKHJY ZqnwPTJSObvSqk/W/PoHL1HxjEdG+eGW6f/d/HjiLFvmRsFUrBIINs3tiaefZqqKdGzO JdpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=oiISJi2AxN6/lUqPwn1vVJk680FCFgBhj8bdO+/7QjI=; b=G+bFH6btNDsff0ZDZSVKkeo+Kw4zVs0RMP8fhURyf0iwS/KSBo/C33gzSRpkj2Auqb F0DKG4dm69publWkTR1BSLOE3gPnppZ4zMU0shZ4nARO+Gz+nGHSiAe2Jm9tfP4BPaCq N1nuFkWik+TlyFL1dRdyiyc7zohM9YdoF35LlsEfLbcc+cUFhyL/AiEDAukTJ6YXIdB7 ypnVD5gGnf0dFXl/xTcS/IakeZTb6YeuqUBjImNeAgFrT7QvY8TAdyBtN0+gK12m6nsH jQsYFUOmvIQvdn4WN9ehmi+okZYyeOCmYwhMhVAq26AWLHmRHqlDoTE1EeT6WQpM8mk4 Uaow== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az4si6916776pjb.99.2019.08.18.07.05.56; Sun, 18 Aug 2019 07:06:10 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727011AbfHROEp (ORCPT + 99 others); Sun, 18 Aug 2019 10:04:45 -0400 Received: from mxwww.masterlogin.de ([95.129.51.220]:43034 "EHLO mxwww.masterlogin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726817AbfHROE0 (ORCPT ); Sun, 18 Aug 2019 10:04:26 -0400 Received: from mxout1.routing.net (unknown [192.168.10.81]) by new.mxwww.masterlogin.de (Postfix) with ESMTPS id 7FA6696DFB; Sun, 18 Aug 2019 13:56:30 +0000 (UTC) Received: from mxbox3.masterlogin.de (unknown [192.168.10.253]) by mxout1.routing.net (Postfix) with ESMTP id BF88743D5A; Sun, 18 Aug 2019 13:56:30 +0000 (UTC) Received: from localhost.localdomain (fttx-pool-185.53.43.183.bambit.de [185.53.43.183]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id EAAAC36043A; Sun, 18 Aug 2019 15:56:29 +0200 (CEST) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , devicetree@vger.kernel.org, "linux-arm-kernel @ lists . infradead . org Alessandro Zummo" , Alexandre Belloni , Eddie Huang , Josef Friedl , Lee Jones , 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: [PATCH v6 10/13] mfd: mt6323: add mt6323 rtc+pwrc Date: Sun, 18 Aug 2019 15:56:08 +0200 Message-Id: <20190818135611.7776-11-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190818135611.7776-1-frank-w@public-files.de> References: <20190818135611.7776-1-frank-w@public-files.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Josef Friedl add entry for rtc and power-controller to mt6323 Signed-off-by: Josef Friedl Signed-off-by: Frank Wunderlich Acked-for-MFD-by: Lee Jones --- changes since v5: none changes since v4: none changes since v3: none changes since v2: only splitting, second part of v2 part 4 --- drivers/mfd/mt6397-core.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index c9a81087fa55..5916978a8feb 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -16,13 +16,24 @@ #include #include +#define MT6323_RTC_BASE 0x8000 +#define MT6323_RTC_SIZE 0x40 + #define MT6397_RTC_BASE 0xe000 #define MT6397_RTC_SIZE 0x3e +#define MT6323_PWRC_BASE 0x8000 +#define MT6323_PWRC_SIZE 0x40 + #define MT6323_CID_CODE 0x23 #define MT6391_CID_CODE 0x91 #define MT6397_CID_CODE 0x97 +static const struct resource mt6323_rtc_resources[] = { + DEFINE_RES_MEM(MT6323_RTC_BASE, MT6323_RTC_SIZE), + DEFINE_RES_IRQ(MT6323_IRQ_STATUS_RTC), +}; + static const struct resource mt6397_rtc_resources[] = { DEFINE_RES_MEM(MT6397_RTC_BASE, MT6397_RTC_SIZE), DEFINE_RES_IRQ(MT6397_IRQ_RTC), @@ -38,8 +49,17 @@ static const struct resource mt6397_keys_resources[] = { DEFINE_RES_IRQ(MT6397_IRQ_HOMEKEY), }; +static const struct resource mt6323_pwrc_resources[] = { + DEFINE_RES_MEM(MT6323_PWRC_BASE, MT6323_PWRC_SIZE), +}; + static const struct mfd_cell mt6323_devs[] = { { + .name = "mt6323-rtc", + .num_resources = ARRAY_SIZE(mt6323_rtc_resources), + .resources = mt6323_rtc_resources, + .of_compatible = "mediatek,mt6323-rtc", + }, { .name = "mt6323-regulator", .of_compatible = "mediatek,mt6323-regulator" }, { @@ -50,6 +70,11 @@ static const struct mfd_cell mt6323_devs[] = { .num_resources = ARRAY_SIZE(mt6323_keys_resources), .resources = mt6323_keys_resources, .of_compatible = "mediatek,mt6323-keys" + }, { + .name = "mt6323-pwrc", + .num_resources = ARRAY_SIZE(mt6323_pwrc_resources), + .resources = mt6323_pwrc_resources, + .of_compatible = "mediatek,mt6323-pwrc" }, }; -- 2.17.1