diff mbox series

[v1,1/4] pinctrl: baytrail: Fix types of config value in byt_pin_config_set()

Message ID 20231122175039.2289945-1-andriy.shevchenko@linux.intel.com
State Accepted
Commit 1a856a22e6036c5f0d6da7568b4550270f989038
Headers show
Series [v1,1/4] pinctrl: baytrail: Fix types of config value in byt_pin_config_set() | expand

Commit Message

Andy Shevchenko Nov. 22, 2023, 5:50 p.m. UTC
When unpacked, the config value is split to two of different types.
Fix the types accordingly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-baytrail.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Linus Walleij Nov. 23, 2023, 2:54 p.m. UTC | #1
On Wed, Nov 22, 2023 at 6:50 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> iWhen ->pin_config_set() is called from the GPIO library (assumed
> GpioIo() ACPI resource), the argument can be 1, when, for example,
> PullDefault is provided. In such case we supply sane default in
> the driver. Move that default assingment to a switch-case, so
> it will be consolidated in one place.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Mika Westerberg Nov. 24, 2023, 5:31 a.m. UTC | #2
On Wed, Nov 22, 2023 at 07:50:38PM +0200, Andy Shevchenko wrote:
> iWhen ->pin_config_set() is called from the GPIO library (assumed

-i
Mika Westerberg Nov. 24, 2023, 5:33 a.m. UTC | #3
On Wed, Nov 22, 2023 at 07:50:36PM +0200, Andy Shevchenko wrote:
> When unpacked, the config value is split to two of different types.
> Fix the types accordingly.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

There was one typo which I commented (please fix when applying).
Otherwise the series looks good to me,

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Andy Shevchenko Nov. 24, 2023, 11:13 a.m. UTC | #4
On Fri, Nov 24, 2023 at 07:33:39AM +0200, Mika Westerberg wrote:
> On Wed, Nov 22, 2023 at 07:50:36PM +0200, Andy Shevchenko wrote:
> > When unpacked, the config value is split to two of different types.
> > Fix the types accordingly.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> There was one typo which I commented (please fix when applying).
> Otherwise the series looks good to me,
> 
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Fixed locally.

Pushed to my review and testing queue, thanks!
diff mbox series

Patch

diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index 3cd0798ee631..f1af21dbd5fb 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -918,13 +918,14 @@  static int byt_pin_config_set(struct pinctrl_dev *pctl_dev,
 			      unsigned int num_configs)
 {
 	struct intel_pinctrl *vg = pinctrl_dev_get_drvdata(pctl_dev);
-	unsigned int param, arg;
 	void __iomem *conf_reg = byt_gpio_reg(vg, offset, BYT_CONF0_REG);
 	void __iomem *val_reg = byt_gpio_reg(vg, offset, BYT_VAL_REG);
 	void __iomem *db_reg = byt_gpio_reg(vg, offset, BYT_DEBOUNCE_REG);
 	u32 conf, val, db_pulse, debounce;
+	enum pin_config_param param;
 	unsigned long flags;
 	int i, ret = 0;
+	u32 arg;
 
 	raw_spin_lock_irqsave(&byt_lock, flags);