From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Tony Lindgren <tony@atomide.com>, Mark Brown <broonie@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
linux-pm@vger.kernel.org,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: PM regression in next
Date: Wed, 17 Jan 2018 11:47:19 +0200 [thread overview]
Message-ID: <e168493c-c1db-07e5-a33b-faa447e22f4a@ti.com> (raw)
In-Reply-To: <20180115185525.GA4042@atomide.com>
Hi,
On 2018-01-15 20:55, Tony Lindgren wrote:
> * Mark Brown <broonie@kernel.org> [180115 18:14]:
>> On Mon, Jan 15, 2018 at 10:06:26AM -0800, Tony Lindgren wrote:
>>> * Mark Brown <broonie@kernel.org> [180115 17:56]:
>>
>>>> Sorry, I didn't actually post it - just suggested adding the
>>>> snd_soc_codec_set_regmap() call.
>>
>>> Oh I see. Yeah that seems like a good long term solution after
>>> the regressions are fixed.
>>
>> I would like to see us do that sooner rather than later assuming it
>> addresses the issue, it's quicker and simpler.
>
> Peter, can you take a look at that?
Sorry I have missed the thread...
>
> Meanwhile, here's a regression fix for Linux next for twl4030
> and 6040 drivers.
The .read and the .write in snd_soc_codec_driver is needed. Without it
DAPM can not read/write to registers when we have codec driver which
does not have regmap. twl4030/6040 is an MFD device and the regmap is
owned by the mfd driver, the codec, vibra, gpio, clk, etc sub devices
are using callbacks to do IO.
I will look at the local caching, but afaik it was needed and can not be
done in regmap or mfd level.
I will also take a look at the dac33 driver to see if it is broken, but
I don't have Nokia n9/n950 where I could test it.
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> Regards,
>
> Tony
>
> 8< ---------------------
> From tony Mon Sep 17 00:00:00 2001
> From: Tony Lindgren <tony@atomide.com>
> Date: Fri, 12 Jan 2018 10:24:36 -0800
> Subject: [PATCH] ASoC: Fix twl4030 and 6040 regression by adding back read
> and write
>
> Commit 3bb0f7c31b1a ("ASoC: don't use snd_soc_write/read on twl4030")
> caused regressions for both twl4030 and twl6040 as it assumes the
> ASoC driver is using regmap. As a side effect, this also causes a
> considerable increase in idle power consumption omap3 boards using
> twl4030 as the PMIC.
>
> This is because the removal of read and write function pointers
> causes some of the ASoC IO functions to not do anything. For example,
> snd_soc_register_card() calls snd_soc_dapm_new_widgets() that calls
> snd_soc_codec_drv_read() that now does nothing.
>
> A long term solution suggested by Mark Brown <broonie@kernel.org>
> is to make the twl drivers use regmap by adding a call to
> snd_soc_codec_set_regmap(). This however needs more consideration
> as currently the driver internal reads do caching and we would have
> both regmap access and internal read/write access accessing the same
> hardware registers.
>
> So to fix the regression, let's just do a partial revert adding back
> the read and write function pointers. Note that other non-regmap
> ASoC drivers may need similar patches.
>
> Fixes: 3bb0f7c31b1a ("ASoC: don't use snd_soc_write/read on twl4030")
> Fixes: 93a00c467fe9 ("ASoC: don't use snd_soc_write/read on twl6040")
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> sound/soc/codecs/twl4030.c | 2 ++
> sound/soc/codecs/twl6040.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
> --- a/sound/soc/codecs/twl4030.c
> +++ b/sound/soc/codecs/twl4030.c
> @@ -2195,6 +2195,8 @@ static int twl4030_soc_remove(struct snd_soc_codec *codec)
> static const struct snd_soc_codec_driver soc_codec_dev_twl4030 = {
> .probe = twl4030_soc_probe,
> .remove = twl4030_soc_remove,
> + .read = twl4030_read,
> + .write = twl4030_write,
> .set_bias_level = twl4030_set_bias_level,
> .idle_bias_off = true,
>
> diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
> --- a/sound/soc/codecs/twl6040.c
> +++ b/sound/soc/codecs/twl6040.c
> @@ -1158,6 +1158,8 @@ static int twl6040_remove(struct snd_soc_codec *codec)
> static const struct snd_soc_codec_driver soc_codec_dev_twl6040 = {
> .probe = twl6040_probe,
> .remove = twl6040_remove,
> + .read = twl6040_read,
> + .write = twl6040_write,
> .set_bias_level = twl6040_set_bias_level,
> .suspend_bias_off = true,
> .ignore_pmdown_time = true,
>
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2018-01-17 9:47 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 0:01 PM regression in next Tony Lindgren
2018-01-12 0:18 ` Andrew Morton
2018-01-12 0:23 ` Tony Lindgren
2018-01-12 0:45 ` Andrew Morton
2018-01-12 1:20 ` Tony Lindgren
2018-01-12 1:32 ` Tony Lindgren
2018-01-12 12:23 ` Rafael J. Wysocki
2018-01-12 12:30 ` Rafael J. Wysocki
2018-01-12 13:01 ` Lars-Peter Clausen
2018-01-12 13:16 ` Andrew Lunn
2018-01-12 13:52 ` Tony Lindgren
2018-01-12 13:55 ` Andrew Lunn
2018-01-12 14:14 ` Tony Lindgren
2018-01-12 19:00 ` Tony Lindgren
2018-01-12 19:12 ` Mark Brown
2018-01-12 21:07 ` Tony Lindgren
2018-01-12 21:15 ` Mark Brown
2018-01-12 21:50 ` Tony Lindgren
2018-01-12 22:11 ` Mark Brown
2018-01-12 22:49 ` Tony Lindgren
2018-01-12 22:59 ` Mark Brown
2018-01-15 1:45 ` Kuninori Morimoto
2018-01-15 16:50 ` Tony Lindgren
2018-01-15 17:19 ` Mark Brown
2018-01-15 17:52 ` Tony Lindgren
2018-01-15 17:56 ` Mark Brown
2018-01-15 18:06 ` Tony Lindgren
2018-01-15 18:13 ` Mark Brown
2018-01-15 18:55 ` Tony Lindgren
2018-01-16 0:38 ` Kuninori Morimoto
2018-01-17 9:47 ` Peter Ujfalusi [this message]
2018-01-15 23:22 ` Kuninori Morimoto
2018-01-16 0:36 ` Tony Lindgren
2018-01-12 21:38 ` 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=e168493c-c1db-07e5-a33b-faa447e22f4a@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=sfr@canb.auug.org.au \
--cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).