Linux Power Management development
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org
Cc: mark.rutland-5wv7dgnIgG8@public.gmane.org,
	a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	eddie.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
	linux-rtc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v1 04/16] mfd: mt6397: add MT6323 RTC support into MT6397 driver
Date: Wed, 28 Mar 2018 12:15:37 +0100	[thread overview]
Message-ID: <20180328111537.34xcqzpgjf7gu3zw@dell> (raw)
In-Reply-To: <90320622cb491b9d3251e2ce9d0501422f47660f.1521794177.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>

On Fri, 23 Mar 2018, sean.wang@mediatek.com wrote:

> From: Sean Wang <sean.wang@mediatek.com>
> 
> 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 <sean.wang@mediatek.com>
> ---
>  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 <linux/mfd/mt6397/registers.h>
>  #include <linux/mfd/mt6323/registers.h>
>  
> +#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

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  parent reply	other threads:[~2018-03-28 11:15 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23  9:14 [PATCH v1 00/16] Add support to MT6323 RTC and its power device sean.wang
2018-03-23  9:14 ` [PATCH v1 01/16] dt-bindings: power: reset: mediatek: add bindings for " sean.wang
2018-03-26 22:24   ` Rob Herring
2018-03-27  3:21     ` Sean Wang
     [not found] ` <cover.1521794176.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2018-03-23  9:14   ` [PATCH v1 02/16] dt-bindings: rtc: mediatek: add bindings for PMIC RTC sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-23  9:41     ` Alexandre Belloni
     [not found]       ` <20180323094118.GC3417-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
2018-03-23 10:15         ` Alexandre Belloni
2018-03-24 19:36           ` Sean Wang
2018-03-27 15:18             ` Alexandre Belloni
2018-03-28  3:53               ` Sean Wang
2018-03-28  9:19                 ` Alexandre Belloni
2018-03-23  9:15   ` [PATCH v1 03/16] dt-bindings: mfd: mediatek: add a description for MT6323 RTC sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-26 22:24     ` Rob Herring
2018-03-28 11:13     ` Lee Jones
2018-03-23  9:15   ` [PATCH v1 04/16] mfd: mt6397: add MT6323 RTC support into MT6397 driver sean.wang-NuS5LvNUpcJWk0Htik3J/w
     [not found]     ` <90320622cb491b9d3251e2ce9d0501422f47660f.1521794177.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2018-03-28 11:15       ` Lee Jones [this message]
2018-03-23  9:15   ` [PATCH v1 05/16] rtc: mediatek: add MT6323 support to RTC driver sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-23 10:01     ` Alexandre Belloni
2018-03-24  7:06       ` Sean Wang
2018-03-23  9:15   ` [PATCH v1 07/16] rtc: mediatek: replace a poll with regmap_read_poll_timeout sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-23  9:15   ` [PATCH v1 08/16] rtc: mediatek: remove unnecessary irq_dispose_mapping sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-23 10:38     ` Alexandre Belloni
2018-03-26  2:22       ` Sean Wang
2018-03-23  9:15   ` [PATCH v1 09/16] rtc: mediatek: convert to use device managed functions sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-23 10:50     ` Alexandre Belloni
2018-03-26  4:07       ` Sean Wang
2018-03-27 15:07         ` Alexandre Belloni
2018-03-23  9:15   ` [PATCH v1 10/16] rtc: mediatek: add devm_of_platform_populate sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-23  9:15   ` [PATCH v1 11/16] rtc: mediatek: move the declaration into a globally visible header file sean.wang-NuS5LvNUpcJWk0Htik3J/w
     [not found]     ` <53afbe8172fb1afd809ce9ba1afeda924b9ea705.1521794177.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2018-03-23  9:57       ` Alexandre Belloni
2018-03-24  7:31         ` Sean Wang
2018-03-24 18:54           ` Alexandre Belloni
2018-03-24 20:00     ` Fabio Estevam
2018-03-25  3:13       ` Sean Wang
2018-03-23  9:15   ` [PATCH v1 13/16] rtc: mediatek: update license converting to using SPDX identifiers sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-23  9:15   ` [PATCH v1 15/16] MAINTAINERS: update entry for ARM/Mediatek RTC DRIVER sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-23  9:15   ` [PATCH v1 16/16] MAINTAINERS: add an entry for MediaTek board level shutdown driver sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-03-23  9:15 ` [PATCH v1 06/16] rtc: mediatek: remove unnecessary parentheses sean.wang
2018-03-23 10:21   ` Alexandre Belloni
2018-03-24  7:14     ` Sean Wang
2018-03-24 18:53       ` Alexandre Belloni
2018-03-24 19:21         ` Sean Wang
2018-03-23  9:15 ` [PATCH v1 12/16] rtc: mediatek: cleanup header files to include sean.wang
2018-03-25  4:17   ` kbuild test robot
2018-03-25  5:21   ` kbuild test robot
2018-03-23  9:15 ` [PATCH v1 14/16] power: reset: mediatek: add a power-off driver using PMIC RTC device sean.wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180328111537.34xcqzpgjf7gu3zw@dell \
    --to=lee.jones-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org \
    --cc=alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=eddie.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rtc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox