From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752166AbdJ3IIl (ORCPT ); Mon, 30 Oct 2017 04:08:41 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:34082 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751374AbdJ3IIj (ORCPT ); Mon, 30 Oct 2017 04:08:39 -0400 Subject: Re: [PATCH linux-next 1/1] ASoC: rsnd: ssiu: reset SSI_MODE register To: Kuninori Morimoto References: <1509030462-4799-1-git-send-email-jiada_wang@mentor.com> <87d155ttv2.wl%kuninori.morimoto.gx@renesas.com> CC: , , , , , , From: Jiada Wang Message-ID: <3d8153c3-a8e1-93d8-daff-a4d37611e811@mentor.com> Date: Mon, 30 Oct 2017 17:08:32 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <87d155ttv2.wl%kuninori.morimoto.gx@renesas.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Morimoto-san On 10/30/2017 08:38 AM, Kuninori Morimoto wrote: > > Hi Jiada > >> register SSI_MODE is set when SSI works in TDM Extended or >> TDM (Ex-)Split mode, but it isn't reset after SSI stops. >> this will cause issue, if SSI starts to work in other modes >> which requie SSI_MODE to have different value. >> >> This patch resets SSI_MODE register in .stop callback, >> when last stream calls .stop. >> >> Fixes: 186fadc132f0 ("ASoC: rsnd: add TDM Extend Mode support") >> Signed-off-by: Jiada Wang >> --- >> sound/soc/sh/rcar/ssiu.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/sound/soc/sh/rcar/ssiu.c b/sound/soc/sh/rcar/ssiu.c >> index 4d94875..eff9f3b 100644 >> --- a/sound/soc/sh/rcar/ssiu.c >> +++ b/sound/soc/sh/rcar/ssiu.c >> @@ -217,6 +217,8 @@ static int rsnd_ssiu_stop_gen2(struct rsnd_mod *mod, >> if (rsnd_ssi_multi_slaves_runtime(io)) >> rsnd_mod_write(mod, SSI_CONTROL, 0); >> >> + rsnd_mod_write(mod, SSI_MODE, 0); >> + >> return 0; >> } > > Thank you for your patch. > But, I don't want to reset register when stop, because > it might be point-less if SoC has power domain. > How about this or similar (not tested) ? > > ------------------ > diff --git a/sound/soc/sh/rcar/ssiu.c b/sound/soc/sh/rcar/ssiu.c > index 4d94875..8dc2e92 100644 > --- a/sound/soc/sh/rcar/ssiu.c > +++ b/sound/soc/sh/rcar/ssiu.c > @@ -130,14 +130,13 @@ static int rsnd_ssiu_init_gen2(struct rsnd_mod *mod, > if (ret < 0) > return ret; > > - if (rsnd_runtime_is_ssi_tdm(io)) { > - /* > - * TDM Extend Mode > - * see > - * rsnd_ssi_config_init() > - */ > - rsnd_mod_write(mod, SSI_MODE, 0x1); > - } > + /* > + * TDM Extend Mode > + * see > + * rsnd_ssi_config_init() > + */ > + rsnd_mod_write(mod, SSI_MODE, > + rsnd_runtime_is_ssi_tdm(io) ? 0x1 : 0x0); Thanks for your suggestion, I will do some test for this change, if it works fine, I will submit ver2 with it Thanks, Jiada > > if (rsnd_ssi_use_busif(io)) { > rsnd_mod_write(mod, SSI_BUSIF_ADINR, > > > Best regards > --- > Kuninori Morimoto >