Received: by 10.213.65.68 with SMTP id h4csp329722imn; Wed, 28 Mar 2018 04:32:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx493bEn35OJcpX1WPtWhSOQsCu7JF7QQagezKXZAPdOcfX+H7wXoBt45b0TJY/OGFD4wBO/N X-Received: by 10.99.56.8 with SMTP id f8mr2318682pga.374.1522236766310; Wed, 28 Mar 2018 04:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522236766; cv=none; d=google.com; s=arc-20160816; b=Hjzqa3PKFNbYCTjXKa6x38I10Cd2vjS3ArAZEBFlbbyTP1xGwEj+xAwwLiBF7UKFWE 50ufTSKfYVjL6iggmSFCHZprlzYOxTq/CaPIQSLZC9MOHTUqMIv9T9+tcOgt6ntUbRN3 Qucxji0Q7ape/76KtwDBOUs1Hq+qO8pG3xrR//nudpfv/0F7wbgo0WmyER5n7Y/0geu9 COtBN4x+yds+Q8wwS32dKRgz2gb2Q+UNuJZf6djY9kWH+2wDQvB9BuAA6AqHxxJ9PzTN rQV7UbLgn2RWOalywSCOkl+CgYCKkDXFzSF8DI/uMDXQXFsMzzJCHBYq3VRXAjjzxReH NsvQ== 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 :arc-authentication-results; bh=zkedJPKTApWXnHc80XFbfFh9gUELKcjVpk78j216yjU=; b=ypVF0NjGPL6ToYVxpyUz6UaQrXFN1AB4udzqbU0kE1D/T1pYKvRz2LV39+Fih/OHOE WsrdBGBJxuAFb5F0PyFf9wOljUpjlqZ1W9K3gPcRB8VzVfuskNPht5CIG7TVlMGoPGPm 63lcumQlStApRV9n5y/4tw7tdBBJe1sYfGafMxH4HYow/UwIJYD2u7mvXuatH++EioKc oRgPn3c79VS4Ty5Ae4nc8Qqq502XXop+KODHkwKljr0zWzZJ3VHBNs0n55OwTk/pfoOa eVBZw/mPo9vrafCugcYUoUpIwCfEnbdVMTAx/OOK6h8H8mYfvuwkafPEPs1THzThu/f5 B77A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HwHA4LpM; 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 f3-v6si3463883plt.472.2018.03.28.04.32.32; Wed, 28 Mar 2018 04:32:46 -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=HwHA4LpM; 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 S1752754AbeC1LP5 (ORCPT + 99 others); Wed, 28 Mar 2018 07:15:57 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:37538 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752216AbeC1LPl (ORCPT ); Wed, 28 Mar 2018 07:15:41 -0400 Received: by mail-wm0-f67.google.com with SMTP id r131so4492505wmb.2 for ; Wed, 28 Mar 2018 04:15:40 -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=zkedJPKTApWXnHc80XFbfFh9gUELKcjVpk78j216yjU=; b=HwHA4LpMs7povH9pGIvhDCH1lLEJW1GjSHpOaZSXU7Iv7zabrWz6+IAGZXj0qkeqs1 0LVBOIdC+9s6o8YDyzGT5S7GQ1R7Lb/ni+mbSHpQTJVA/mQzrsoHEBJnuFFMF81KbCDQ pEmbEWg3QoB2K4IKfAR55v0rLI9khlNlENB2Q= 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=zkedJPKTApWXnHc80XFbfFh9gUELKcjVpk78j216yjU=; b=DJlIBpiiL8sK7F2nacvBu7+BDJHImUDwU2MTy2CzeCPkDEeEtL+hHKLmF6JpeUfPeI m/EOUBF6WGCfFVBs24Lm+Kf650HZKQhSRaaIDF3PGR2DQ4SxZQkS3aTFsQ2cnGgYdlBi 1LDyDcQTPtkMk32Q0il2V4qdQyJqhpE8DioDyq3mXlW/gVeMu79PSIsdMRwkJnZ4x4DD Z+NHn9+nBB3qrxcCxP2xWEFysr14jfrTqXxB/G6Ri5hjHM7w/eZhmiZk5T8NwlbWbdg/ 71+hn10dU8bNo5Kzg57frshclgGkY3JpPKKcWqW6K9ke9n4+BYQQOSG8EIY6DbAZYC4C eGTw== X-Gm-Message-State: AElRT7GygUPJj4CsZHNsc1EJVNGdXY06uZfJz9ZuQLZw1zVOe41A7IiI UbHw3nqblaPsNfJ8QEBmZ19wJg== X-Received: by 10.80.169.89 with SMTP id m25mr2999622edc.244.1522235740091; Wed, 28 Mar 2018 04:15:40 -0700 (PDT) Received: from dell ([2.31.163.57]) by smtp.gmail.com with ESMTPSA id j42sm2459241eda.67.2018.03.28.04.15.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Mar 2018 04:15:39 -0700 (PDT) Date: Wed, 28 Mar 2018 12:15:37 +0100 From: Lee Jones To: sean.wang@mediatek.com Cc: robh+dt@kernel.org, mark.rutland@arm.com, sre@kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, eddie.huang@mediatek.com, devicetree@vger.kernel.org, linux-rtc@vger.kernel.org, linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 04/16] mfd: mt6397: add MT6323 RTC support into MT6397 driver Message-ID: <20180328111537.34xcqzpgjf7gu3zw@dell> References: <90320622cb491b9d3251e2ce9d0501422f47660f.1521794177.git.sean.wang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <90320622cb491b9d3251e2ce9d0501422f47660f.1521794177.git.sean.wang@mediatek.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 23 Mar 2018, sean.wang@mediatek.com wrote: > 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, > + }, > +}; Please use the DEFINE_RES_* helpers instead. Defined in: include/linux/ioport.h > 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" > }, { -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog