[alsa-devel] [PATCH RFC 1/3] ASoC: uda1380: use callbacks instead of gpiolib

Mark Brown broonie at opensource.wolfsonmicro.com
Sat Jun 26 22:57:42 CEST 2010


On 26 Jun 2010, at 21:53, Vasily Khoruzhick wrote:

> В сообщении от 26 июня 2010 23:09:39 автор Mark Brown написал:
> 
>> The regulator API isn't massively complex either and it does provide a
>> standard abstraction for controlling power which seems like it might be
>> useful here, though given the (frankly rather odd) fiddling with clocks
>> your callback does perhaps it won't help.
> 
> Ok, but I still don't like idea about keeping both regulator and gpio stuff. 

If you're going to the regulator API it's probably OK to remove the GPIO stuff
since the regulator API supports GPIO controlled regulators already. Does
mean transitioning the existing drivers but it means everyone shares the same
code.

> Btw, this weird clock stuff can be merged to i2c driver, i.e. keep i2c module 
> clock enabled only on i2c transfer (it's not scl line, it's module clock) 
> (I've sent patch for i2c-s3c2410 ~month ago, can resend it), and we can avoid 
> modyfing power/reset controlling part of uda1380 driver. What do you think 
> about that?

You definitely should be doing this in the I2C driver not the CODEC driver,
you're peering inside the internals of the I2C driver as things stand and are
likely to cause problems if someone comes along and implements this in the
driver. There's also the fact that all users of the I2C controller will benefit if
the code is implemented there, not just this one audio driver.


More information about the Alsa-devel mailing list