* [PATCH 0/2] regulator: pfuze100: Minor driver enhancements
@ 2014-05-26 8:45 Sean Cross
[not found] ` <1401093941-12386-1-git-send-email-xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Sean Cross @ 2014-05-26 8:45 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Grant Likely, Rob Herring,
devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: Sean Cross
The PFUZE100 supports enabling/disabling of SWB regulators, but the driver
doesn't currently support this. The first patch adds support for the
enable/disable bit.
Additionally, there is a minor bug wherein GPIO0 IO0 will sometimes get
allocated as the PFUZE100 ena_gpio, due to the fact that ena_gpio defaults
to 0 which is a valid gpio. The second patch fixes this case.
Sean Cross (2):
regulator: pfuze100: Support SWB enable/disable
regulator: pfuze100: Don't allocate an invalid gpio
drivers/regulator/pfuze100-regulator.c | 5 +++++
1 file changed, 5 insertions(+)
--
2.0.0.rc2
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] regulator: pfuze100: Support SWB enable/disable
[not found] ` <1401093941-12386-1-git-send-email-xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
@ 2014-05-26 8:45 ` Sean Cross
[not found] ` <1401093941-12386-2-git-send-email-xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
2014-05-26 8:45 ` [PATCH 2/2] regulator: pfuze100: Don't allocate an invalid gpio Sean Cross
2014-05-26 15:45 ` [PATCH 0/2] regulator: pfuze100: Minor driver enhancements Mark Brown
2 siblings, 1 reply; 6+ messages in thread
From: Sean Cross @ 2014-05-26 8:45 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Grant Likely, Rob Herring,
devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: Sean Cross
The SWB regulators have the ability to be turned on and off. Add
enable/disable support for these regulators.
Signed-off-by: Sean Cross <xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
---
drivers/regulator/pfuze100-regulator.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index 67e678c..b20304b 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -137,6 +137,8 @@ static struct regulator_ops pfuze100_sw_regulator_ops = {
};
static struct regulator_ops pfuze100_swb_regulator_ops = {
+ .enable = regulator_enable_regmap,
+ .disable = regulator_disable_regmap,
.list_voltage = regulator_list_voltage_table,
.map_voltage = regulator_map_voltage_ascend,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
@@ -189,6 +191,8 @@ static struct regulator_ops pfuze100_swb_regulator_ops = {
.volt_table = voltages, \
.vsel_reg = (base), \
.vsel_mask = (mask), \
+ .enable_reg = (base), \
+ .enable_mask = 0x48, \
}, \
}
--
2.0.0.rc2
--
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] regulator: pfuze100: Don't allocate an invalid gpio
[not found] ` <1401093941-12386-1-git-send-email-xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
2014-05-26 8:45 ` [PATCH 1/2] regulator: pfuze100: Support SWB enable/disable Sean Cross
@ 2014-05-26 8:45 ` Sean Cross
2014-05-26 15:45 ` [PATCH 0/2] regulator: pfuze100: Minor driver enhancements Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Sean Cross @ 2014-05-26 8:45 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Grant Likely, Rob Herring,
devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: Sean Cross
Previously, the PFUZE100 would try to allocate gpio0 io0 because
config.ena_gpio defaults to 0, which can be a valid GPIO. To prevent this
from happening, set this parameter to -EINVAL.
Signed-off-by: Sean Cross <xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
---
drivers/regulator/pfuze100-regulator.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index b20304b..930eb13 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -506,6 +506,7 @@ static int pfuze100_regulator_probe(struct i2c_client *client,
config.init_data = init_data;
config.driver_data = pfuze_chip;
config.of_node = match_of_node(i);
+ config.ena_gpio = -EINVAL;
pfuze_chip->regulators[i] =
devm_regulator_register(&client->dev, desc, &config);
--
2.0.0.rc2
--
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] regulator: pfuze100: Support SWB enable/disable
[not found] ` <1401093941-12386-2-git-send-email-xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
@ 2014-05-26 14:57 ` Mark Brown
[not found] ` <20140526145739.GO22111-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2014-05-26 14:57 UTC (permalink / raw)
To: Sean Cross
Cc: Liam Girdwood, Grant Likely, Rob Herring,
devicetree-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 186 bytes --]
On Mon, May 26, 2014 at 04:45:40PM +0800, Sean Cross wrote:
> + .enable_reg = (base), \
> + .enable_mask = 0x48, \
I note that this is a two bit field - what do the two bits mean?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] regulator: pfuze100: Support SWB enable/disable
[not found] ` <20140526145739.GO22111-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
@ 2014-05-26 15:27 ` Sean Cross
0 siblings, 0 replies; 6+ messages in thread
From: Sean Cross @ 2014-05-26 15:27 UTC (permalink / raw)
To: Mark Brown
Cc: Liam Girdwood, Grant Likely, Rob Herring,
devicetree-u79uwXL29TY76Z2rM5mHXA
On 26/5/2014 10:57 PM, Mark Brown wrote:
> On Mon, May 26, 2014 at 04:45:40PM +0800, Sean Cross wrote:
>
>> + .enable_reg = (base), \
>> + .enable_mask = 0x48, \
> I note that this is a two bit field - what do the two bits mean?
The datasheet defines the register SWBST Control 1 as having the
following bit values:
xbbx mmvv
Where:
x = don't care
b = SWBST1STBYMODE[1:0]
m = SWBST1MODE[1:0]
v = SWBST1VOLT[1:0]
Both SWBST1STBYMODE and SWBST1MODE have the same bit meanings. In this
case, they're both getting set to 0b10, which means "Auto". That is,
they'll automatically switch between PFM and PWM mode for regulation
depending on load.
Other regulators, such as the VGEN regulators, don't set their
corresponding VGENxSTBY bit, which means they will remain on even when
the STANDBY line is asserted. By setting both SWBST1STBYMODE and
SWBST1MODE, the SWBST regulator behaves the same way.
Sean
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] regulator: pfuze100: Minor driver enhancements
[not found] ` <1401093941-12386-1-git-send-email-xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
2014-05-26 8:45 ` [PATCH 1/2] regulator: pfuze100: Support SWB enable/disable Sean Cross
2014-05-26 8:45 ` [PATCH 2/2] regulator: pfuze100: Don't allocate an invalid gpio Sean Cross
@ 2014-05-26 15:45 ` Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2014-05-26 15:45 UTC (permalink / raw)
To: Sean Cross
Cc: Liam Girdwood, Grant Likely, Rob Herring,
devicetree-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 249 bytes --]
On Mon, May 26, 2014 at 04:45:39PM +0800, Sean Cross wrote:
> The PFUZE100 supports enabling/disabling of SWB regulators, but the driver
> doesn't currently support this. The first patch adds support for the
> enable/disable bit.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-26 15:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26 8:45 [PATCH 0/2] regulator: pfuze100: Minor driver enhancements Sean Cross
[not found] ` <1401093941-12386-1-git-send-email-xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
2014-05-26 8:45 ` [PATCH 1/2] regulator: pfuze100: Support SWB enable/disable Sean Cross
[not found] ` <1401093941-12386-2-git-send-email-xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
2014-05-26 14:57 ` Mark Brown
[not found] ` <20140526145739.GO22111-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-05-26 15:27 ` Sean Cross
2014-05-26 8:45 ` [PATCH 2/2] regulator: pfuze100: Don't allocate an invalid gpio Sean Cross
2014-05-26 15:45 ` [PATCH 0/2] regulator: pfuze100: Minor driver enhancements Mark Brown
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).