|
@@ -751,12 +751,17 @@ static int intel_gpio_get(struct gpio_chip *chip, unsigned offset)
|
|
|
{
|
|
|
struct intel_pinctrl *pctrl = gpiochip_get_data(chip);
|
|
|
void __iomem *reg;
|
|
|
+ u32 padcfg0;
|
|
|
|
|
|
reg = intel_get_padcfg(pctrl, offset, PADCFG0);
|
|
|
if (!reg)
|
|
|
return -EINVAL;
|
|
|
|
|
|
- return !!(readl(reg) & PADCFG0_GPIORXSTATE);
|
|
|
+ padcfg0 = readl(reg);
|
|
|
+ if (!(padcfg0 & PADCFG0_GPIOTXDIS))
|
|
|
+ return !!(padcfg0 & PADCFG0_GPIOTXSTATE);
|
|
|
+
|
|
|
+ return !!(padcfg0 & PADCFG0_GPIORXSTATE);
|
|
|
}
|
|
|
|
|
|
static void intel_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
|