diff options
Diffstat (limited to 'drivers/gpio/gpio-sch.c')
-rw-r--r-- | drivers/gpio/gpio-sch.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-sch.c b/drivers/gpio/gpio-sch.c index 26e9b1cd2c78..e9878f6ede67 100644 --- a/drivers/gpio/gpio-sch.c +++ b/drivers/gpio/gpio-sch.c | |||
@@ -137,6 +137,13 @@ static int sch_gpio_direction_out(struct gpio_chip *gc, unsigned gpio_num, | |||
137 | return 0; | 137 | return 0; |
138 | } | 138 | } |
139 | 139 | ||
140 | static int sch_gpio_get_direction(struct gpio_chip *gc, unsigned gpio_num) | ||
141 | { | ||
142 | struct sch_gpio *sch = gpiochip_get_data(gc); | ||
143 | |||
144 | return sch_gpio_reg_get(sch, gpio_num, GIO); | ||
145 | } | ||
146 | |||
140 | static const struct gpio_chip sch_gpio_chip = { | 147 | static const struct gpio_chip sch_gpio_chip = { |
141 | .label = "sch_gpio", | 148 | .label = "sch_gpio", |
142 | .owner = THIS_MODULE, | 149 | .owner = THIS_MODULE, |
@@ -144,6 +151,7 @@ static const struct gpio_chip sch_gpio_chip = { | |||
144 | .get = sch_gpio_get, | 151 | .get = sch_gpio_get, |
145 | .direction_output = sch_gpio_direction_out, | 152 | .direction_output = sch_gpio_direction_out, |
146 | .set = sch_gpio_set, | 153 | .set = sch_gpio_set, |
154 | .get_direction = sch_gpio_get_direction, | ||
147 | }; | 155 | }; |
148 | 156 | ||
149 | static int sch_gpio_probe(struct platform_device *pdev) | 157 | static int sch_gpio_probe(struct platform_device *pdev) |