* [PATCH V1] mfd: da9062: fix missing volatile registers in the core regmap_range volatile lists
@ 2016-02-01 16:09 Steve Twiss
2016-02-10 16:56 ` Lee Jones
0 siblings, 1 reply; 4+ messages in thread
From: Steve Twiss @ 2016-02-01 16:09 UTC (permalink / raw)
To: LINUXKERNEL, Lee Jones; +Cc: David Dajun Chen, Support Opensource
From: Steve Twiss <stwiss.opensource@diasemi.com>
Add an updated set of registers listed in the core regmap_range volatile
ranges defined for the DA9062.
These new registers contain bits that cannot be considered under the full
control of software. Under various conditions the hardware will set and/or
automatically clear bit(s) contained in these registers.
When using a cached version of regmap, the volatility of these registers must
be identified otherwise the regmap operations may not ensure the registers
are explicitly altered.
As well as updating the list of volatile registers, this change will fix a
corner case discovered in the DA9063 ONKEY which is used by the DA9062 core.
In the ONKEY case, the CONTROL_B register is now listed as volatile in the
regmap_range because it contains the bit field NONKEY_LOCK. This bit can be
altered by hardware, in which case regmap must be notified of its ability
to be manpiulated outside of software control.
Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
---
Checks performed with linux-next/v4.5-rc1/scripts/checkpatch.pl
da9062-core.c total: 0 errors, 0 warnings, 554 lines checked
This patch applies against linux-next and v4.5-rc1
Regards,
Steve
drivers/mfd/da9062-core.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
index a9ad024..8f873866 100644
--- a/drivers/mfd/da9062-core.c
+++ b/drivers/mfd/da9062-core.c
@@ -388,11 +388,32 @@ static const struct regmap_range da9062_aa_volatile_ranges[] = {
.range_min = DA9062AA_STATUS_D,
.range_max = DA9062AA_EVENT_C,
}, {
- .range_min = DA9062AA_CONTROL_F,
+ .range_min = DA9062AA_CONTROL_A,
+ .range_max = DA9062AA_CONTROL_B,
+ }, {
+ .range_min = DA9062AA_CONTROL_E,
.range_max = DA9062AA_CONTROL_F,
}, {
+ .range_min = DA9062AA_BUCK2_CONT,
+ .range_max = DA9062AA_BUCK4_CONT,
+ }, {
+ .range_min = DA9062AA_BUCK3_CONT,
+ .range_max = DA9062AA_BUCK3_CONT,
+ }, {
+ .range_min = DA9062AA_LDO1_CONT,
+ .range_max = DA9062AA_LDO4_CONT,
+ }, {
+ .range_min = DA9062AA_DVC_1,
+ .range_max = DA9062AA_DVC_1,
+ }, {
.range_min = DA9062AA_COUNT_S,
.range_max = DA9062AA_SECOND_D,
+ }, {
+ .range_min = DA9062AA_SEQ,
+ .range_max = DA9062AA_SEQ,
+ }, {
+ .range_min = DA9062AA_EN_32K,
+ .range_max = DA9062AA_EN_32K,
},
};
--
end-of-patch for PATCH V1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V1] mfd: da9062: fix missing volatile registers in the core regmap_range volatile lists
2016-02-01 16:09 [PATCH V1] mfd: da9062: fix missing volatile registers in the core regmap_range volatile lists Steve Twiss
@ 2016-02-10 16:56 ` Lee Jones
2016-02-10 17:01 ` Opensource [Steve Twiss]
0 siblings, 1 reply; 4+ messages in thread
From: Lee Jones @ 2016-02-10 16:56 UTC (permalink / raw)
To: Steve Twiss; +Cc: LINUXKERNEL, David Dajun Chen, Support Opensource
On Mon, 01 Feb 2016, Steve Twiss wrote:
> From: Steve Twiss <stwiss.opensource@diasemi.com>
>
> Add an updated set of registers listed in the core regmap_range volatile
> ranges defined for the DA9062.
>
> These new registers contain bits that cannot be considered under the full
> control of software. Under various conditions the hardware will set and/or
> automatically clear bit(s) contained in these registers.
>
> When using a cached version of regmap, the volatility of these registers must
> be identified otherwise the regmap operations may not ensure the registers
> are explicitly altered.
>
> As well as updating the list of volatile registers, this change will fix a
> corner case discovered in the DA9063 ONKEY which is used by the DA9062 core.
>
> In the ONKEY case, the CONTROL_B register is now listed as volatile in the
> regmap_range because it contains the bit field NONKEY_LOCK. This bit can be
> altered by hardware, in which case regmap must be notified of its ability
> to be manpiulated outside of software control.
>
> Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Applied, thanks.
> ---
> Checks performed with linux-next/v4.5-rc1/scripts/checkpatch.pl
> da9062-core.c total: 0 errors, 0 warnings, 554 lines checked
> This patch applies against linux-next and v4.5-rc1
>
> Regards,
> Steve
>
>
> drivers/mfd/da9062-core.c | 23 ++++++++++++++++++++++-
> 1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
> index a9ad024..8f873866 100644
> --- a/drivers/mfd/da9062-core.c
> +++ b/drivers/mfd/da9062-core.c
> @@ -388,11 +388,32 @@ static const struct regmap_range da9062_aa_volatile_ranges[] = {
> .range_min = DA9062AA_STATUS_D,
> .range_max = DA9062AA_EVENT_C,
> }, {
> - .range_min = DA9062AA_CONTROL_F,
> + .range_min = DA9062AA_CONTROL_A,
> + .range_max = DA9062AA_CONTROL_B,
> + }, {
> + .range_min = DA9062AA_CONTROL_E,
> .range_max = DA9062AA_CONTROL_F,
> }, {
> + .range_min = DA9062AA_BUCK2_CONT,
> + .range_max = DA9062AA_BUCK4_CONT,
> + }, {
> + .range_min = DA9062AA_BUCK3_CONT,
> + .range_max = DA9062AA_BUCK3_CONT,
> + }, {
> + .range_min = DA9062AA_LDO1_CONT,
> + .range_max = DA9062AA_LDO4_CONT,
> + }, {
> + .range_min = DA9062AA_DVC_1,
> + .range_max = DA9062AA_DVC_1,
> + }, {
> .range_min = DA9062AA_COUNT_S,
> .range_max = DA9062AA_SECOND_D,
> + }, {
> + .range_min = DA9062AA_SEQ,
> + .range_max = DA9062AA_SEQ,
> + }, {
> + .range_min = DA9062AA_EN_32K,
> + .range_max = DA9062AA_EN_32K,
> },
> };
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH V1] mfd: da9062: fix missing volatile registers in the core regmap_range volatile lists
2016-02-10 16:56 ` Lee Jones
@ 2016-02-10 17:01 ` Opensource [Steve Twiss]
2016-02-11 9:17 ` Lee Jones
0 siblings, 1 reply; 4+ messages in thread
From: Opensource [Steve Twiss] @ 2016-02-10 17:01 UTC (permalink / raw)
To: LINUXKERNEL
On 10 February 2016 16:56, Lee Jones wrote:
> To: Opensource [Steve Twiss]
> Cc: LINUXKERNEL; David Dajun Chen; Support Opensource
> Subject: Re: [PATCH V1] mfd: da9062: fix missing volatile registers in the core
> regmap_range volatile lists
>
> On Mon, 01 Feb 2016, Steve Twiss wrote:
>
> > From: Steve Twiss <stwiss.opensource@diasemi.com>
> >
> > Add an updated set of registers listed in the core regmap_range volatile
> > ranges defined for the DA9062.
> >
> > These new registers contain bits that cannot be considered under the full
> > control of software. Under various conditions the hardware will set and/or
> > automatically clear bit(s) contained in these registers.
> >
> > When using a cached version of regmap, the volatility of these registers must
> > be identified otherwise the regmap operations may not ensure the registers
> > are explicitly altered.
> >
> > As well as updating the list of volatile registers, this change will fix a
> > corner case discovered in the DA9063 ONKEY which is used by the DA9062 core.
> >
> > In the ONKEY case, the CONTROL_B register is now listed as volatile in the
> > regmap_range because it contains the bit field NONKEY_LOCK. This bit can be
> > altered by hardware, in which case regmap must be notified of its ability
> > to be manpiulated outside of software control.
> >
> > Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
>
> Applied, thanks.
Thanks.
Regards,
Steve
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V1] mfd: da9062: fix missing volatile registers in the core regmap_range volatile lists
2016-02-10 17:01 ` Opensource [Steve Twiss]
@ 2016-02-11 9:17 ` Lee Jones
0 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2016-02-11 9:17 UTC (permalink / raw)
To: Opensource [Steve Twiss]; +Cc: LINUXKERNEL
On Wed, 10 Feb 2016, Opensource [Steve Twiss] wrote:
>
> On 10 February 2016 16:56, Lee Jones wrote:
>
> > To: Opensource [Steve Twiss]
> > Cc: LINUXKERNEL; David Dajun Chen; Support Opensource
> > Subject: Re: [PATCH V1] mfd: da9062: fix missing volatile registers in the core
> > regmap_range volatile lists
> >
> > On Mon, 01 Feb 2016, Steve Twiss wrote:
> >
> > > From: Steve Twiss <stwiss.opensource@diasemi.com>
> > >
> > > Add an updated set of registers listed in the core regmap_range volatile
> > > ranges defined for the DA9062.
> > >
> > > These new registers contain bits that cannot be considered under the full
> > > control of software. Under various conditions the hardware will set and/or
> > > automatically clear bit(s) contained in these registers.
> > >
> > > When using a cached version of regmap, the volatility of these registers must
> > > be identified otherwise the regmap operations may not ensure the registers
> > > are explicitly altered.
> > >
> > > As well as updating the list of volatile registers, this change will fix a
> > > corner case discovered in the DA9063 ONKEY which is used by the DA9062 core.
> > >
> > > In the ONKEY case, the CONTROL_B register is now listed as volatile in the
> > > regmap_range because it contains the bit field NONKEY_LOCK. This bit can be
> > > altered by hardware, in which case regmap must be notified of its ability
> > > to be manpiulated outside of software control.
> > >
> > > Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
> >
> > Applied, thanks.
>
> Thanks.
> Regards,
> Steve
No need for thank yous. They're implied. ;)
[... and they just account for churn in my already very busy inbox].
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-11 9:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-01 16:09 [PATCH V1] mfd: da9062: fix missing volatile registers in the core regmap_range volatile lists Steve Twiss
2016-02-10 16:56 ` Lee Jones
2016-02-10 17:01 ` Opensource [Steve Twiss]
2016-02-11 9:17 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).