All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] regulator: mcp16502: add support for ramp delay
@ 2020-11-11  9:06 ` Claudiu Beznea
  0 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: s.hauer, ttynkkynen, linus.walleij, axel.lin, linux-kernel,
	linux-arm-kernel, Claudiu Beznea

Hi,

This series adds support for ramp delay on mcp16502. It also adds
some cleanup on mcp16502.

Apart from that patches 1/6 fixes the selector validation in case
the regulator::desc::linear_min_sel is not zero.

Thank you,
Claudiu Beznea

Changes in v2:
- rebase on top of regulator/for-next
- checked 1/6 and 3/6 applies on top of regulator/for-5.10

Claudiu Beznea (6):
  regulator: core: validate selector against linear_min_sel
  regulator: core: do not continue if selector match
  regulator: mcp16502: add linear_min_sel
  regulator: mcp16502: adapt for get/set on other registers
  regulator: mcp16502: add support for ramp delay
  regulator: mcp16502: remove void documentation of struct mcp16502

 drivers/regulator/core.c     |  12 +++-
 drivers/regulator/helpers.c  |   3 +-
 drivers/regulator/mcp16502.c | 135 ++++++++++++++++++++++++++++++++++++-------
 3 files changed, 127 insertions(+), 23 deletions(-)

-- 
2.7.4


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

* [PATCH v2 0/6] regulator: mcp16502: add support for ramp delay
@ 2020-11-11  9:06 ` Claudiu Beznea
  0 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: axel.lin, s.hauer, linux-kernel, Claudiu Beznea, ttynkkynen,
	linus.walleij, linux-arm-kernel

Hi,

This series adds support for ramp delay on mcp16502. It also adds
some cleanup on mcp16502.

Apart from that patches 1/6 fixes the selector validation in case
the regulator::desc::linear_min_sel is not zero.

Thank you,
Claudiu Beznea

Changes in v2:
- rebase on top of regulator/for-next
- checked 1/6 and 3/6 applies on top of regulator/for-5.10

Claudiu Beznea (6):
  regulator: core: validate selector against linear_min_sel
  regulator: core: do not continue if selector match
  regulator: mcp16502: add linear_min_sel
  regulator: mcp16502: adapt for get/set on other registers
  regulator: mcp16502: add support for ramp delay
  regulator: mcp16502: remove void documentation of struct mcp16502

 drivers/regulator/core.c     |  12 +++-
 drivers/regulator/helpers.c  |   3 +-
 drivers/regulator/mcp16502.c | 135 ++++++++++++++++++++++++++++++++++++-------
 3 files changed, 127 insertions(+), 23 deletions(-)

-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 1/6] regulator: core: validate selector against linear_min_sel
  2020-11-11  9:06 ` Claudiu Beznea
@ 2020-11-11  9:06   ` Claudiu Beznea
  -1 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: s.hauer, ttynkkynen, linus.walleij, axel.lin, linux-kernel,
	linux-arm-kernel, Claudiu Beznea

There are regulators who's min selector is not zero. Selectors loops
(looping b/w zero and regulator::desc::n_voltages) might throw errors
because invalid selectors are used (lower than
regulator::desc::linear_min_sel). For this situations validate selectors
against regulator::desc::linear_min_sel.

