* [PATCH 0/2] wm5110: fixes to ANC clock control @ 2016-04-26 16:06 Richard Fitzgerald 2016-04-26 16:06 ` [PATCH 1/2] mfd: wm5110: ARIZONA_CLOCK_CONTROL should be volatile Richard Fitzgerald 2016-04-26 16:06 ` [PATCH 2/2] ASoC: arizona: No need to update_bits when writing AEC clock control Richard Fitzgerald 0 siblings, 2 replies; 5+ messages in thread From: Richard Fitzgerald @ 2016-04-26 16:06 UTC (permalink / raw) To: lee.jones, broonie; +Cc: patches, linux-kernel, alsa-devel The register for ANC clock control has a combination of volatile and non-readback bits and these two patches fix the way we write to this register. Both patches must be taken together to ensure correct operation. Richard Fitzgerald (2): mfd: wm5110: ARIZONA_CLOCK_CONTROL should be volatile ASoC: arizona: No need to update_bits when writing AEC clock control drivers/mfd/wm5110-tables.c | 1 + sound/soc/codecs/arizona.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] mfd: wm5110: ARIZONA_CLOCK_CONTROL should be volatile 2016-04-26 16:06 [PATCH 0/2] wm5110: fixes to ANC clock control Richard Fitzgerald @ 2016-04-26 16:06 ` Richard Fitzgerald 2016-05-09 11:16 ` Lee Jones 2016-04-26 16:06 ` [PATCH 2/2] ASoC: arizona: No need to update_bits when writing AEC clock control Richard Fitzgerald 1 sibling, 1 reply; 5+ messages in thread From: Richard Fitzgerald @ 2016-04-26 16:06 UTC (permalink / raw) To: lee.jones, broonie; +Cc: alsa-devel, patches, linux-kernel Some of the bits in this register can be changed by the codec so we must mark it volatile. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> --- drivers/mfd/wm5110-tables.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c index 8e74e71..1ee68bd 100644 --- a/drivers/mfd/wm5110-tables.c +++ b/drivers/mfd/wm5110-tables.c @@ -3066,6 +3066,7 @@ static bool wm5110_volatile_register(struct device *dev, unsigned int reg) case ARIZONA_AOD_IRQ_RAW_STATUS: case ARIZONA_FX_CTRL2: case ARIZONA_ASRC_STATUS: + case ARIZONA_CLOCK_CONTROL: case ARIZONA_DSP_STATUS: case ARIZONA_DSP1_STATUS_1: case ARIZONA_DSP1_STATUS_2: -- 1.9.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] mfd: wm5110: ARIZONA_CLOCK_CONTROL should be volatile 2016-04-26 16:06 ` [PATCH 1/2] mfd: wm5110: ARIZONA_CLOCK_CONTROL should be volatile Richard Fitzgerald @ 2016-05-09 11:16 ` Lee Jones 0 siblings, 0 replies; 5+ messages in thread From: Lee Jones @ 2016-05-09 11:16 UTC (permalink / raw) To: Richard Fitzgerald; +Cc: alsa-devel, broonie, patches, linux-kernel On Tue, 26 Apr 2016, Richard Fitzgerald wrote: > Some of the bits in this register can be changed by the codec > so we must mark it volatile. > > Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> > --- > drivers/mfd/wm5110-tables.c | 1 + > 1 file changed, 1 insertion(+) Applied, thanks. > diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c > index 8e74e71..1ee68bd 100644 > --- a/drivers/mfd/wm5110-tables.c > +++ b/drivers/mfd/wm5110-tables.c > @@ -3066,6 +3066,7 @@ static bool wm5110_volatile_register(struct device *dev, unsigned int reg) > case ARIZONA_AOD_IRQ_RAW_STATUS: > case ARIZONA_FX_CTRL2: > case ARIZONA_ASRC_STATUS: > + case ARIZONA_CLOCK_CONTROL: > case ARIZONA_DSP_STATUS: > case ARIZONA_DSP1_STATUS_1: > case ARIZONA_DSP1_STATUS_2: -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] ASoC: arizona: No need to update_bits when writing AEC clock control 2016-04-26 16:06 [PATCH 0/2] wm5110: fixes to ANC clock control Richard Fitzgerald 2016-04-26 16:06 ` [PATCH 1/2] mfd: wm5110: ARIZONA_CLOCK_CONTROL should be volatile Richard Fitzgerald @ 2016-04-26 16:06 ` Richard Fitzgerald 2016-04-26 18:24 ` Applied "ASoC: arizona: No need to update_bits when writing AEC clock control" to the asoc tree Mark Brown 1 sibling, 1 reply; 5+ messages in thread From: Richard Fitzgerald @ 2016-04-26 16:06 UTC (permalink / raw) To: lee.jones, broonie; +Cc: patches, linux-kernel, alsa-devel The bits in the ARIZONA_CLOCK_CONTROL register only respond to writes of a '1', a write of '0' is ignored. So there's no need to use update_bits. We can do a simple write to set bits. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> --- sound/soc/codecs/arizona.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index 0cd27e0..e255740 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c @@ -1126,7 +1126,6 @@ int arizona_anc_ev(struct snd_soc_dapm_widget *w, int event) { struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); - unsigned int mask = 0x3 << w->shift; unsigned int val; switch (event) { @@ -1140,7 +1139,7 @@ int arizona_anc_ev(struct snd_soc_dapm_widget *w, return 0; } - snd_soc_update_bits(codec, ARIZONA_CLOCK_CONTROL, mask, val); + snd_soc_write(codec, ARIZONA_CLOCK_CONTROL, val); return 0; } -- 1.9.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Applied "ASoC: arizona: No need to update_bits when writing AEC clock control" to the asoc tree 2016-04-26 16:06 ` [PATCH 2/2] ASoC: arizona: No need to update_bits when writing AEC clock control Richard Fitzgerald @ 2016-04-26 18:24 ` Mark Brown 0 siblings, 0 replies; 5+ messages in thread From: Mark Brown @ 2016-04-26 18:24 UTC (permalink / raw) To: Richard Fitzgerald; +Cc: alsa-devel, broonie, lee.jones, patches, linux-kernel The patch ASoC: arizona: No need to update_bits when writing AEC clock control has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 2ab8e744a437d39619b323d7303fa2e6513274b2 Mon Sep 17 00:00:00 2001 From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Date: Tue, 26 Apr 2016 17:06:20 +0100 Subject: [PATCH] ASoC: arizona: No need to update_bits when writing AEC clock control The bits in the ARIZONA_CLOCK_CONTROL register only respond to writes of a '1', a write of '0' is ignored. So there's no need to use update_bits. We can do a simple write to set bits. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/codecs/arizona.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index 0caecc6f78df..0239639823b1 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c @@ -1124,7 +1124,6 @@ int arizona_anc_ev(struct snd_soc_dapm_widget *w, int event) { struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); - unsigned int mask = 0x3 << w->shift; unsigned int val; switch (event) { @@ -1138,7 +1137,7 @@ int arizona_anc_ev(struct snd_soc_dapm_widget *w, return 0; } - snd_soc_update_bits(codec, ARIZONA_CLOCK_CONTROL, mask, val); + snd_soc_write(codec, ARIZONA_CLOCK_CONTROL, val); return 0; } -- 2.8.0.rc3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-05-09 11:16 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-04-26 16:06 [PATCH 0/2] wm5110: fixes to ANC clock control Richard Fitzgerald 2016-04-26 16:06 ` [PATCH 1/2] mfd: wm5110: ARIZONA_CLOCK_CONTROL should be volatile Richard Fitzgerald 2016-05-09 11:16 ` Lee Jones 2016-04-26 16:06 ` [PATCH 2/2] ASoC: arizona: No need to update_bits when writing AEC clock control Richard Fitzgerald 2016-04-26 18:24 ` Applied "ASoC: arizona: No need to update_bits when writing AEC clock control" to the asoc tree Mark Brown
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).