diff options
| author | T Karthik Reddy <[email protected]> | 2022-03-30 11:07:56 +0200 |
|---|---|---|
| committer | Michal Simek <[email protected]> | 2022-04-05 15:13:13 +0200 |
| commit | e949e789482352b14ff8842744e4322647da92c2 (patch) | |
| tree | 95e817d219840c36bdc03b72fb796d640403d68c | |
| parent | fc6e56283e141423797bbdcf39029c6e35bf5dc9 (diff) | |
gpio: slg7xl45106: Update gpio desc flags from DT
In current slg7xl45106 gpio driver xlate() function we are not updating
gpio flags from DT. Read the given flag from DT and update the gpio desc
flags variable with required gpio direction state.
Signed-off-by: T Karthik Reddy <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/a8d7b4799337bd99f61ace509889f02b192a9414.1648631275.git.michal.simek@xilinx.com
| -rw-r--r-- | drivers/gpio/gpio_slg7xl45106.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpio_slg7xl45106.c b/drivers/gpio/gpio_slg7xl45106.c index 2cbf7488ad6..4ad06c18b4b 100644 --- a/drivers/gpio/gpio_slg7xl45106.c +++ b/drivers/gpio/gpio_slg7xl45106.c @@ -11,6 +11,7 @@ #include <asm/gpio.h> #include <dm.h> #include <i2c.h> +#include <dt-bindings/gpio/gpio.h> #include <asm/arch/hardware.h> #define SLG7XL45106_REG 0xdb @@ -26,6 +27,7 @@ static int slg7xl45106_i2c_gpo_xlate(struct udevice *dev, struct ofnode_phandle_args *args) { desc->offset = (unsigned int)args->args[0]; + desc->flags = (args->args[1] & GPIO_ACTIVE_LOW ? GPIOD_ACTIVE_LOW : 0); return 0; } |