Fixes: 3a40cfc36bb3d ("regulator: core: create unlocked version of regulator_list_voltage")
Fixes: 04eca28cde52c ("regulator: Add helpers for low-level register access")
Fixes: 88cd222b259d6 ("regulator: provide consumer interface for fall/rise time")
Fixes: d295f7670127e ("regulator: core: Move list_voltage_{linear,linear_range,table} to helpers.c")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/regulator/core.c    | 9 +++++++--
 drivers/regulator/helpers.c | 3 ++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 2e1ea18221ef..1d0d35f14f37 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2958,7 +2958,8 @@ static int _regulator_list_voltage(struct regulator_dev *rdev,
 		return rdev->desc->fixed_uV;
 
 	if (ops->list_voltage) {
-		if (selector >= rdev->desc->n_voltages)
+		if (selector >= rdev->desc->n_voltages ||
+		    selector < rdev->desc->linear_min_sel)
 			return -EINVAL;
 		if (lock)
 			regulator_lock(rdev);
@@ -3109,7 +3110,8 @@ int regulator_list_hardware_vsel(struct regulator *regulator,
 	struct regulator_dev *rdev = regulator->rdev;
 	const struct regulator_ops *ops = rdev->desc->ops;
 
-	if (selector >= rdev->desc->n_voltages)
+	if (selector >= rdev->desc->n_voltages ||
+	    selector < rdev->desc->linear_min_sel)
 		return -EINVAL;
 	if (ops->set_voltage_sel != regulator_set_voltage_sel_regmap)
 		return -EOPNOTSUPP;
@@ -4032,6 +4034,9 @@ int regulator_set_voltage_time(struct regulator *regulator,
 
 	for (i = 0; i < rdev->desc->n_voltages; i++) {
 		/* We only look for exact voltage matches here */
+		if (i < rdev->desc->linear_min_sel)
+			continue;
+
 		voltage = regulator_list_voltage(regulator, i);
 		if (voltage < 0)
 			return -EINVAL;
diff --git a/drivers/regulator/helpers.c b/drivers/regulator/helpers.c
index e4bb09bbd3fa..974f1a63993d 100644
--- a/drivers/regulator/helpers.c
+++ b/drivers/regulator/helpers.c
@@ -647,7 +647,8 @@ int regulator_list_voltage_table(struct regulator_dev *rdev,
 		return -EINVAL;
 	}
 
-	if (selector >= rdev->desc->n_voltages)
+	if (selector >= rdev->desc->n_voltages ||
+	    selector < rdev->desc->linear_min_sel)
 		return -EINVAL;
 
 	return rdev->desc->volt_table[selector];
-- 
2.7.4


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

* [PATCH v2 1/6] regulator: core: validate selector against linear_min_sel
@ 2020-11-11  9:06   ` Claudiu Beznea
  0 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: axel.lin, s.hauer, linux-kernel, Claudiu Beznea, ttynkkynen,
	linus.walleij, linux-arm-kernel

There are regulators who's min selector is not zero. Selectors loops
(looping b/w zero and regulator::desc::n_voltages) might throw errors
because invalid selectors are used (lower than
regulator::desc::linear_min_sel). For this situations validate selectors
against regulator::desc::linear_min_sel.

Fixes: 3a40cfc36bb3d ("regulator: core: create unlocked version of regulator_list_voltage")
Fixes: 04eca28cde52c ("regulator: Add helpers for low-level register access")
Fixes: 88cd222b259d6 ("regulator: provide consumer interface for fall/rise time")
Fixes: d295f7670127e ("regulator: core: Move list_voltage_{linear,linear_range,table} to helpers.c")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/regulator/core.c    | 9 +++++++--
 drivers/regulator/helpers.c | 3 ++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 2e1ea18221ef..1d0d35f14f37 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2958,7 +2958,8 @@ static int _regulator_list_voltage(struct regulator_dev *rdev,
 		return rdev->desc->fixed_uV;
 
 	if (ops->list_voltage) {
-		if (selector >= rdev->desc->n_voltages)
+		if (selector >= rdev->desc->n_voltages ||
+		    selector < rdev->desc->linear_min_sel)
 			return -EINVAL;
 		if (lock)
 			regulator_lock(rdev);
@@ -3109,7 +3110,8 @@ int regulator_list_hardware_vsel(struct regulator *regulator,
 	struct regulator_dev *rdev = regulator->rdev;
 	const struct regulator_ops *ops = rdev->desc->ops;
 
-	if (selector >= rdev->desc->n_voltages)
+	if (selector >= rdev->desc->n_voltages ||
+	    selector < rdev->desc->linear_min_sel)
 		return -EINVAL;
 	if (ops->set_voltage_sel != regulator_set_voltage_sel_regmap)
 		return -EOPNOTSUPP;
@@ -4032,6 +4034,9 @@ int regulator_set_voltage_time(struct regulator *regulator,
 
 	for (i = 0; i < rdev->desc->n_voltages; i++) {
 		/* We only look for exact voltage matches here */
+		if (i < rdev->desc->linear_min_sel)
+			continue;
+
 		voltage = regulator_list_voltage(regulator, i);
 		if (voltage < 0)
 			return -EINVAL;
diff --git a/drivers/regulator/helpers.c b/drivers/regulator/helpers.c
index e4bb09bbd3fa..974f1a63993d 100644
--- a/drivers/regulator/helpers.c
+++ b/drivers/regulator/helpers.c
@@ -647,7 +647,8 @@ int regulator_list_voltage_table(struct regulator_dev *rdev,
 		return -EINVAL;
 	}
 
-	if (selector >= rdev->desc->n_voltages)
+	if (selector >= rdev->desc->n_voltages ||
+	    selector < rdev->desc->linear_min_sel)
 		return -EINVAL;
 
 	return rdev->desc->volt_table[selector];
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 2/6] regulator: core: do not continue if selector match
  2020-11-11  9:06 ` Claudiu Beznea
@ 2020-11-11  9:06   ` Claudiu Beznea
  -1 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: s.hauer, ttynkkynen, linus.walleij, axel.lin, linux-kernel,
	linux-arm-kernel, Claudiu Beznea

Do not continue if selector has already been located.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/regulator/core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 1d0d35f14f37..6724324d372c 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -4037,6 +4037,9 @@ int regulator_set_voltage_time(struct regulator *regulator,
 		if (i < rdev->desc->linear_min_sel)
 			continue;
 
+		if (old_sel >= 0 && new_sel >= 0)
+			break;
+
 		voltage = regulator_list_voltage(regulator, i);
 		if (voltage < 0)
 			return -EINVAL;
-- 
2.7.4


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

* [PATCH v2 2/6] regulator: core: do not continue if selector match
@ 2020-11-11  9:06   ` Claudiu Beznea
  0 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: axel.lin, s.hauer, linux-kernel, Claudiu Beznea, ttynkkynen,
	linus.walleij, linux-arm-kernel

Do not continue if selector has already been located.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/regulator/core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 1d0d35f14f37..6724324d372c 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -4037,6 +4037,9 @@ int regulator_set_voltage_time(struct regulator *regulator,
 		if (i < rdev->desc->linear_min_sel)
 			continue;
 
+		if (old_sel >= 0 && new_sel >= 0)
+			break;
+
 		voltage = regulator_list_voltage(regulator, i);
 		if (voltage < 0)
 			return -EINVAL;
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 3/6] regulator: mcp16502: add linear_min_sel
  2020-11-11  9:06 ` Claudiu Beznea
@ 2020-11-11  9:06   ` Claudiu Beznea
  -1 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: s.hauer, ttynkkynen, linus.walleij, axel.lin, linux-kernel,
	linux-arm-kernel, Claudiu Beznea

Selectors b/w zero and VDD_LOW_SEL are not valid. Use linear_min_sel.

Fixes: 919261c03e7ca ("regulator: mcp16502: add regulator driver for MCP16502")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/regulator/mcp16502.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index 6d0ad74935b3..ab78f831f5bf 100644
--- a/drivers/regulator/mcp16502.c
+++ b/drivers/regulator/mcp16502.c
@@ -93,6 +93,7 @@ static unsigned int mcp16502_of_map_mode(unsigned int mode)
 		.owner			= THIS_MODULE,			\
 		.n_voltages		= MCP16502_VSEL + 1,		\
 		.linear_ranges		= _ranges,			\
+		.linear_min_sel		= VDD_LOW_SEL,			\
 		.n_linear_ranges	= ARRAY_SIZE(_ranges),		\
 		.of_match		= of_match_ptr(_name),		\
 		.of_map_mode		= mcp16502_of_map_mode,		\
-- 
2.7.4


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

* [PATCH v2 3/6] regulator: mcp16502: add linear_min_sel
@ 2020-11-11  9:06   ` Claudiu Beznea
  0 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: axel.lin, s.hauer, linux-kernel, Claudiu Beznea, ttynkkynen,
	linus.walleij, linux-arm-kernel

Selectors b/w zero and VDD_LOW_SEL are not valid. Use linear_min_sel.

Fixes: 919261c03e7ca ("regulator: mcp16502: add regulator driver for MCP16502")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/regulator/mcp16502.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index 6d0ad74935b3..ab78f831f5bf 100644
--- a/drivers/regulator/mcp16502.c
+++ b/drivers/regulator/mcp16502.c
@@ -93,6 +93,7 @@ static unsigned int mcp16502_of_map_mode(unsigned int mode)
 		.owner			= THIS_MODULE,			\
 		.n_voltages		= MCP16502_VSEL + 1,		\
 		.linear_ranges		= _ranges,			\
+		.linear_min_sel		= VDD_LOW_SEL,			\
 		.n_linear_ranges	= ARRAY_SIZE(_ranges),		\
 		.of_match		= of_match_ptr(_name),		\
 		.of_map_mode		= mcp16502_of_map_mode,		\
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 4/6] regulator: mcp16502: adapt for get/set on other registers
  2020-11-11  9:06 ` Claudiu Beznea
@ 2020-11-11  9:06   ` Claudiu Beznea
  -1 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: s.hauer, ttynkkynen, linus.walleij, axel.lin, linux-kernel,
	linux-arm-kernel, Claudiu Beznea

MCP16502 have multiple registers for each regulator (as described
in enum mcp16502_reg). Adapt the code to be able to get/set all these
registers. This is necessary for the following commits.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/regulator/mcp16502.c | 43 +++++++++++++++++++++++++++----------------
 1 file changed, 27 insertions(+), 16 deletions(-)

diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index ab78f831f5bf..48eb64bc4018 100644
--- a/drivers/regulator/mcp16502.c
+++ b/drivers/regulator/mcp16502.c
@@ -54,13 +54,9 @@
  * This function is useful for iterating over all regulators and accessing their
  * registers in a generic way or accessing a regulator device by its id.
  */
-#define MCP16502_BASE(i) (((i) + 1) << 4)
+#define MCP16502_REG_BASE(i, r) ((((i) + 1) << 4) + MCP16502_REG_##r)
 #define MCP16502_STAT_BASE(i) ((i) + 5)
 
-#define MCP16502_OFFSET_MODE_A 0
-#define MCP16502_OFFSET_MODE_LPM 1
-#define MCP16502_OFFSET_MODE_HIB 2
-
 #define MCP16502_OPMODE_ACTIVE REGULATOR_MODE_NORMAL
 #define MCP16502_OPMODE_LPM REGULATOR_MODE_IDLE
 #define MCP16502_OPMODE_HIB REGULATOR_MODE_STANDBY
@@ -75,6 +71,23 @@
 #define MCP16502_MIN_REG 0x0
 #define MCP16502_MAX_REG 0x65
 
+/**
+ * enum mcp16502_reg - MCP16502 regulators's registers
+ * @MCP16502_REG_A: active state register
+ * @MCP16502_REG_LPM: low power mode state register
+ * @MCP16502_REG_HIB: hibernate state register
+ * @MCP16502_REG_SEQ: startup sequence register
+ * @MCP16502_REG_CFG: configuration register
+ */
+enum mcp16502_reg {
+	MCP16502_REG_A,
+	MCP16502_REG_LPM,
+	MCP16502_REG_HIB,
+	MCP16502_REG_HPM,
+	MCP16502_REG_SEQ,
+	MCP16502_REG_CFG,
+};
+
 static unsigned int mcp16502_of_map_mode(unsigned int mode)
 {
 	if (mode == REGULATOR_MODE_NORMAL || mode == REGULATOR_MODE_IDLE)
@@ -144,22 +157,20 @@ static void mcp16502_gpio_set_mode(struct mcp16502 *mcp, int mode)
 }
 
 /*
- * mcp16502_get_reg() - get the PMIC's configuration register for opmode
+ * mcp16502_get_reg() - get the PMIC's state configuration register for opmode
  *
  * @rdev: the regulator whose register we are searching
  * @opmode: the PMIC's operating mode ACTIVE, Low-power, Hibernate
  */
-static int mcp16502_get_reg(struct regulator_dev *rdev, int opmode)
+static int mcp16502_get_state_reg(struct regulator_dev *rdev, int opmode)
 {
-	int reg = MCP16502_BASE(rdev_get_id(rdev));
-
 	switch (opmode) {
 	case MCP16502_OPMODE_ACTIVE:
-		return reg + MCP16502_OFFSET_MODE_A;
+		return MCP16502_REG_BASE(rdev_get_id(rdev), A);
 	case MCP16502_OPMODE_LPM:
-		return reg + MCP16502_OFFSET_MODE_LPM;
+		return MCP16502_REG_BASE(rdev_get_id(rdev), LPM);
 	case MCP16502_OPMODE_HIB:
-		return reg + MCP16502_OFFSET_MODE_HIB;
+		return MCP16502_REG_BASE(rdev_get_id(rdev), HIB);
 	default:
 		return -EINVAL;
 	}
@@ -179,7 +190,7 @@ static unsigned int mcp16502_get_mode(struct regulator_dev *rdev)
 	unsigned int val;
 	int ret, reg;
 
-	reg = mcp16502_get_reg(rdev, MCP16502_OPMODE_ACTIVE);
+	reg = mcp16502_get_state_reg(rdev, MCP16502_OPMODE_ACTIVE);
 	if (reg < 0)
 		return reg;
 
@@ -210,7 +221,7 @@ static int _mcp16502_set_mode(struct regulator_dev *rdev, unsigned int mode,
 	int val;
 	int reg;
 
-	reg = mcp16502_get_reg(rdev, op_mode);
+	reg = mcp16502_get_state_reg(rdev, op_mode);
 	if (reg < 0)
 		return reg;
 
@@ -269,10 +280,10 @@ static int mcp16502_suspend_get_target_reg(struct regulator_dev *rdev)
 {
 	switch (pm_suspend_target_state) {
 	case PM_SUSPEND_STANDBY:
-		return mcp16502_get_reg(rdev, MCP16502_OPMODE_LPM);
+		return mcp16502_get_state_reg(rdev, MCP16502_OPMODE_LPM);
 	case PM_SUSPEND_ON:
 	case PM_SUSPEND_MEM:
-		return mcp16502_get_reg(rdev, MCP16502_OPMODE_HIB);
+		return mcp16502_get_state_reg(rdev, MCP16502_OPMODE_HIB);
 	default:
 		dev_err(&rdev->dev, "invalid suspend target: %d\n",
 			pm_suspend_target_state);
-- 
2.7.4


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

* [PATCH v2 4/6] regulator: mcp16502: adapt for get/set on other registers
@ 2020-11-11  9:06   ` Claudiu Beznea
  0 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: axel.lin, s.hauer, linux-kernel, Claudiu Beznea, ttynkkynen,
	linus.walleij, linux-arm-kernel

MCP16502 have multiple registers for each regulator (as described
in enum mcp16502_reg). Adapt the code to be able to get/set all these
registers. This is necessary for the following commits.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/regulator/mcp16502.c | 43 +++++++++++++++++++++++++++----------------
 1 file changed, 27 insertions(+), 16 deletions(-)

diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index ab78f831f5bf..48eb64bc4018 100644
--- a/drivers/regulator/mcp16502.c
+++ b/drivers/regulator/mcp16502.c
@@ -54,13 +54,9 @@
  * This function is useful for iterating over all regulators and accessing their
  * registers in a generic way or accessing a regulator device by its id.
  */
-#define MCP16502_BASE(i) (((i) + 1) << 4)
+#define MCP16502_REG_BASE(i, r) ((((i) + 1) << 4) + MCP16502_REG_##r)
 #define MCP16502_STAT_BASE(i) ((i) + 5)
 
-#define MCP16502_OFFSET_MODE_A 0
-#define MCP16502_OFFSET_MODE_LPM 1
-#define MCP16502_OFFSET_MODE_HIB 2
-
 #define MCP16502_OPMODE_ACTIVE REGULATOR_MODE_NORMAL
 #define MCP16502_OPMODE_LPM REGULATOR_MODE_IDLE
 #define MCP16502_OPMODE_HIB REGULATOR_MODE_STANDBY
@@ -75,6 +71,23 @@
 #define MCP16502_MIN_REG 0x0
 #define MCP16502_MAX_REG 0x65
 
+/**
+ * enum mcp16502_reg - MCP16502 regulators's registers
+ * @MCP16502_REG_A: active state register
+ * @MCP16502_REG_LPM: low power mode state register
+ * @MCP16502_REG_HIB: hibernate state register
+ * @MCP16502_REG_SEQ: startup sequence register
+ * @MCP16502_REG_CFG: configuration register
+ */
+enum mcp16502_reg {
+	MCP16502_REG_A,
+	MCP16502_REG_LPM,
+	MCP16502_REG_HIB,
+	MCP16502_REG_HPM,
+	MCP16502_REG_SEQ,
+	MCP16502_REG_CFG,
+};
+
 static unsigned int mcp16502_of_map_mode(unsigned int mode)
 {
 	if (mode == REGULATOR_MODE_NORMAL || mode == REGULATOR_MODE_IDLE)
@@ -144,22 +157,20 @@ static void mcp16502_gpio_set_mode(struct mcp16502 *mcp, int mode)
 }
 
 /*
- * mcp16502_get_reg() - get the PMIC's configuration register for opmode
+ * mcp16502_get_reg() - get the PMIC's state configuration register for opmode
  *
  * @rdev: the regulator whose register we are searching
  * @opmode: the PMIC's operating mode ACTIVE, Low-power, Hibernate
  */
-static int mcp16502_get_reg(struct regulator_dev *rdev, int opmode)
+static int mcp16502_get_state_reg(struct regulator_dev *rdev, int opmode)
 {
-	int reg = MCP16502_BASE(rdev_get_id(rdev));
-
 	switch (opmode) {
 	case MCP16502_OPMODE_ACTIVE:
-		return reg + MCP16502_OFFSET_MODE_A;
+		return MCP16502_REG_BASE(rdev_get_id(rdev), A);
 	case MCP16502_OPMODE_LPM:
-		return reg + MCP16502_OFFSET_MODE_LPM;
+		return MCP16502_REG_BASE(rdev_get_id(rdev), LPM);
 	case MCP16502_OPMODE_HIB:
-		return reg + MCP16502_OFFSET_MODE_HIB;
+		return MCP16502_REG_BASE(rdev_get_id(rdev), HIB);
 	default:
 		return -EINVAL;
 	}
@@ -179,7 +190,7 @@ static unsigned int mcp16502_get_mode(struct regulator_dev *rdev)
 	unsigned int val;
 	int ret, reg;
 
-	reg = mcp16502_get_reg(rdev, MCP16502_OPMODE_ACTIVE);
+	reg = mcp16502_get_state_reg(rdev, MCP16502_OPMODE_ACTIVE);
 	if (reg < 0)
 		return reg;
 
@@ -210,7 +221,7 @@ static int _mcp16502_set_mode(struct regulator_dev *rdev, unsigned int mode,
 	int val;
 	int reg;
 
-	reg = mcp16502_get_reg(rdev, op_mode);
+	reg = mcp16502_get_state_reg(rdev, op_mode);
 	if (reg < 0)
 		return reg;
 
@@ -269,10 +280,10 @@ static int mcp16502_suspend_get_target_reg(struct regulator_dev *rdev)
 {
 	switch (pm_suspend_target_state) {
 	case PM_SUSPEND_STANDBY:
-		return mcp16502_get_reg(rdev, MCP16502_OPMODE_LPM);
+		return mcp16502_get_state_reg(rdev, MCP16502_OPMODE_LPM);
 	case PM_SUSPEND_ON:
 	case PM_SUSPEND_MEM:
-		return mcp16502_get_reg(rdev, MCP16502_OPMODE_HIB);
+		return mcp16502_get_state_reg(rdev, MCP16502_OPMODE_HIB);
 	default:
 		dev_err(&rdev->dev, "invalid suspend target: %d\n",
 			pm_suspend_target_state);
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 5/6] regulator: mcp16502: add support for ramp delay
  2020-11-11  9:06 ` Claudiu Beznea
@ 2020-11-11  9:06   ` Claudiu Beznea
  -1 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: s.hauer, ttynkkynen, linus.walleij, axel.lin, linux-kernel,
	linux-arm-kernel, Claudiu Beznea

MCP16502 have configurable ramp delay support (via DVSR bits in
regulators' CFG register).

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/regulator/mcp16502.c | 89 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 87 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index 48eb64bc4018..777d1a6cd1c5 100644
--- a/drivers/regulator/mcp16502.c
+++ b/drivers/regulator/mcp16502.c
@@ -22,8 +22,9 @@
 #define VDD_LOW_SEL 0x0D
 #define VDD_HIGH_SEL 0x3F
 
-#define MCP16502_FLT BIT(7)
-#define MCP16502_ENS BIT(0)
+#define MCP16502_FLT		BIT(7)
+#define MCP16502_DVSR		GENMASK(3, 2)
+#define MCP16502_ENS		BIT(0)
 
 /*
  * The PMIC has four sets of registers corresponding to four power modes:
@@ -88,6 +89,12 @@ enum mcp16502_reg {
 	MCP16502_REG_CFG,
 };
 
+/* Ramp delay (uV/us) for buck1, ldo1, ldo2. */
+static const int mcp16502_ramp_b1l12[] = { 6250, 3125, 2083, 1563 };
+
+/* Ramp delay (uV/us) for buck2, buck3, buck4. */
+static const int mcp16502_ramp_b234[] = { 3125, 1563, 1042, 781 };
+
 static unsigned int mcp16502_of_map_mode(unsigned int mode)
 {
 	if (mode == REGULATOR_MODE_NORMAL || mode == REGULATOR_MODE_IDLE)
@@ -271,6 +278,80 @@ static int mcp16502_get_status(struct regulator_dev *rdev)
 	return REGULATOR_STATUS_UNDEFINED;
 }
 
+static int mcp16502_set_voltage_time_sel(struct regulator_dev *rdev,
+					 unsigned int old_sel,
+					 unsigned int new_sel)
+{
+	static const u8 us_ramp[] = { 8, 16, 24, 32 };
+	int id = rdev_get_id(rdev);
+	unsigned int uV_delta, val;
+	int ret;
+
+	ret = regmap_read(rdev->regmap, MCP16502_REG_BASE(id, CFG), &val);
+	if (ret)
+		return ret;
+
+	val = (val & MCP16502_DVSR) >> 2;
+	uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
+		       old_sel * rdev->desc->linear_ranges->uV_step);
+	switch (id) {
+	case BUCK1:
+	case LDO1:
+	case LDO2:
+		ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
+					mcp16502_ramp_b1l12[val]);
+		break;
+
+	case BUCK2:
+	case BUCK3:
+	case BUCK4:
+		ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
+					mcp16502_ramp_b234[val]);
+		break;
+
+	default:
+		return -EINVAL;
+	}
+
+	return ret;
+}
+
+static int mcp16502_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
+{
+	const int *ramp;
+	int id = rdev_get_id(rdev);
+	unsigned int i, size;
+
+	switch (id) {
+	case BUCK1:
+	case LDO1:
+	case LDO2:
+		ramp = mcp16502_ramp_b1l12;
+		size = ARRAY_SIZE(mcp16502_ramp_b1l12);
+		break;
+
+	case BUCK2:
+	case BUCK3:
+	case BUCK4:
+		ramp = mcp16502_ramp_b234;
+		size = ARRAY_SIZE(mcp16502_ramp_b234);
+		break;
+
+	default:
+		return -EINVAL;
+	}
+
+	for (i = 0; i < size; i++) {
+		if (ramp[i] == ramp_delay)
+			break;
+	}
+	if (i == size)
+		return -EINVAL;
+
+	return regmap_update_bits(rdev->regmap, MCP16502_REG_BASE(id, CFG),
+				  MCP16502_DVSR, (i << 2));
+}
+
 #ifdef CONFIG_SUSPEND
 /*
  * mcp16502_suspend_get_target_reg() - get the reg of the target suspend PMIC
@@ -365,6 +446,8 @@ static const struct regulator_ops mcp16502_buck_ops = {
 	.disable			= regulator_disable_regmap,
 	.is_enabled			= regulator_is_enabled_regmap,
 	.get_status			= mcp16502_get_status,
+	.set_voltage_time_sel		= mcp16502_set_voltage_time_sel,
+	.set_ramp_delay			= mcp16502_set_ramp_delay,
 
 	.set_mode			= mcp16502_set_mode,
 	.get_mode			= mcp16502_get_mode,
@@ -389,6 +472,8 @@ static const struct regulator_ops mcp16502_ldo_ops = {
 	.disable			= regulator_disable_regmap,
 	.is_enabled			= regulator_is_enabled_regmap,
 	.get_status			= mcp16502_get_status,
+	.set_voltage_time_sel		= mcp16502_set_voltage_time_sel,
+	.set_ramp_delay			= mcp16502_set_ramp_delay,
 
 #ifdef CONFIG_SUSPEND
 	.set_suspend_voltage		= mcp16502_set_suspend_voltage,
-- 
2.7.4


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

* [PATCH v2 5/6] regulator: mcp16502: add support for ramp delay
@ 2020-11-11  9:06   ` Claudiu Beznea
  0 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: axel.lin, s.hauer, linux-kernel, Claudiu Beznea, ttynkkynen,
	linus.walleij, linux-arm-kernel

MCP16502 have configurable ramp delay support (via DVSR bits in
regulators' CFG register).

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/regulator/mcp16502.c | 89 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 87 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index 48eb64bc4018..777d1a6cd1c5 100644
--- a/drivers/regulator/mcp16502.c
+++ b/drivers/regulator/mcp16502.c
@@ -22,8 +22,9 @@
 #define VDD_LOW_SEL 0x0D
 #define VDD_HIGH_SEL 0x3F
 
-#define MCP16502_FLT BIT(7)
-#define MCP16502_ENS BIT(0)
+#define MCP16502_FLT		BIT(7)
+#define MCP16502_DVSR		GENMASK(3, 2)
+#define MCP16502_ENS		BIT(0)
 
 /*
  * The PMIC has four sets of registers corresponding to four power modes:
@@ -88,6 +89,12 @@ enum mcp16502_reg {
 	MCP16502_REG_CFG,
 };
 
+/* Ramp delay (uV/us) for buck1, ldo1, ldo2. */
+static const int mcp16502_ramp_b1l12[] = { 6250, 3125, 2083, 1563 };
+
+/* Ramp delay (uV/us) for buck2, buck3, buck4. */
+static const int mcp16502_ramp_b234[] = { 3125, 1563, 1042, 781 };
+
 static unsigned int mcp16502_of_map_mode(unsigned int mode)
 {
 	if (mode == REGULATOR_MODE_NORMAL || mode == REGULATOR_MODE_IDLE)
@@ -271,6 +278,80 @@ static int mcp16502_get_status(struct regulator_dev *rdev)
 	return REGULATOR_STATUS_UNDEFINED;
 }
 
+static int mcp16502_set_voltage_time_sel(struct regulator_dev *rdev,
+					 unsigned int old_sel,
+					 unsigned int new_sel)
+{
+	static const u8 us_ramp[] = { 8, 16, 24, 32 };
+	int id = rdev_get_id(rdev);
+	unsigned int uV_delta, val;
+	int ret;
+
+	ret = regmap_read(rdev->regmap, MCP16502_REG_BASE(id, CFG), &val);
+	if (ret)
+		return ret;
+
+	val = (val & MCP16502_DVSR) >> 2;
+	uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
+		       old_sel * rdev->desc->linear_ranges->uV_step);
+	switch (id) {
+	case BUCK1:
+	case LDO1:
+	case LDO2:
+		ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
+					mcp16502_ramp_b1l12[val]);
+		break;
+
+	case BUCK2:
+	case BUCK3:
+	case BUCK4:
+		ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
+					mcp16502_ramp_b234[val]);
+		break;
+
+	default:
+		return -EINVAL;
+	}
+
+	return ret;
+}
+
+static int mcp16502_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
+{
+	const int *ramp;
+	int id = rdev_get_id(rdev);
+	unsigned int i, size;
+
+	switch (id) {
+	case BUCK1:
+	case LDO1:
+	case LDO2:
+		ramp = mcp16502_ramp_b1l12;
+		size = ARRAY_SIZE(mcp16502_ramp_b1l12);
+		break;
+
+	case BUCK2:
+	case BUCK3:
+	case BUCK4:
+		ramp = mcp16502_ramp_b234;
+		size = ARRAY_SIZE(mcp16502_ramp_b234);
+		break;
+
+	default:
+		return -EINVAL;
+	}
+
+	for (i = 0; i < size; i++) {
+		if (ramp[i] == ramp_delay)
+			break;
+	}
+	if (i == size)
+		return -EINVAL;
+
+	return regmap_update_bits(rdev->regmap, MCP16502_REG_BASE(id, CFG),
+				  MCP16502_DVSR, (i << 2));
+}
+
 #ifdef CONFIG_SUSPEND
 /*
  * mcp16502_suspend_get_target_reg() - get the reg of the target suspend PMIC
@@ -365,6 +446,8 @@ static const struct regulator_ops mcp16502_buck_ops = {
 	.disable			= regulator_disable_regmap,
 	.is_enabled			= regulator_is_enabled_regmap,
 	.get_status			= mcp16502_get_status,
+	.set_voltage_time_sel		= mcp16502_set_voltage_time_sel,
+	.set_ramp_delay			= mcp16502_set_ramp_delay,
 
 	.set_mode			= mcp16502_set_mode,
 	.get_mode			= mcp16502_get_mode,
@@ -389,6 +472,8 @@ static const struct regulator_ops mcp16502_ldo_ops = {
 	.disable			= regulator_disable_regmap,
 	.is_enabled			= regulator_is_enabled_regmap,
 	.get_status			= mcp16502_get_status,
+	.set_voltage_time_sel		= mcp16502_set_voltage_time_sel,
+	.set_ramp_delay			= mcp16502_set_ramp_delay,
 
 #ifdef CONFIG_SUSPEND
 	.set_suspend_voltage		= mcp16502_set_suspend_voltage,
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 6/6] regulator: mcp16502: remove void documentation of struct mcp16502
  2020-11-11  9:06 ` Claudiu Beznea
@ 2020-11-11  9:06   ` Claudiu Beznea
  -1 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: s.hauer, ttynkkynen, linus.walleij, axel.lin, linux-kernel,
	linux-arm-kernel, Claudiu Beznea

struct mcp16502 has no members called rdev or rmap. Remove the
documentation.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/regulator/mcp16502.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index 777d1a6cd1c5..c6b72d1d38a9 100644
--- a/drivers/regulator/mcp16502.c
+++ b/drivers/regulator/mcp16502.c
@@ -135,8 +135,6 @@ enum {
 
 /*
  * struct mcp16502 - PMIC representation
- * @rdev: the regulators belonging to this chip
- * @rmap: regmap to be used for I2C communication
  * @lpm: LPM GPIO descriptor
  */
 struct mcp16502 {
-- 
2.7.4


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

* [PATCH v2 6/6] regulator: mcp16502: remove void documentation of struct mcp16502
@ 2020-11-11  9:06   ` Claudiu Beznea
  0 siblings, 0 replies; 19+ messages in thread
From: Claudiu Beznea @ 2020-11-11  9:06 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: axel.lin, s.hauer, linux-kernel, Claudiu Beznea, ttynkkynen,
	linus.walleij, linux-arm-kernel

struct mcp16502 has no members called rdev or rmap. Remove the
documentation.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/regulator/mcp16502.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index 777d1a6cd1c5..c6b72d1d38a9 100644
--- a/drivers/regulator/mcp16502.c
+++ b/drivers/regulator/mcp16502.c
@@ -135,8 +135,6 @@ enum {
 
 /*
  * struct mcp16502 - PMIC representation
- * @rdev: the regulators belonging to this chip
- * @rmap: regmap to be used for I2C communication
  * @lpm: LPM GPIO descriptor
  */
 struct mcp16502 {
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 5/6] regulator: mcp16502: add support for ramp delay
  2020-11-11  9:06   ` Claudiu Beznea
  (?)
@ 2020-11-13  7:41     ` kernel test robot
  -1 siblings, 0 replies; 19+ messages in thread
From: kernel test robot @ 2020-11-13  7:41 UTC (permalink / raw)
  To: Claudiu Beznea, lgirdwood, broonie
  Cc: kbuild-all, s.hauer, ttynkkynen, linus.walleij, axel.lin,
	linux-kernel, linux-arm-kernel, Claudiu Beznea

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

Hi Claudiu,

I love your patch! Yet something to improve:

[auto build test ERROR on regulator/for-next]
[also build test ERROR on linus/master linux/master v5.10-rc3 next-20201112]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Claudiu-Beznea/regulator-mcp16502-add-support-for-ramp-delay/20201111-170928
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
config: nios2-randconfig-r034-20201111 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/d97d6b70286fa3a28e744a55da1b7eb6a026cee3
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Claudiu-Beznea/regulator-mcp16502-add-support-for-ramp-delay/20201111-170928
        git checkout d97d6b70286fa3a28e744a55da1b7eb6a026cee3
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:20,
                    from ./arch/nios2/include/generated/asm/bug.h:1,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/current.h:5,
                    from ./arch/nios2/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/gpio/driver.h:5,
                    from include/asm-generic/gpio.h:11,
                    from include/linux/gpio.h:62,
                    from drivers/regulator/mcp16502.c:11:
   drivers/regulator/mcp16502.c: In function 'mcp16502_set_voltage_time_sel':
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:287:38: note: in definition of macro '__abs_choose_expr'
     287 |  __builtin_types_compatible_p(typeof(x),   signed type) || \
         |                                      ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:287:38: note: in definition of macro '__abs_choose_expr'
     287 |  __builtin_types_compatible_p(typeof(x),   signed type) || \
         |                                      ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:288:38: note: in definition of macro '__abs_choose_expr'
     288 |  __builtin_types_compatible_p(typeof(x), unsigned type),  \
         |                                      ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:288:38: note: in definition of macro '__abs_choose_expr'
     288 |  __builtin_types_compatible_p(typeof(x), unsigned type),  \
         |                                      ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:24: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                        ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:24: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                        ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> include/linux/kernel.h:281:3: error: first argument to '__builtin_choose_expr' not a constant
     281 |   __builtin_choose_expr(     \
         |   ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:276:16: note: in expansion of macro '__abs_choose_expr'
     276 | #define abs(x) __abs_choose_expr(x, long long,    \
         |                ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~

vim +295 drivers/regulator/mcp16502.c

   280	
   281	static int mcp16502_set_voltage_time_sel(struct regulator_dev *rdev,
   282						 unsigned int old_sel,
   283						 unsigned int new_sel)
   284	{
   285		static const u8 us_ramp[] = { 8, 16, 24, 32 };
   286		int id = rdev_get_id(rdev);
   287		unsigned int uV_delta, val;
   288		int ret;
   289	
   290		ret = regmap_read(rdev->regmap, MCP16502_REG_BASE(id, CFG), &val);
   291		if (ret)
   292			return ret;
   293	
   294		val = (val & MCP16502_DVSR) >> 2;
 > 295		uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
   296			       old_sel * rdev->desc->linear_ranges->uV_step);
   297		switch (id) {
   298		case BUCK1:
   299		case LDO1:
   300		case LDO2:
   301			ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
   302						mcp16502_ramp_b1l12[val]);
   303			break;
   304	
   305		case BUCK2:
   306		case BUCK3:
   307		case BUCK4:
   308			ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
   309						mcp16502_ramp_b234[val]);
   310			break;
   311	
   312		default:
   313			return -EINVAL;
   314		}
   315	
   316		return ret;
   317	}
   318	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25020 bytes --]

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

* Re: [PATCH v2 5/6] regulator: mcp16502: add support for ramp delay
@ 2020-11-13  7:41     ` kernel test robot
  0 siblings, 0 replies; 19+ messages in thread
From: kernel test robot @ 2020-11-13  7:41 UTC (permalink / raw)
  To: Claudiu Beznea, lgirdwood, broonie
  Cc: axel.lin, s.hauer, linux-kernel, Claudiu Beznea, ttynkkynen,
	kbuild-all, linus.walleij, linux-arm-kernel

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

Hi Claudiu,

I love your patch! Yet something to improve:

[auto build test ERROR on regulator/for-next]
[also build test ERROR on linus/master linux/master v5.10-rc3 next-20201112]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Claudiu-Beznea/regulator-mcp16502-add-support-for-ramp-delay/20201111-170928
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
config: nios2-randconfig-r034-20201111 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/d97d6b70286fa3a28e744a55da1b7eb6a026cee3
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Claudiu-Beznea/regulator-mcp16502-add-support-for-ramp-delay/20201111-170928
        git checkout d97d6b70286fa3a28e744a55da1b7eb6a026cee3
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:20,
                    from ./arch/nios2/include/generated/asm/bug.h:1,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/current.h:5,
                    from ./arch/nios2/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/gpio/driver.h:5,
                    from include/asm-generic/gpio.h:11,
                    from include/linux/gpio.h:62,
                    from drivers/regulator/mcp16502.c:11:
   drivers/regulator/mcp16502.c: In function 'mcp16502_set_voltage_time_sel':
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:287:38: note: in definition of macro '__abs_choose_expr'
     287 |  __builtin_types_compatible_p(typeof(x),   signed type) || \
         |                                      ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:287:38: note: in definition of macro '__abs_choose_expr'
     287 |  __builtin_types_compatible_p(typeof(x),   signed type) || \
         |                                      ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:288:38: note: in definition of macro '__abs_choose_expr'
     288 |  __builtin_types_compatible_p(typeof(x), unsigned type),  \
         |                                      ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:288:38: note: in definition of macro '__abs_choose_expr'
     288 |  __builtin_types_compatible_p(typeof(x), unsigned type),  \
         |                                      ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:24: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                        ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:24: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                        ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> include/linux/kernel.h:281:3: error: first argument to '__builtin_choose_expr' not a constant
     281 |   __builtin_choose_expr(     \
         |   ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:276:16: note: in expansion of macro '__abs_choose_expr'
     276 | #define abs(x) __abs_choose_expr(x, long long,    \
         |                ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~

vim +295 drivers/regulator/mcp16502.c

   280	
   281	static int mcp16502_set_voltage_time_sel(struct regulator_dev *rdev,
   282						 unsigned int old_sel,
   283						 unsigned int new_sel)
   284	{
   285		static const u8 us_ramp[] = { 8, 16, 24, 32 };
   286		int id = rdev_get_id(rdev);
   287		unsigned int uV_delta, val;
   288		int ret;
   289	
   290		ret = regmap_read(rdev->regmap, MCP16502_REG_BASE(id, CFG), &val);
   291		if (ret)
   292			return ret;
   293	
   294		val = (val & MCP16502_DVSR) >> 2;
 > 295		uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
   296			       old_sel * rdev->desc->linear_ranges->uV_step);
   297		switch (id) {
   298		case BUCK1:
   299		case LDO1:
   300		case LDO2:
   301			ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
   302						mcp16502_ramp_b1l12[val]);
   303			break;
   304	
   305		case BUCK2:
   306		case BUCK3:
   307		case BUCK4:
   308			ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
   309						mcp16502_ramp_b234[val]);
   310			break;
   311	
   312		default:
   313			return -EINVAL;
   314		}
   315	
   316		return ret;
   317	}
   318	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25020 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 5/6] regulator: mcp16502: add support for ramp delay
@ 2020-11-13  7:41     ` kernel test robot
  0 siblings, 0 replies; 19+ messages in thread
From: kernel test robot @ 2020-11-13  7:41 UTC (permalink / raw)
  To: kbuild-all

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

Hi Claudiu,

I love your patch! Yet something to improve:

[auto build test ERROR on regulator/for-next]
[also build test ERROR on linus/master linux/master v5.10-rc3 next-20201112]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Claudiu-Beznea/regulator-mcp16502-add-support-for-ramp-delay/20201111-170928
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
config: nios2-randconfig-r034-20201111 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/d97d6b70286fa3a28e744a55da1b7eb6a026cee3
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Claudiu-Beznea/regulator-mcp16502-add-support-for-ramp-delay/20201111-170928
        git checkout d97d6b70286fa3a28e744a55da1b7eb6a026cee3
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:20,
                    from ./arch/nios2/include/generated/asm/bug.h:1,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/current.h:5,
                    from ./arch/nios2/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/gpio/driver.h:5,
                    from include/asm-generic/gpio.h:11,
                    from include/linux/gpio.h:62,
                    from drivers/regulator/mcp16502.c:11:
   drivers/regulator/mcp16502.c: In function 'mcp16502_set_voltage_time_sel':
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:287:38: note: in definition of macro '__abs_choose_expr'
     287 |  __builtin_types_compatible_p(typeof(x),   signed type) || \
         |                                      ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:287:38: note: in definition of macro '__abs_choose_expr'
     287 |  __builtin_types_compatible_p(typeof(x),   signed type) || \
         |                                      ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:288:38: note: in definition of macro '__abs_choose_expr'
     288 |  __builtin_types_compatible_p(typeof(x), unsigned type),  \
         |                                      ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:288:38: note: in definition of macro '__abs_choose_expr'
     288 |  __builtin_types_compatible_p(typeof(x), unsigned type),  \
         |                                      ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:24: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                        ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:24: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                        ^
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> drivers/regulator/mcp16502.c:295:54: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |                                                      ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   drivers/regulator/mcp16502.c:296:47: error: 'const struct linear_range' has no member named 'uV_step'; did you mean 'step'?
     296 |          old_sel * rdev->desc->linear_ranges->uV_step);
         |                                               ^~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
>> include/linux/kernel.h:281:3: error: first argument to '__builtin_choose_expr' not a constant
     281 |   __builtin_choose_expr(     \
         |   ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:280:3: note: in expansion of macro '__abs_choose_expr'
     280 |   __abs_choose_expr(x, char,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:279:3: note: in expansion of macro '__abs_choose_expr'
     279 |   __abs_choose_expr(x, short,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:278:3: note: in expansion of macro '__abs_choose_expr'
     278 |   __abs_choose_expr(x, int,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:289:54: note: in definition of macro '__abs_choose_expr'
     289 |  ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                      ^~~~~
   include/linux/kernel.h:277:3: note: in expansion of macro '__abs_choose_expr'
     277 |   __abs_choose_expr(x, long,    \
         |   ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~
   include/linux/kernel.h:286:43: error: first argument to '__builtin_choose_expr' not a constant
     286 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:276:16: note: in expansion of macro '__abs_choose_expr'
     276 | #define abs(x) __abs_choose_expr(x, long long,    \
         |                ^~~~~~~~~~~~~~~~~
   drivers/regulator/mcp16502.c:295:13: note: in expansion of macro 'abs'
     295 |  uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
         |             ^~~

vim +295 drivers/regulator/mcp16502.c

   280	
   281	static int mcp16502_set_voltage_time_sel(struct regulator_dev *rdev,
   282						 unsigned int old_sel,
   283						 unsigned int new_sel)
   284	{
   285		static const u8 us_ramp[] = { 8, 16, 24, 32 };
   286		int id = rdev_get_id(rdev);
   287		unsigned int uV_delta, val;
   288		int ret;
   289	
   290		ret = regmap_read(rdev->regmap, MCP16502_REG_BASE(id, CFG), &val);
   291		if (ret)
   292			return ret;
   293	
   294		val = (val & MCP16502_DVSR) >> 2;
 > 295		uV_delta = abs(new_sel * rdev->desc->linear_ranges->uV_step -
   296			       old_sel * rdev->desc->linear_ranges->uV_step);
   297		switch (id) {
   298		case BUCK1:
   299		case LDO1:
   300		case LDO2:
   301			ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
   302						mcp16502_ramp_b1l12[val]);
   303			break;
   304	
   305		case BUCK2:
   306		case BUCK3:
   307		case BUCK4:
   308			ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
   309						mcp16502_ramp_b234[val]);
   310			break;
   311	
   312		default:
   313			return -EINVAL;
   314		}
   315	
   316		return ret;
   317	}
   318	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 25020 bytes --]

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

* Re: [PATCH v2 0/6] regulator: mcp16502: add support for ramp delay
  2020-11-11  9:06 ` Claudiu Beznea
@ 2020-11-13 17:14   ` Mark Brown
  -1 siblings, 0 replies; 19+ messages in thread
From: Mark Brown @ 2020-11-13 17:14 UTC (permalink / raw)
  To: Claudiu Beznea, lgirdwood
  Cc: axel.lin, linus.walleij, ttynkkynen, linux-kernel, s.hauer,
	linux-arm-kernel

On Wed, 11 Nov 2020 11:06:12 +0200, Claudiu Beznea wrote:
> This series adds support for ramp delay on mcp16502. It also adds
> some cleanup on mcp16502.
> 
> Apart from that patches 1/6 fixes the selector validation in case
> the regulator::desc::linear_min_sel is not zero.
> 
> Thank you,
> Claudiu Beznea
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/6] regulator: core: validate selector against linear_min_sel
      commit: bdcd1177578cd5556f7494da86d5038db8203a16
[2/6] regulator: core: do not continue if selector match
      (no commit info)
[3/6] regulator: mcp16502: add linear_min_sel
      commit: 478f8089161e9a8f487ef3f560e59d1423b81c05
[4/6] regulator: mcp16502: adapt for get/set on other registers
      commit: 3e5532a011b09861abc2da3aa518b9aafc250570
[5/6] regulator: mcp16502: add support for ramp delay
      commit: 322eb8666d2f50556e89d73b54cf2dad8703c4e0
[6/6] regulator: mcp16502: remove void documentation of struct mcp16502
      commit: 842f44806efaddfae5ecff8f143c2607a4fa65d7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

* Re: [PATCH v2 0/6] regulator: mcp16502: add support for ramp delay
@ 2020-11-13 17:14   ` Mark Brown
  0 siblings, 0 replies; 19+ messages in thread
From: Mark Brown @ 2020-11-13 17:14 UTC (permalink / raw)
  To: Claudiu Beznea, lgirdwood
  Cc: axel.lin, linus.walleij, linux-kernel, ttynkkynen, s.hauer,
	linux-arm-kernel

On Wed, 11 Nov 2020 11:06:12 +0200, Claudiu Beznea wrote:
> This series adds support for ramp delay on mcp16502. It also adds
> some cleanup on mcp16502.
> 
> Apart from that patches 1/6 fixes the selector validation in case
> the regulator::desc::linear_min_sel is not zero.
> 
> Thank you,
> Claudiu Beznea
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/6] regulator: core: validate selector against linear_min_sel
      commit: bdcd1177578cd5556f7494da86d5038db8203a16
