From: Peter Ujfalusi <peter.ujfalusi@nokia.com>
To: ext Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] ASoC: Codec driver for Texas Instruments tlv320dac33 codec
Date: Tue, 13 Oct 2009 12:46:42 +0300 [thread overview]
Message-ID: <200910131246.42861.peter.ujfalusi@nokia.com> (raw)
In-Reply-To: <20091013092622.GA1230@sirena.org.uk>
On Tuesday 13 October 2009 12:26:22 ext Mark Brown wrote:
> I mean the pattern of suppressing I2C writes while the chip is powered
> down rather than the
I guess I have some good way of handling this (thanks to Eero for the idea)
>
> > I'm not sure how to make sure that we can access to the chip, and at the
> > same time do not use extensive mutex lock/unlock for the I2C accesses.
> > Ideas?
>
> Perhaps just call the mutex something more descriptive like chip_power
> or something might be enough make it clear what it's protecting?
Now that the mutex handling is cleaner in the chip power sense, I'll use the
same mutex to protect the state as well (when the dac33 is in nSample mode).
It fits there nicely as well.
> > Hmm, yes you are right, it is kind of a mess...
> > I can think of the following:
> > dac33_set_power -> dac33_hard_reset
> > dac33_soft_power -> dac33_soft_reset
> >
> > In dac33_set_bias_level only toggle the dac33_soft_reset.
> > In dac33_soc_suspend/dac33_soc_resume I can use the dac33_hard_reset with
> > register restore.
> >
> > Does it makes it a bit cleaner?
>
> I think so - it'd probably also help if the cache restore were merged
> into one of the functions too. I'd be inclined to keep _power too.
You mean something like this:
dac33_set_power -> dac33_hard_power
dac33_soft_power -> dac33_soft_power
Or keeping the old names, but make the use of these more consequent?
> OK. I'd expect that at some point people will want to control things
> like the digital routing.
I think, I will have the controls implemented before anyone would realize that
they need control for those ;)
But it will be done in the future since it needs lot's of tries to get things
sorted out.
--
Péter
next prev parent reply other threads:[~2009-10-13 9:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 11:48 [PATCH] ASoC: Codec driver for Texas Instruments tlv320dac33 codec Peter Ujfalusi
2009-10-12 11:48 ` [PATCH - try2] ASoC: TPA6130A2: Make tpa6130a2_power as static Peter Ujfalusi
2009-10-12 15:18 ` [PATCH] ASoC: Codec driver for Texas Instruments tlv320dac33 codec Mark Brown
2009-10-13 4:52 ` Eero Nurkkala
2009-10-13 7:12 ` Peter Ujfalusi
2009-10-13 9:26 ` Mark Brown
2009-10-13 9:46 ` Peter Ujfalusi [this message]
2009-10-13 9:50 ` 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=200910131246.42861.peter.ujfalusi@nokia.com \
--to=peter.ujfalusi@nokia.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.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.