From: Vasily Khoruzhick <anarsoul@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel <alsa-devel@alsa-project.org>,
Philipp Zabel <philipp.zabel@gmail.com>
Subject: Re: [PATCH RFC 1/3] ASoC: uda1380: use callbacks instead of gpiolib
Date: Sat, 26 Jun 2010 19:53:15 +0300 [thread overview]
Message-ID: <201006261953.43884.anarsoul@gmail.com> (raw)
In-Reply-To: <F58F893B-1539-4999-817E-8B2C4E871FB7@opensource.wolfsonmicro.com>
[-- Attachment #1.1: Type: Text/Plain, Size: 1718 bytes --]
В сообщении от 26 июня 2010 19:40:37 автор Mark Brown написал:
> On 26 Jun 2010, at 16:14, Vasily Khoruzhick <anarsoul@gmail.com> wrote:
> > Some machines require some tricks to enable/disable
> > codec, i.e. disable or enable i2s clock before enabling/disabling
> > codec, and just configuring gpio is not enough; some machines
> > have no reset pin (reset is performed on codec power on automatically).
> > Fix that issue by using machine-specific callback to enable codec power.
> >
> > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
>
> This is fine but it'd be really nice to preserve the use of GPIOs since
> that will cover the majority of machines - for example, by providing a
> default callback if none is provided and GPIOs are. This will also
> avoid the need to update existing machine drivers (which needs to be
> done otherwise).
The only machine that uses uda1380 and supported by mainline kernel is
magician, rx1950 and h1940 sound support is not merged yet, so that's not a
problem to perform that change.
> However, I do wonder if the more complex set_power() callbacks might
> not just end up as regulator API consumers?
Is it really necessary? Plain callback perfectly fits here, and same approach
is used for s3cmci driver. For example, rx1950_uda1380_set_power is not
complex and looks like this:
static void rx1950_uda1380_set_power(int enable)
{
clk_disable(i2c_clk);
gpio_direction_output(S3C2410_GPD(0), 0);
gpio_direction_output(S3C2410_GPJ(0), enable);
if (enable) {
gpio_set_value(S3C2410_GPD(0), 1);
mdelay(1);
gpio_set_value(S3C2410_GPD(0), 0);
}
clk_enable(i2c_clk);
}
Regards
Vasily
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2010-06-26 16:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-26 15:14 [PATCH RFC 0/3] asoc: uda1380 cleanup Vasily Khoruzhick
2010-06-26 15:14 ` [PATCH RFC 1/3] ASoC: uda1380: use callbacks instead of gpiolib Vasily Khoruzhick
2010-06-26 16:40 ` Mark Brown
2010-06-26 16:53 ` Vasily Khoruzhick [this message]
2010-06-26 20:09 ` Mark Brown
2010-06-26 20:53 ` Vasily Khoruzhick
2010-06-26 20:57 ` Mark Brown
2010-06-26 21:12 ` Vasily Khoruzhick
2010-06-27 10:21 ` Mark Brown
2010-06-28 12:00 ` Vasily Khoruzhick
2010-06-28 13:41 ` Mark Brown
2010-06-28 13:49 ` Vasily Khoruzhick
2010-06-28 13:50 ` Mark Brown
2010-06-28 14:05 ` Vasily Khoruzhick
2010-06-28 14:15 ` Mark Brown
2010-06-28 14:25 ` Vasily Khoruzhick
[not found] ` <AANLkTilfEIEBaHO8FupS9wU3FR3VGc_yUVNP8KPJ30jW@mail.gmail.com>
2010-06-28 14:32 ` Mark Brown
2010-06-26 15:14 ` [PATCH RFC 2/3] magician: pass .set_power callback to uda1380 pdata Vasily Khoruzhick
2010-06-26 15:14 ` [PATCH RFC 3/3] uda1380: make driver more powersave-friendly Vasily Khoruzhick
2010-06-26 20:45 ` Mark Brown
2010-06-26 21:07 ` Vasily Khoruzhick
2010-06-27 10:10 ` Mark Brown
2010-06-27 10:43 ` Vasily Khoruzhick
2010-06-27 20:55 ` Mark Brown
2010-06-27 21:15 ` Vasily Khoruzhick
2010-06-27 21:40 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201006261953.43884.anarsoul@gmail.com \
--to=anarsoul@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=philipp.zabel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.