public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Bengt Jonsson <bengt.g.jonsson@stericsson.com>,
	Lee Jones <lee.jones@linaro.org>,
	Emeric Vigier <emeric.vigier@stericsson.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [RFT][PATCH] regulator: ab8500: Remove get_voltage_sel for fixed voltage
Date: Mon, 18 Feb 2013 11:24:40 +0800	[thread overview]
Message-ID: <1361157880.30510.1.camel@phoenix> (raw)
In-Reply-To: <1361156277.24231.1.camel@phoenix>

Current code sets get_voltage_sel to ab8500_regulator_get_voltage_sel,
however both ab8500_regulator_mode_ops and ab8500_regulator_ops do not
have voltage_bank, voltage_reg and voltage_mask settings.
So it looks wrong to use ab8500_regulator_get_voltage_sel as
get_voltage_sel callback in these cases.

A simple fix is just not implement get_voltage_sel, regulator core will
report microvolts in sysfs even with only list_voltage().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Just found this needs to be fixed after I sent previous ab8500 patches,
this patch is on top of previous ab8500 fixes.

Axel
 drivers/regulator/ab8500.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 24d490e..67b4412 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -362,7 +362,6 @@ static struct regulator_ops ab8500_regulator_mode_ops = {
 	.get_optimum_mode	= ab8500_regulator_get_optimum_mode,
 	.set_mode		= ab8500_regulator_set_mode,
 	.get_mode		= ab8500_regulator_get_mode,
-	.get_voltage_sel 	= ab8500_regulator_get_voltage_sel,
 	.list_voltage		= regulator_list_voltage_linear,
 	.set_voltage_time_sel 	= ab8500_regulator_set_voltage_time_sel,
 };
@@ -371,7 +370,6 @@ static struct regulator_ops ab8500_regulator_ops = {
 	.enable			= ab8500_regulator_enable,
 	.disable		= ab8500_regulator_disable,
 	.is_enabled		= ab8500_regulator_is_enabled,
-	.get_voltage_sel 	= ab8500_regulator_get_voltage_sel,
 	.list_voltage		= regulator_list_voltage_linear,
 };
 
-- 
1.7.9.5




  parent reply	other threads:[~2013-02-18  3:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18  2:57 [RFT][PATCH 1/2] regulator: ab8500: Fix build error Axel Lin
2013-02-18  2:59 ` [RFT][PATCH 2/2] regulator: ab8500: Use regulator_list_voltage_linear for fixed voltage Axel Lin
2013-02-18  3:24 ` Axel Lin [this message]
2013-02-18 10:24 ` [RFT][PATCH 1/2] regulator: ab8500: Fix build error Lee Jones
2013-02-19 12:04   ` Mark Brown

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=1361157880.30510.1.camel@phoenix \
    --to=axel.lin@ingics.com \
    --cc=bengt.g.jonsson@stericsson.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=emeric.vigier@stericsson.com \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.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