misc: microchip: pci1xxxx: Add push-pull drive support for GPIO
authorRengarajan S <rengarajan.s@microchip.com>
Thu, 5 Dec 2024 13:49:56 +0000 (19:19 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jan 2025 14:40:03 +0000 (15:40 +0100)
Add support to configure GPIO pins for push-pull drive mode.

Signed-off-by: Rengarajan S <rengarajan.s@microchip.com>
Link: https://lore.kernel.org/r/20241205134956.1493091-1-rengarajan.s@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c

index e616e3ec2b42fd3654e8995a603a30a9d3e3baac..97c7dbe43377bc77a355a5cf1bd5b91ddb987448 100644 (file)
@@ -147,6 +147,9 @@ static int pci1xxxx_gpio_set_config(struct gpio_chip *gpio, unsigned int offset,
        case PIN_CONFIG_DRIVE_OPEN_DRAIN:
                pci1xxx_assign_bit(priv->reg_base, OPENDRAIN_OFFSET(offset), (offset % 32), true);
                break;
+       case PIN_CONFIG_DRIVE_PUSH_PULL:
+               pci1xxx_assign_bit(priv->reg_base, OPENDRAIN_OFFSET(offset), (offset % 32), false);
+               break;
        default:
                ret = -EOPNOTSUPP;
                break;