Patch "gpio: pca953x: Fix pca953x_gpio_set_config" has been added to the 5.6-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: pca953x: Fix pca953x_gpio_set_config

to the 5.6-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-pca953x-fix-pca953x_gpio_set_config.patch
and it can be found in the queue-5.6 subdirectory.

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



commit f4199480b4287194477a8ec0602109c185e342f3
Author: Adam Ford <aford173@xxxxxxxxx>
Date:   Sat Apr 11 20:33:52 2020 -0500

    gpio: pca953x: Fix pca953x_gpio_set_config
    
    [ Upstream commit dc87f6dd058a648cd2a35e4aa04592dccdc9f0c2 ]
    
    pca953x_gpio_set_config is setup to support pull-up/down
    bias.  Currently the driver uses a variable called 'config' to
    determine which options to use.  Unfortunately, this is incorrect.
    
    This patch uses function pinconf_to_config_param(config), which
    converts this 'config' parameter back to pinconfig to determine
    which option to use.
    
    Fixes: 15add06841a3 ("gpio: pca953x: add ->set_config implementation")
    Signed-off-by: Adam Ford <aford173@xxxxxxxxx>
    Signed-off-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 5638b4e5355f1..4269ea9a817e6 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -531,7 +531,7 @@ static int pca953x_gpio_set_config(struct gpio_chip *gc, unsigned int offset,
 {
 	struct pca953x_chip *chip = gpiochip_get_data(gc);
 
-	switch (config) {
+	switch (pinconf_to_config_param(config)) {
 	case PIN_CONFIG_BIAS_PULL_UP:
 	case PIN_CONFIG_BIAS_PULL_DOWN:
 		return pca953x_gpio_set_pull_up_down(chip, offset, config);



[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