Received: by 10.213.65.68 with SMTP id h4csp187167imn; Fri, 23 Mar 2018 02:21:42 -0700 (PDT) X-Google-Smtp-Source: AG47ELu4gEbo/N3hOH0eK8XdaqrDbxzYkv08NR2VfNIAjXi3zDJwOhxy5SqNI85vZDtx1oMai5Gr X-Received: by 10.99.188.9 with SMTP id q9mr17319097pge.381.1521796902270; Fri, 23 Mar 2018 02:21:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521796902; cv=none; d=google.com; s=arc-20160816; b=d/5KE5Uk1WkxDMWx/I0DxDotUtxIaLPJsKrRvZDf8IZvMh6ixhgnwatHgOURNqIpJz dEru+Y9vZx8fIRvTZWo+NjHWwdaE6EJCa1tALf2q6yyKuR/ShwViozaOgxAhasCH/2x5 GYistjZWZnzVDKxauei+/su6dOKAOkUNy9mJwXT89YH7MxQT3PMFc2Afk2lNn/31nmVd +2cT8AyPtBTl+DZfR+92HgVgp5DkC4QXVBvU2p4JPco+JVMcUvrLaEarralCJzF837/c blvTjZ/M6Y6f8u5ecJqhNRz7hCGMTTFB2uJIBzLQULb5J7rXDZXRvruYTCBtFk65ESzm p/0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=kQ77vWn66RmBH+BV+59bzC7nPx12Qcj/Di0ctIgIQEc=; b=NGpvERbbI96D9amEEEeFJAyI+sMPtE4c0c1YcuiUGJHEHOav5b+xADSQRYi2PZ0oX7 inJllVrLY948GB5aOaL9FX4DoGFeoqzBZAXpkTPTSHofySXNIM0Vf+vUdZz8ufWgR4xL vIiqlrvRzwje6tIQVAA8hQwKbmlE/ghZhIEUYXdIkF+ndaz6JuK0DkoPpqeWJHoj1YHs IdZ3RWD1y+ZSZ0F6kl/NJSO4Dy6hqI3uTfp2DXjjEAZzyNrCamJyu7h8tH/yOLcWOHJD DDTN50kOn/Ovdi9WOg2Uus5cSCKzBsy0pcB4RRv0CfDhqSaWA0qzcXMQBfYUxhpmh3Es MsAA== 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 g4si5732345pgc.234.2018.03.23.02.21.27; Fri, 23 Mar 2018 02:21:42 -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 S1752514AbeCWJUJ (ORCPT + 99 others); Fri, 23 Mar 2018 05:20:09 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:46348 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752003AbeCWJPa (ORCPT ); Fri, 23 Mar 2018 05:15:30 -0400 X-UUID: d30cda85e63346e1a9ec81b26bd15002-20180323 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 883052452; Fri, 23 Mar 2018 17:15:25 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 23 Mar 2018 17:15:24 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Fri, 23 Mar 2018 17:15:24 +0800 From: To: , , , , , , CC: , , , , , Sean Wang Subject: [PATCH v1 04/16] mfd: mt6397: add MT6323 RTC support into MT6397 driver Date: Fri, 23 Mar 2018 17:15:01 +0800 Message-ID: <90320622cb491b9d3251e2ce9d0501422f47660f.1521794177.git.sean.wang@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.5042-8.2.9001-23736.004 X-TM-AS-Result: No-4.555200-8.000000-10 X-TMASE-MatchedRID: yFGXaP8bkQMxFdXyW/P+XWMGiV639iF0moKXVHfiMM9cU0dNErOD+opb wG9fIuIT5IXjmeRXhnCJEz4Y6DI4oJsYdIGP6PlZndu3heVAxaNzd7C7BtJobgqiCYa6w8tv8tM WbtVzWkjt4ariHb3sbHv+mmMQs+2yHxPMjOKY7A+6vVBUUydJCsRB0bsfrpPInxMyeYT53RkbSW 746/XYMKCgeSTuE21HV901T3m/1GcuA5kq+A5t08V4uyloxhpwLZhSe8r+c9RWpF6VpTLhEY2q0 akcUk4Qw99bu/x2/ZGTdSRXlCnjBIjjlF305EnAWUm8SESyzd+8353hqEyjk1Zca9RSYo/b X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--4.555200-8.000000 X-TMASE-Version: SMEX-12.5.0.5042-8.2.9001-23736.004 X-TMASE-POSTMAN: 2-d; X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Wang Add compatible string as "mt6323-rtc" that will make the OF core spawn child devices for the RTC subnode of that MT6323 MFD node. Signed-off-by: Sean Wang --- drivers/mfd/mt6397-core.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 77b64bd..f71874a 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 MediaTek Inc. + * Copyright (c) 2014-2018 MediaTek Inc. * Author: Flora Fu, MediaTek * * This program is free software; you can redistribute it and/or modify @@ -23,6 +23,9 @@ #include #include +#define MT6323_RTC_BASE 0x8000 +#define MT6323_RTC_SIZE 0x3e + #define MT6397_RTC_BASE 0xe000 #define MT6397_RTC_SIZE 0x3e @@ -30,6 +33,19 @@ #define MT6391_CID_CODE 0x91 #define MT6397_CID_CODE 0x97 +static const struct resource mt6323_rtc_resources[] = { + { + .start = MT6323_RTC_BASE, + .end = MT6323_RTC_BASE + MT6323_RTC_SIZE, + .flags = IORESOURCE_MEM, + }, + { + .start = MT6323_IRQ_STATUS_RTC, + .end = MT6323_IRQ_STATUS_RTC, + .flags = IORESOURCE_IRQ, + }, +}; + static const struct resource mt6397_rtc_resources[] = { { .start = MT6397_RTC_BASE, @@ -55,6 +71,11 @@ static const struct resource mt6397_keys_resources[] = { 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" }, { -- 2.7.4