]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: improve usage of gpiod API
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sat, 21 Feb 2015 15:33:24 +0000 (16:33 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 24 Feb 2015 08:38:58 +0000 (17:38 +0900)
commitef6c264b0e6becbc399e337cd3004a1e62bbe82c
tree0269a9a160b8fa7e58f99f2957f667d8ff441a30
parent9cbe621030a9cce16d27329dac74fd4b1c1d9412
ASoC: improve usage of gpiod API

Since 5767dae43dee (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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/adau1977.c
sound/soc/codecs/cs35l32.c
sound/soc/codecs/cs4265.c
sound/soc/codecs/sta350.c
sound/soc/codecs/tas2552.c