Patch "gpio: tps68470: Make tps68470_gpio_output() always set the initial value" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    gpio: tps68470: Make tps68470_gpio_output() always set the initial value

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     gpio-tps68470-make-tps68470_gpio_output-always-set-t.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0308b3f35c5282b1daa1fd5bcbdaa4e26e8b228b
Author: Hans de Goede <hdegoede@xxxxxxxxxx>
Date:   Mon Jul 10 14:34:25 2023 +0200

    gpio: tps68470: Make tps68470_gpio_output() always set the initial value
    
    [ Upstream commit 5a7adc6c1069ce31ef4f606ae9c05592c80a6ab5 ]
    
    Make tps68470_gpio_output() call tps68470_gpio_set() for output-only pins
    too, so that the initial value passed to gpiod_direction_output() is
    honored for these pins too.
    
    Fixes: 275b13a65547 ("gpio: Add support for TPS68470 GPIOs")
    Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
    Reviewed-by: Daniel Scally <dan.scally@xxxxxxxxxxxxxxxx>
    Tested-by: Daniel Scally <dan.scally@xxxxxxxxxxxxxxxx>
    Reviewed-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpio/gpio-tps68470.c b/drivers/gpio/gpio-tps68470.c
index aaddcabe9b359..532deaddfd4e2 100644
--- a/drivers/gpio/gpio-tps68470.c
+++ b/drivers/gpio/gpio-tps68470.c
@@ -91,13 +91,13 @@ static int tps68470_gpio_output(struct gpio_chip *gc, unsigned int offset,
 	struct tps68470_gpio_data *tps68470_gpio = gpiochip_get_data(gc);
 	struct regmap *regmap = tps68470_gpio->tps68470_regmap;
 
+	/* Set the initial value */
+	tps68470_gpio_set(gc, offset, value);
+
 	/* rest are always outputs */
 	if (offset >= TPS68470_N_REGULAR_GPIO)
 		return 0;
 
-	/* Set the initial value */
-	tps68470_gpio_set(gc, offset, value);
-
 	return regmap_update_bits(regmap, TPS68470_GPIO_CTL_REG_A(offset),
 				 TPS68470_GPIO_MODE_MASK,
 				 TPS68470_GPIO_MODE_OUT_CMOS);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux