[alsa-devel] [PATCH 2/4] ASoC: s3c64xx/smartq: use dynamic registration
Mark Brown
broonie at kernel.org
Tue Jul 15 12:39:38 CEST 2014
On Tue, Jul 15, 2014 at 04:36:20PM +0900, Alexandre Courbot wrote:
> Direction and initial value, on the other hand, are clearly properties
> that ought to be set by the driver itself. Thus my expectation here
> would be that the driver sets the GPIO direction and initial value as
> soon as it gets it using gpiod_direction_output(). In other words,
Well, it's a bit of a mix really - from a hardware point of view they
normally are actually often fixed.
> there is no replacement for gpio_request_one() with the gpiod
> interface. Is there any use-case that cannot be covered by calling
> gpiod_direction_output() right after gpiod_get()? AFAICT this is what
> gpio_request_one() was doing anyway.
Right, the original goal was to provide a better interface for
requesting a GPIO - it saves a lot of error handling code throughout the
kernel and avoids the possibility of bugs due to users forgetting to
mark the directio for the GPIO. Having a direct replacement also makes
conversions to gpiod easier.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140715/ceaf2154/attachment.sig>
More information about the Alsa-devel
mailing list