• Uwe Kleine-König's avatar
    ASoC: improve usage of gpiod API · 34d7c390
    Uwe Kleine-König authored
    Since 39b2bbe3 (gpio: add flags argument to gpiod_get*() functions)
    which appeared in v3.17-rc1, the gpiod_get* functions take an additional
    parameter that allows to specify direction and initial value for
    output. Simplify drivers accordingly.
    
    Also there is an *_optional variant that serves well here. The sematics
    is slightly changed here by using it as error checking is more strict
    now: If GPIOLIB is not enabled an error is returned instead of just
    ignoring the gpio. On one hand this is bad for devices that don't "have"
    the respective gpio as the driver is failing now. On the other hand
    there is no means to assert that this gpio is really not needed or if
    only the driver to control it is not available. The latter is a real
    reason to fail and so it's defensive to fail here, too.
    Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    34d7c390
sta350.c 36.7 KB