Commit df7b2f20 authored by Rengarajan S's avatar Rengarajan S Committed by Greg Kroah-Hartman
Browse files

misc: microchip: pci1xxxx: Add push-pull drive support for GPIO



Add support to configure GPIO pins for push-pull drive mode.

Signed-off-by: default avatarRengarajan S <rengarajan.s@microchip.com>
Link: https://lore.kernel.org/r/20241205134956.1493091-1-rengarajan.s@microchip.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 154916f4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;