diff mbox series

[v1,1/6] ASoC: sgtl5000: Fix definition of VAG Ramp Control

Message ID 20190521103619.4707-2-oleksandr.suvorov@toradex.com (mailing list archive)
State New, archived
Headers show
Series VAG power control improvement for sgtl5000 codec | expand

Commit Message

Oleksandr Suvorov May 21, 2019, 10:36 a.m. UTC
SGTL5000_SMALL_POP is a bit mask, not a value. Usage of
correct definition makes device probing code more clear.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
---

 sound/soc/codecs/sgtl5000.c | 2 +-
 sound/soc/codecs/sgtl5000.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Marcel Ziswiler June 13, 2019, 9:05 a.m. UTC | #1
On Tue, 2019-05-21 at 13:36 +0300, Oleksandr Suvorov wrote:
> SGTL5000_SMALL_POP is a bit mask, not a value. Usage of
> correct definition makes device probing code more clear.
> 
> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>

Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

> ---
> 
>  sound/soc/codecs/sgtl5000.c | 2 +-
>  sound/soc/codecs/sgtl5000.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git sound/soc/codecs/sgtl5000.c sound/soc/codecs/sgtl5000.c

I'm not sure how exactly you generated this patch set but usually git
format-patch inserts an additional folder level called a/b which is
what git am accepts by default e.g.

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c

> index a6a4748c97f9..5e49523ee0b6 100644
> --- sound/soc/codecs/sgtl5000.c
> +++ sound/soc/codecs/sgtl5000.c

Of course, the same a/b stuff applies here:

--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c

