public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: lp3971: Convert to use regulator_map_voltage_ascend
@ 2013-04-20 16:35 Axel Lin
  2013-04-20 16:36 ` [PATCH 2/2] regulator: lp3972: " Axel Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Axel Lin @ 2013-04-20 16:35 UTC (permalink / raw)
  To: Mark Brown; +Cc: Marek Szyprowski, Liam Girdwood, linux-kernel

All regulators have ascendant voltage list in this driver.
Thus use regulator_map_voltage_ascend is more efficient than the default
regulator_map_voltage_iterate.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/lp3971.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
index 9cb2c0f..d8af9e7 100644
--- a/drivers/regulator/lp3971.c
+++ b/drivers/regulator/lp3971.c
@@ -163,6 +163,7 @@ static int lp3971_ldo_set_voltage_sel(struct regulator_dev *dev,
 
 static struct regulator_ops lp3971_ldo_ops = {
 	.list_voltage = regulator_list_voltage_table,
+	.map_voltage = regulator_map_voltage_ascend,
 	.is_enabled = lp3971_ldo_is_enabled,
 	.enable = lp3971_ldo_enable,
 	.disable = lp3971_ldo_disable,
@@ -236,6 +237,7 @@ static int lp3971_dcdc_set_voltage_sel(struct regulator_dev *dev,
 
 static struct regulator_ops lp3971_dcdc_ops = {
 	.list_voltage = regulator_list_voltage_table,
+	.map_voltage = regulator_map_voltage_ascend,
 	.is_enabled = lp3971_dcdc_is_enabled,
 	.enable = lp3971_dcdc_enable,
 	.disable = lp3971_dcdc_disable,
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] regulator: lp3972: Convert to use regulator_map_voltage_ascend
  2013-04-20 16:35 [PATCH 1/2] regulator: lp3971: Convert to use regulator_map_voltage_ascend Axel Lin
@ 2013-04-20 16:36 ` Axel Lin
  2013-04-22 14:28 ` [PATCH 1/2] regulator: lp3971: " Marek Szyprowski
  2013-04-23 10:39 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Axel Lin @ 2013-04-20 16:36 UTC (permalink / raw)
  To: Mark Brown; +Cc: Liam Girdwood, linux-kernel

All regulators have ascendant voltage list in this driver.
Thus use regulator_map_voltage_ascend is more efficient than the default
regulator_map_voltage_iterate.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/lp3972.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/lp3972.c b/drivers/regulator/lp3972.c
index 0baabcf..61e4cf9 100644
--- a/drivers/regulator/lp3972.c
+++ b/drivers/regulator/lp3972.c
@@ -309,6 +309,7 @@ static int lp3972_ldo_set_voltage_sel(struct regulator_dev *dev,
 
 static struct regulator_ops lp3972_ldo_ops = {
 	.list_voltage = regulator_list_voltage_table,
+	.map_voltage = regulator_map_voltage_ascend,
 	.is_enabled = lp3972_ldo_is_enabled,
 	.enable = lp3972_ldo_enable,
 	.disable = lp3972_ldo_disable,
@@ -389,6 +390,7 @@ static int lp3972_dcdc_set_voltage_sel(struct regulator_dev *dev,
 
 static struct regulator_ops lp3972_dcdc_ops = {
 	.list_voltage = regulator_list_voltage_table,
+	.map_voltage = regulator_map_voltage_ascend,
 	.is_enabled = lp3972_dcdc_is_enabled,
 	.enable = lp3972_dcdc_enable,
 	.disable = lp3972_dcdc_disable,
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] regulator: lp3971: Convert to use regulator_map_voltage_ascend
  2013-04-20 16:35 [PATCH 1/2] regulator: lp3971: Convert to use regulator_map_voltage_ascend Axel Lin
  2013-04-20 16:36 ` [PATCH 2/2] regulator: lp3972: " Axel Lin
@ 2013-04-22 14:28 ` Marek Szyprowski
  2013-04-23 10:39 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Marek Szyprowski @ 2013-04-22 14:28 UTC (permalink / raw)
  To: Axel Lin; +Cc: Mark Brown, Liam Girdwood, linux-kernel

Hello,

On 2013-04-20 18:35, Axel Lin wrote:
> All regulators have ascendant voltage list in this driver.
> Thus use regulator_map_voltage_ascend is more efficient than the default
> regulator_map_voltage_iterate.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---
>   drivers/regulator/lp3971.c |    2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
> index 9cb2c0f..d8af9e7 100644
> --- a/drivers/regulator/lp3971.c
> +++ b/drivers/regulator/lp3971.c
> @@ -163,6 +163,7 @@ static int lp3971_ldo_set_voltage_sel(struct regulator_dev *dev,
>   
>   static struct regulator_ops lp3971_ldo_ops = {
>   	.list_voltage = regulator_list_voltage_table,
> +	.map_voltage = regulator_map_voltage_ascend,
>   	.is_enabled = lp3971_ldo_is_enabled,
>   	.enable = lp3971_ldo_enable,
>   	.disable = lp3971_ldo_disable,
> @@ -236,6 +237,7 @@ static int lp3971_dcdc_set_voltage_sel(struct regulator_dev *dev,
>   
>   static struct regulator_ops lp3971_dcdc_ops = {
>   	.list_voltage = regulator_list_voltage_table,
> +	.map_voltage = regulator_map_voltage_ascend,
>   	.is_enabled = lp3971_dcdc_is_enabled,
>   	.enable = lp3971_dcdc_enable,
>   	.disable = lp3971_dcdc_disable,

Best regards
-- 
Marek Szyprowski
Samsung Poland R&D Center



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] regulator: lp3971: Convert to use regulator_map_voltage_ascend
  2013-04-20 16:35 [PATCH 1/2] regulator: lp3971: Convert to use regulator_map_voltage_ascend Axel Lin
  2013-04-20 16:36 ` [PATCH 2/2] regulator: lp3972: " Axel Lin
  2013-04-22 14:28 ` [PATCH 1/2] regulator: lp3971: " Marek Szyprowski
@ 2013-04-23 10:39 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2013-04-23 10:39 UTC (permalink / raw)
  To: Axel Lin; +Cc: Marek Szyprowski, Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

On Sun, Apr 21, 2013 at 12:35:31AM +0800, Axel Lin wrote:
> All regulators have ascendant voltage list in this driver.
> Thus use regulator_map_voltage_ascend is more efficient than the default
> regulator_map_voltage_iterate.

Applied both, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-23 10:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-20 16:35 [PATCH 1/2] regulator: lp3971: Convert to use regulator_map_voltage_ascend Axel Lin
2013-04-20 16:36 ` [PATCH 2/2] regulator: lp3972: " Axel Lin
2013-04-22 14:28 ` [PATCH 1/2] regulator: lp3971: " Marek Szyprowski
2013-04-23 10:39 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox