From: Alexandre Belloni <alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org
Cc: lznuaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org,
sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/7] rtc: arm: imx: snvs: change use syscon to access register
Date: Sat, 16 May 2015 16:04:22 +0200 [thread overview]
Message-ID: <20150516140422.GL3338@piout.net> (raw)
In-Reply-To: <1431696990-23078-3-git-send-email-Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Hi,
On 15/05/2015 at 21:36:25 +0800, Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org wrote :
> From: Frank Li <Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
>
> snvs included rtc, on/off key, power-off module
> change to syscon to access register
>
> Signed-off-by: Frank Li <Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> ---
> drivers/rtc/rtc-snvs.c | 124 +++++++++++++++++++++----------------------------
> 1 file changed, 54 insertions(+), 70 deletions(-)
>
> diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
> index 0479e80..4e85fbe 100644
> --- a/drivers/rtc/rtc-snvs.c
> +++ b/drivers/rtc/rtc-snvs.c
> @@ -18,14 +18,16 @@
> #include <linux/platform_device.h>
> #include <linux/rtc.h>
> #include <linux/clk.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/regmap.h>
>
> /* These register offsets are relative to LP (Low Power) range */
Shouldn't you remove that comment ?
> -#define SNVS_LPCR 0x04
> -#define SNVS_LPSR 0x18
> -#define SNVS_LPSRTCMR 0x1c
> -#define SNVS_LPSRTCLR 0x20
> -#define SNVS_LPTAR 0x24
> -#define SNVS_LPPGDR 0x30
> +#define SNVS_LPCR 0x38
> +#define SNVS_LPSR 0x4c
> +#define SNVS_LPSRTCMR 0x50
> +#define SNVS_LPSRTCLR 0x54
> +#define SNVS_LPTAR 0x58
> +#define SNVS_LPPGDR 0x64
>
> #define SNVS_LPCR_SRTC_ENV (1 << 0)
> #define SNVS_LPCR_LPTA_EN (1 << 1)
> @@ -37,31 +39,35 @@
>
> struct snvs_rtc_data {
> struct rtc_device *rtc;
> - void __iomem *ioaddr;
> + struct regmap *snvs;
> int irq;
> spinlock_t lock;
This lock can probably be removed, if I'm not mistaken the only use left
is its initialization.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Frank.Li@freescale.com
Cc: lznuaa@gmail.com, shawn.guo@linaro.org,
dmitry.torokhov@gmail.com, robh+dt@kernel.org,
a.zummo@towertech.it, sachin.kamat@linaro.org,
p.zabel@pengutronix.de, linux-arm-kernel@lists.infradead.org,
linux-input@vger.kernel.org, rtc-linux@googlegroups.com,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org
Subject: [rtc-linux] Re: [PATCH 2/7] rtc: arm: imx: snvs: change use syscon to access register
Date: Sat, 16 May 2015 16:04:22 +0200 [thread overview]
Message-ID: <20150516140422.GL3338@piout.net> (raw)
In-Reply-To: <1431696990-23078-3-git-send-email-Frank.Li@freescale.com>
Hi,
On 15/05/2015 at 21:36:25 +0800, Frank.Li@freescale.com wrote :
> From: Frank Li <Frank.Li@freescale.com>
>
> snvs included rtc, on/off key, power-off module
> change to syscon to access register
>
> Signed-off-by: Frank Li <Frank.Li@freescale.com>
> ---
> drivers/rtc/rtc-snvs.c | 124 +++++++++++++++++++++----------------------------
> 1 file changed, 54 insertions(+), 70 deletions(-)
>
> diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
> index 0479e80..4e85fbe 100644
> --- a/drivers/rtc/rtc-snvs.c
> +++ b/drivers/rtc/rtc-snvs.c
> @@ -18,14 +18,16 @@
> #include <linux/platform_device.h>
> #include <linux/rtc.h>
> #include <linux/clk.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/regmap.h>
>
> /* These register offsets are relative to LP (Low Power) range */
Shouldn't you remove that comment ?
> -#define SNVS_LPCR 0x04
> -#define SNVS_LPSR 0x18
> -#define SNVS_LPSRTCMR 0x1c
> -#define SNVS_LPSRTCLR 0x20
> -#define SNVS_LPTAR 0x24
> -#define SNVS_LPPGDR 0x30
> +#define SNVS_LPCR 0x38
> +#define SNVS_LPSR 0x4c
> +#define SNVS_LPSRTCMR 0x50
> +#define SNVS_LPSRTCLR 0x54
> +#define SNVS_LPTAR 0x58
> +#define SNVS_LPPGDR 0x64
>
> #define SNVS_LPCR_SRTC_ENV (1 << 0)
> #define SNVS_LPCR_LPTA_EN (1 << 1)
> @@ -37,31 +39,35 @@
>
> struct snvs_rtc_data {
> struct rtc_device *rtc;
> - void __iomem *ioaddr;
> + struct regmap *snvs;
> int irq;
> spinlock_t lock;
This lock can probably be removed, if I'm not mistaken the only use left
is its initialization.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
WARNING: multiple messages have this Message-ID (diff)
From: alexandre.belloni@free-electrons.com (Alexandre Belloni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] rtc: arm: imx: snvs: change use syscon to access register
Date: Sat, 16 May 2015 16:04:22 +0200 [thread overview]
Message-ID: <20150516140422.GL3338@piout.net> (raw)
In-Reply-To: <1431696990-23078-3-git-send-email-Frank.Li@freescale.com>
Hi,
On 15/05/2015 at 21:36:25 +0800, Frank.Li at freescale.com wrote :
> From: Frank Li <Frank.Li@freescale.com>
>
> snvs included rtc, on/off key, power-off module
> change to syscon to access register
>
> Signed-off-by: Frank Li <Frank.Li@freescale.com>
> ---
> drivers/rtc/rtc-snvs.c | 124 +++++++++++++++++++++----------------------------
> 1 file changed, 54 insertions(+), 70 deletions(-)
>
> diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
> index 0479e80..4e85fbe 100644
> --- a/drivers/rtc/rtc-snvs.c
> +++ b/drivers/rtc/rtc-snvs.c
> @@ -18,14 +18,16 @@
> #include <linux/platform_device.h>
> #include <linux/rtc.h>
> #include <linux/clk.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/regmap.h>
>
> /* These register offsets are relative to LP (Low Power) range */
Shouldn't you remove that comment ?
> -#define SNVS_LPCR 0x04
> -#define SNVS_LPSR 0x18
> -#define SNVS_LPSRTCMR 0x1c
> -#define SNVS_LPSRTCLR 0x20
> -#define SNVS_LPTAR 0x24
> -#define SNVS_LPPGDR 0x30
> +#define SNVS_LPCR 0x38
> +#define SNVS_LPSR 0x4c
> +#define SNVS_LPSRTCMR 0x50
> +#define SNVS_LPSRTCLR 0x54
> +#define SNVS_LPTAR 0x58
> +#define SNVS_LPPGDR 0x64
>
> #define SNVS_LPCR_SRTC_ENV (1 << 0)
> #define SNVS_LPCR_LPTA_EN (1 << 1)
> @@ -37,31 +39,35 @@
>
> struct snvs_rtc_data {
> struct rtc_device *rtc;
> - void __iomem *ioaddr;
> + struct regmap *snvs;
> int irq;
> spinlock_t lock;
This lock can probably be removed, if I'm not mistaken the only use left
is its initialization.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-05-16 14:04 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 13:36 [PATCH resend 0/7] Change snvs rtc and poweroff to use syscon add pwrkey driver Frank.Li
2015-05-15 13:36 ` Frank.Li at freescale.com
2015-05-15 13:36 ` [rtc-linux] " Frank.Li
2015-05-15 13:36 ` [PATCH 1/7] arm: imx: power-off: change to syscon to access register Frank.Li
2015-05-15 13:36 ` Frank.Li at freescale.com
2015-05-15 13:36 ` [rtc-linux] " Frank.Li
2015-05-16 13:54 ` Alexandre Belloni
2015-05-16 13:54 ` Alexandre Belloni
2015-05-16 13:54 ` [rtc-linux] " Alexandre Belloni
2015-05-15 13:36 ` [PATCH 2/7] rtc: arm: imx: snvs: change use " Frank.Li
2015-05-15 13:36 ` Frank.Li at freescale.com
2015-05-15 13:36 ` [rtc-linux] " Frank.Li
[not found] ` <1431696990-23078-3-git-send-email-Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-05-16 14:04 ` Alexandre Belloni [this message]
2015-05-16 14:04 ` Alexandre Belloni
2015-05-16 14:04 ` [rtc-linux] " Alexandre Belloni
2015-05-15 13:36 ` [PATCH 3/7] Document: dt: fsl: snvs: change support syscon Frank.Li
2015-05-15 13:36 ` Frank.Li at freescale.com
2015-05-15 13:36 ` [rtc-linux] " Frank.Li
2015-05-15 13:36 ` [PATCH 4/7] arm: dts: imx: update snvs to use syscon access register Frank.Li
2015-05-15 13:36 ` Frank.Li at freescale.com
2015-05-15 13:36 ` [rtc-linux] " Frank.Li
2015-05-18 8:45 ` Philipp Zabel
2015-05-18 8:45 ` Philipp Zabel
2015-05-18 8:45 ` [rtc-linux] " Philipp Zabel
2015-05-18 19:30 ` Zhi Li
2015-05-18 19:30 ` Zhi Li
2015-05-18 19:30 ` [rtc-linux] " Zhi Li
2015-05-18 22:17 ` Alexandre Belloni
2015-05-18 22:17 ` Alexandre Belloni
2015-05-18 22:17 ` [rtc-linux] " Alexandre Belloni
2015-05-15 13:36 ` [PATCH 5/7] input: keyboard: imx: add snvs power key driver Frank.Li
2015-05-15 13:36 ` Frank.Li at freescale.com
2015-05-15 13:36 ` [rtc-linux] " Frank.Li
2015-05-15 18:27 ` Dmitry Torokhov
2015-05-15 18:27 ` Dmitry Torokhov
2015-05-15 18:27 ` [rtc-linux] " Dmitry Torokhov
2015-05-15 13:36 ` [PATCH 6/7] document: devicetree: input: imx: i.mx snvs power device tree bindings Frank.Li
2015-05-15 13:36 ` Frank.Li at freescale.com
2015-05-15 13:36 ` [rtc-linux] " Frank.Li
[not found] ` <1431696990-23078-1-git-send-email-Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-05-15 13:36 ` [PATCH 7/7] arm: dts: imx6sx: enable snvs power key Frank.Li-KZfg59tc24xl57MIdRCFDg
2015-05-15 13:36 ` Frank.Li at freescale.com
2015-05-15 13:36 ` [rtc-linux] " Frank.Li
2015-05-15 18:28 ` [PATCH resend 0/7] Change snvs rtc and poweroff to use syscon add pwrkey driver Dmitry Torokhov
2015-05-15 18:28 ` Dmitry Torokhov
2015-05-15 18:28 ` [rtc-linux] " Dmitry Torokhov
-- strict thread matches above, loose matches on Subject: below --
2015-05-14 17:18 [PATCH " Frank.Li-KZfg59tc24xl57MIdRCFDg
2015-05-14 17:18 ` [PATCH 2/7] rtc: arm: imx: snvs: change use syscon to access register Frank.Li
2015-05-14 17:18 ` Frank.Li at freescale.com
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=20150516140422.GL3338@piout.net \
--to=alexandre.belloni-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
--cc=Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lznuaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=shawn.guo-QSEj5FYQhm4dnm+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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.