> @@ -1296,7 +1296,7 @@ static int sgtl5000_probe(struct
> snd_soc_component *component)
>  
>  	/* enable small pop, introduce 400ms delay in turning off */
>  	snd_soc_component_update_bits(component,
> SGTL5000_CHIP_REF_CTRL,
> -				SGTL5000_SMALL_POP, 1);
> +				SGTL5000_SMALL_POP,
> SGTL5000_SMALL_POP);
>  
>  	/* disable short cut detector */
>  	snd_soc_component_write(component, SGTL5000_CHIP_SHORT_CTRL,
> 0);
> diff --git sound/soc/codecs/sgtl5000.h sound/soc/codecs/sgtl5000.h
> index 18cae08bbd3a..a4bf4bca95bf 100644
> --- sound/soc/codecs/sgtl5000.h
> +++ sound/soc/codecs/sgtl5000.h
> @@ -273,7 +273,7 @@
>  #define SGTL5000_BIAS_CTRL_MASK			0x000e
>  #define SGTL5000_BIAS_CTRL_SHIFT		1
>  #define SGTL5000_BIAS_CTRL_WIDTH		3
> -#define SGTL5000_SMALL_POP			1
> +#define SGTL5000_SMALL_POP			0x0001
>  
>  /*
>   * SGTL5000_CHIP_MIC_CTRL
> -- 
> 2.20.1
Oleksandr Suvorov June 19, 2019, 10 a.m. UTC | #2
> ________________________________________
> From: Marcel Ziswiler
> Sent: Thursday, June 13, 2019 12:05
> To: festevam@gmail.com; Oleksandr Suvorov
> Cc: Igor Opaniuk; linux-kernel@vger.kernel.org; alsa-devel@alsa-project.org
> Subject: Re: [PATCH v1 1/6] ASoC: sgtl5000: Fix definition of VAG Ramp Control
> 
> On Tue, 2019-05-21 at 13:36 +0300, Oleksandr Suvorov wrote:
> > SGTL5000_SMALL_POP is a bit mask, not a value. Usage of
> > correct definition makes device probing code more clear.
> >
> > Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
> 
> Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> > ---
> >
> >  sound/soc/codecs/sgtl5000.c | 2 +-
> >  sound/soc/codecs/sgtl5000.h | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git sound/soc/codecs/sgtl5000.c sound/soc/codecs/sgtl5000.c
> 
> I'm not sure how exactly you generated this patch set but usually git
> format-patch inserts an additional folder level called a/b which is
> what git am accepts by default e.g.

I just used patman to generate this set of patches. But my .gitconfig included diff option "noprefix".
Thanks for pointing me! Fixed. Should I resent regenerated patchset with the prefix?
 
> diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
> 
> > index a6a4748c97f9..5e49523ee0b6 100644
> > --- sound/soc/codecs/sgtl5000.c
> > +++ sound/soc/codecs/sgtl5000.c
> 
> Of course, the same a/b stuff applies here:
> 
> --- a/sound/soc/codecs/sgtl5000.c
> +++ b/sound/soc/codecs/sgtl5000.c
> 
> > @@ -1296,7 +1296,7 @@ static int sgtl5000_probe(struct
> > snd_soc_component *component)
> >
> >       /* enable small pop, introduce 400ms delay in turning off */
> >       snd_soc_component_update_bits(component,
> > SGTL5000_CHIP_REF_CTRL,
> > -                             SGTL5000_SMALL_POP, 1);
> > +                             SGTL5000_SMALL_POP,
> > SGTL5000_SMALL_POP);
> >
> >       /* disable short cut detector */
> >       snd_soc_component_write(component, SGTL5000_CHIP_SHORT_CTRL,
> > 0);
> > diff --git sound/soc/codecs/sgtl5000.h sound/soc/codecs/sgtl5000.h
> > index 18cae08bbd3a..a4bf4bca95bf 100644
> > --- sound/soc/codecs/sgtl5000.h
> > +++ sound/soc/codecs/sgtl5000.h
> > @@ -273,7 +273,7 @@
> >  #define SGTL5000_BIAS_CTRL_MASK                      0x000e
> >  #define SGTL5000_BIAS_CTRL_SHIFT             1
> >  #define SGTL5000_BIAS_CTRL_WIDTH             3
> > -#define SGTL5000_SMALL_POP                   1
> > +#define SGTL5000_SMALL_POP                   0x0001
> >
> >  /*
> >   * SGTL5000_CHIP_MIC_CTRL
> > --
> > 2.20.1
Marcel Ziswiler June 24, 2019, 11:10 a.m. UTC | #3
On Wed, 2019-06-19 at 10:00 +0000, Oleksandr Suvorov wrote:
> > ________________________________________
> > From: Marcel Ziswiler
> > Sent: Thursday, June 13, 2019 12:05
> > To: festevam@gmail.com; Oleksandr Suvorov
> > Cc: Igor Opaniuk; linux-kernel@vger.kernel.org; 
> > alsa-devel@alsa-project.org
> > Subject: Re: [PATCH v1 1/6] ASoC: sgtl5000: Fix definition of VAG
> > Ramp Control
> > 
> > On Tue, 2019-05-21 at 13:36 +0300, Oleksandr Suvorov wrote:
> > > SGTL5000_SMALL_POP is a bit mask, not a value. Usage of
> > > correct definition makes device probing code more clear.
> > > 
> > > Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
> > 
> > Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > 
> > > ---
> > > 
> > >  sound/soc/codecs/sgtl5000.c | 2 +-
> > >  sound/soc/codecs/sgtl5000.h | 2 +-
> > >  2 files changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git sound/soc/codecs/sgtl5000.c
> > > sound/soc/codecs/sgtl5000.c
> > 
> > I'm not sure how exactly you generated this patch set but usually
> > git
> > format-patch inserts an additional folder level called a/b which is
> > what git am accepts by default e.g.
> 
> I just used patman to generate this set of patches. But my .gitconfig
> included diff option "noprefix".
> Thanks for pointing me! Fixed. Should I resent regenerated patchset
> with the prefix?

I guess but more importantly also make sure to actually send valid
emails concerning SPF/DKIM configuration.

> > diff --git a/sound/soc/codecs/sgtl5000.c
> > b/sound/soc/codecs/sgtl5000.c
> > 
> > > index a6a4748c97f9..5e49523ee0b6 100644
> > > --- sound/soc/codecs/sgtl5000.c
> > > +++ sound/soc/codecs/sgtl5000.c
> > 
> > Of course, the same a/b stuff applies here:
> > 
> > --- a/sound/soc/codecs/sgtl5000.c
> > +++ b/sound/soc/codecs/sgtl5000.c
> > 
> > > @@ -1296,7 +1296,7 @@ static int sgtl5000_probe(struct
> > > snd_soc_component *component)
> > > 
> > >       /* enable small pop, introduce 400ms delay in turning off
> > > */
> > >       snd_soc_component_update_bits(component,
> > > SGTL5000_CHIP_REF_CTRL,
> > > -                             SGTL5000_SMALL_POP, 1);
> > > +                             SGTL5000_SMALL_POP,
> > > SGTL5000_SMALL_POP);
> > > 
> > >       /* disable short cut detector */
> > >       snd_soc_component_write(component,
> > > SGTL5000_CHIP_SHORT_CTRL,
> > > 0);
> > > diff --git sound/soc/codecs/sgtl5000.h
> > > sound/soc/codecs/sgtl5000.h
> > > index 18cae08bbd3a..a4bf4bca95bf 100644
> > > --- sound/soc/codecs/sgtl5000.h
> > > +++ sound/soc/codecs/sgtl5000.h
> > > @@ -273,7 +273,7 @@
> > >  #define SGTL5000_BIAS_CTRL_MASK                      0x000e
> > >  #define SGTL5000_BIAS_CTRL_SHIFT             1
> > >  #define SGTL5000_BIAS_CTRL_WIDTH             3
> > > -#define SGTL5000_SMALL_POP                   1
> > > +#define SGTL5000_SMALL_POP                   0x0001
> > > 
> > >  /*
> > >   * SGTL5000_CHIP_MIC_CTRL
> > > --
> > > 2.20.1
diff mbox series

Patch

diff --git sound/soc/codecs/sgtl5000.c sound/soc/codecs/sgtl5000.c
index a6a4748c97f9..5e49523ee0b6 100644
--- sound/soc/codecs/sgtl5000.c
+++ sound/soc/codecs/sgtl5000.c
@@ -1296,7 +1296,7 @@  static int sgtl5000_probe(struct snd_soc_component *component)
 
 	/* enable small pop, introduce 400ms delay in turning off */
 	snd_soc_component_update_bits(component, SGTL5000_CHIP_REF_CTRL,
-				SGTL5000_SMALL_POP, 1);
+				SGTL5000_SMALL_POP, SGTL5000_SMALL_POP);
 
 	/* disable short cut detector */
 	snd_soc_component_write(component, SGTL5000_CHIP_SHORT_CTRL, 0);
diff --git sound/soc/codecs/sgtl5000.h sound/soc/codecs/sgtl5000.h
index 18cae08bbd3a..a4bf4bca95bf 100644
--- sound/soc/codecs/sgtl5000.h
+++ sound/soc/codecs/sgtl5000.h
@@ -273,7 +273,7 @@ 
 #define SGTL5000_BIAS_CTRL_MASK			0x000e
 #define SGTL5000_BIAS_CTRL_SHIFT		1
 #define SGTL5000_BIAS_CTRL_WIDTH		3
-#define SGTL5000_SMALL_POP			1
+#define SGTL5000_SMALL_POP			0x0001
 
 /*
  * SGTL5000_CHIP_MIC_CTRL