[alsa-devel] [PATCH v2 1/2] ASoC: rt5645: change gpio to gpiod APIs

Mark Brown broonie at kernel.org
Tue Jun 2 19:16:55 CEST 2015


On Fri, May 29, 2015 at 06:31:08PM +0200, Lars-Peter Clausen wrote:

> Three things, don't use the _index API if there is only a single gpio for
> the property, either don't use a name at all or use a descriptive name
> something like "hp-detect" and use the new version of the API which has the
> flags parameter.

> So this should be: devm_gpiod_get(&i2c->dev, NULL, GPIOD_IN);

> and then drop the gpiod_direction_input()...

It seems better if people use names where possible if there's any chance
that we could add support for other GPIOs in the future, that avoids
confusion further down the line with extension.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150602/11655d2f/attachment.sig>


More information about the Alsa-devel mailing list