If the AC97 controller implements the ->setgpio callback, use it. Some codecs (i.e. WM9712) only accept GPIO data through AC97 slot 12.
Signed-off-by: Manuel Lauss manuel.lauss@googlemail.com --- drivers/input/touchscreen/wm97xx-core.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index cbfef1e..4f7b38c 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c @@ -206,7 +206,10 @@ void wm97xx_set_gpio(struct wm97xx *wm, u32 gpio, reg &= ~gpio;
if (wm->id == WM9712_ID2 && wm->variant != WM97xx_WM1613) - wm97xx_reg_write(wm, AC97_GPIO_STATUS, reg << 1); + reg <<= 1; + + if (wm->ac97->bus->ops->setgpio) + wm->ac97->bus->ops->setgpio(wm->ac97, reg); else wm97xx_reg_write(wm, AC97_GPIO_STATUS, reg); mutex_unlock(&wm->codec_mutex);