diff mbox series

[RFC,1/9] drivers: regulator: qcom_spmi: enable linear range info

Message ID 20190404050931.9812-2-niklas.cassel@linaro.org (mailing list archive)
State New, archived
Headers show
Series Add support for QCOM Core Power Reduction | expand

Commit Message

Niklas Cassel April 4, 2019, 5:09 a.m. UTC
From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
---
 drivers/regulator/qcom_spmi-regulator.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Mark Brown April 4, 2019, 5:55 a.m. UTC | #1
On Thu, Apr 04, 2019 at 07:09:22AM +0200, Niklas Cassel wrote:
> From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> 
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> ---
>  drivers/regulator/qcom_spmi-regulator.c | 7 +++++++
>  1 file changed, 7 insertions(+)

This doesn't build:

  CC      drivers/regulator/qcom_spmi-regulator.o
drivers/regulator/qcom_spmi-regulator.c: In function ‘qcom_spmi_regulator_probe’:
drivers/regulator/qcom_spmi-regulator.c:1837:29: error: ‘SPMI_REGULATOR_LOGICAL_TYPE_HFS430’ undeclared (first use in this function); did you mean ‘SPMI_REGULATOR_LOGICAL_TYPE_FTSMPS’?
   if (vreg->logical_type == SPMI_REGULATOR_LOGICAL_TYPE_HFS430) {
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             SPMI_REGULATOR_LOGICAL_TYPE_FTSMPS
drivers/regulator/qcom_spmi-regulator.c:1837:29: note: each undeclared identifier is reported only once for each function it appears in
Jorge Ramirez-Ortiz April 4, 2019, 6:59 a.m. UTC | #2
On 4/4/19 07:55, Mark Brown wrote:
> On Thu, Apr 04, 2019 at 07:09:22AM +0200, Niklas Cassel wrote:
>> From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
>>
>> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
>> ---
>>  drivers/regulator/qcom_spmi-regulator.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
> 
> This doesn't build:
> 
>   CC      drivers/regulator/qcom_spmi-regulator.o
> drivers/regulator/qcom_spmi-regulator.c: In function ‘qcom_spmi_regulator_probe’:
> drivers/regulator/qcom_spmi-regulator.c:1837:29: error: ‘SPMI_REGULATOR_LOGICAL_TYPE_HFS430’ undeclared (first use in this function); did you mean ‘SPMI_REGULATOR_LOGICAL_TYPE_FTSMPS’?
>    if (vreg->logical_type == SPMI_REGULATOR_LOGICAL_TYPE_HFS430) {
>                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>                              SPMI_REGULATOR_LOGICAL_TYPE_FTSMPS
> drivers/regulator/qcom_spmi-regulator.c:1837:29: note: each undeclared identifier is reported only once for each function it appears in
> 

yeah, the SPMI regulator changes are still pending
Jorge Ramirez-Ortiz April 4, 2019, 6:59 a.m. UTC | #3
On 4/4/19 07:55, Mark Brown wrote:
> On Thu, Apr 04, 2019 at 07:09:22AM +0200, Niklas Cassel wrote:
>> From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
>>
>> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
>> ---
>>  drivers/regulator/qcom_spmi-regulator.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
> 
> This doesn't build:
> 
>   CC      drivers/regulator/qcom_spmi-regulator.o
> drivers/regulator/qcom_spmi-regulator.c: In function ‘qcom_spmi_regulator_probe’:
> drivers/regulator/qcom_spmi-regulator.c:1837:29: error: ‘SPMI_REGULATOR_LOGICAL_TYPE_HFS430’ undeclared (first use in this function); did you mean ‘SPMI_REGULATOR_LOGICAL_TYPE_FTSMPS’?
>    if (vreg->logical_type == SPMI_REGULATOR_LOGICAL_TYPE_HFS430) {
>                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>                              SPMI_REGULATOR_LOGICAL_TYPE_FTSMPS
> drivers/regulator/qcom_spmi-regulator.c:1837:29: note: each undeclared identifier is reported only once for each function it appears in
> 

yeah, the SPMI regulator changes are still pending [1]

[1] https://lore.kernel.org/patchwork/patch/1036105/
Mark Brown April 4, 2019, 7:49 a.m. UTC | #4
On Thu, Apr 04, 2019 at 08:59:10AM +0200, Jorge Ramirez wrote:

> > This doesn't build:

> yeah, the SPMI regulator changes are still pending

If you're sending patches that have dependencies on other series that
are reviewed please call that out so people are aware.
diff mbox series

Patch

diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c
index 3193506eac6f..f2edf510b0df 100644
--- a/drivers/regulator/qcom_spmi-regulator.c
+++ b/drivers/regulator/qcom_spmi-regulator.c
@@ -1907,6 +1907,7 @@  MODULE_DEVICE_TABLE(of, qcom_spmi_regulator_match);
 static int qcom_spmi_regulator_probe(struct platform_device *pdev)
 {
 	const struct spmi_regulator_data *reg;
+	const struct spmi_voltage_range *range;
 	const struct of_device_id *match;
 	struct regulator_config config = { };
 	struct regulator_dev *rdev;
@@ -1996,6 +1997,12 @@  static int qcom_spmi_regulator_probe(struct platform_device *pdev)
 			}
 		}
 
+		if (vreg->logical_type == SPMI_REGULATOR_LOGICAL_TYPE_HFS430) {
+			/* since there is only one range */
+			range = spmi_regulator_find_range(vreg);
+			vreg->desc.uV_step = range->step_uV;
+		}
+
 		config.dev = dev;
 		config.driver_data = vreg;
 		config.regmap = regmap;