[2/6] regulator: core: do not continue if selector match
      (no commit info)
[3/6] regulator: mcp16502: add linear_min_sel
      commit: 478f8089161e9a8f487ef3f560e59d1423b81c05
[4/6] regulator: mcp16502: adapt for get/set on other registers
      commit: 3e5532a011b09861abc2da3aa518b9aafc250570
[5/6] regulator: mcp16502: add support for ramp delay
      commit: 322eb8666d2f50556e89d73b54cf2dad8703c4e0
[6/6] regulator: mcp16502: remove void documentation of struct mcp16502
      commit: 842f44806efaddfae5ecff8f143c2607a4fa65d7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-11-13 17:15 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11  9:06 [PATCH v2 0/6] regulator: mcp16502: add support for ramp delay Claudiu Beznea
2020-11-11  9:06 ` Claudiu Beznea
2020-11-11  9:06 ` [PATCH v2 1/6] regulator: core: validate selector against linear_min_sel Claudiu Beznea
2020-11-11  9:06   ` Claudiu Beznea
2020-11-11  9:06 ` [PATCH v2 2/6] regulator: core: do not continue if selector match Claudiu Beznea
2020-11-11  9:06   ` Claudiu Beznea
2020-11-11  9:06 ` [PATCH v2 3/6] regulator: mcp16502: add linear_min_sel Claudiu Beznea
2020-11-11  9:06   ` Claudiu Beznea
2020-11-11  9:06 ` [PATCH v2 4/6] regulator: mcp16502: adapt for get/set on other registers Claudiu Beznea
2020-11-11  9:06   ` Claudiu Beznea
2020-11-11  9:06 ` [PATCH v2 5/6] regulator: mcp16502: add support for ramp delay Claudiu Beznea
2020-11-11  9:06   ` Claudiu Beznea
2020-11-13  7:41   ` kernel test robot
2020-11-13  7:41     ` kernel test robot
2020-11-13  7:41     ` kernel test robot
2020-11-11  9:06 ` [PATCH v2 6/6] regulator: mcp16502: remove void documentation of struct mcp16502 Claudiu Beznea
2020-11-11  9:06   ` Claudiu Beznea
2020-11-13 17:14 ` [PATCH v2 0/6] regulator: mcp16502: add support for ramp delay Mark Brown
2020-11-13 17:14   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.