* [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision.
@ 2011-06-20 18:54 Taylor Hutt
2011-06-20 20:06 ` Liam Girdwood
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Taylor Hutt @ 2011-06-20 18:54 UTC (permalink / raw)
To: thutt
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Peter Hsiang, Olof Johansson, alsa-devel, linux-kernel
The base hardware revision of the Maxim 98095 part is 0x40; the code
which outputs the revision of the hardware has been updated to
properly use uppercase alphabetic values for the revision numbers.
Also, the use of a constant for the length 'max98095_dai' has been
replaced with ARRAY_SIZE().
Signed-off-by: Taylor Hutt <thutt@chromium.org>
---
sound/soc/codecs/max98095.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index e1d282d..9a793b3 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -2261,11 +2261,11 @@ static int max98095_probe(struct snd_soc_codec *codec)
ret = snd_soc_read(codec, M98095_0FF_REV_ID);
if (ret < 0) {
- dev_err(codec->dev, "Failed to read device revision: %d\n",
+ dev_err(codec->dev, "Failure reading hardware revision: %d\n",
ret);
goto err_access;
}
- dev_info(codec->dev, "revision %c\n", ret + 'A');
+ dev_info(codec->dev, "Hardware revision: %c\n", ret - 0x40 + 'A');
snd_soc_write(codec, M98095_097_PWR_SYS, M98095_PWRSV);
@@ -2342,8 +2342,8 @@ static int max98095_i2c_probe(struct i2c_client *i2c,
max98095->control_data = i2c;
max98095->pdata = i2c->dev.platform_data;
- ret = snd_soc_register_codec(&i2c->dev,
- &soc_codec_dev_max98095, &max98095_dai[0], 3);
+ ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_max98095,
+ max98095_dai, ARRAY_SIZE(max98095_dai));
if (ret < 0)
kfree(max98095);
return ret;
--
1.7.3.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision.
2011-06-20 18:54 [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision Taylor Hutt
@ 2011-06-20 20:06 ` Liam Girdwood
2011-06-21 0:23 ` Mark Brown
2011-06-21 23:28 ` Mark Brown
2 siblings, 0 replies; 11+ messages in thread
From: Liam Girdwood @ 2011-06-20 20:06 UTC (permalink / raw)
To: Taylor Hutt
Cc: Mark Brown, Jaroslav Kysela, Takashi Iwai, Peter Hsiang,
Olof Johansson, alsa-devel, linux-kernel
On Mon, 2011-06-20 at 11:54 -0700, Taylor Hutt wrote:
> The base hardware revision of the Maxim 98095 part is 0x40; the code
> which outputs the revision of the hardware has been updated to
> properly use uppercase alphabetic values for the revision numbers.
>
> Also, the use of a constant for the length 'max98095_dai' has been
> replaced with ARRAY_SIZE().
>
> Signed-off-by: Taylor Hutt <thutt@chromium.org>
Acked-by: Liam Girdwood <lrg@ti.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision.
2011-06-20 18:54 [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision Taylor Hutt
2011-06-20 20:06 ` Liam Girdwood
@ 2011-06-21 0:23 ` Mark Brown
2011-06-21 0:43 ` Peter Hsiang
[not found] ` <BANLkTikH6XpGNamh8z4zspxteH3K4mNmew@mail.gmail.com>
2011-06-21 23:28 ` Mark Brown
2 siblings, 2 replies; 11+ messages in thread
From: Mark Brown @ 2011-06-21 0:23 UTC (permalink / raw)
To: Taylor Hutt
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Hsiang,
Olof Johansson, alsa-devel, linux-kernel
On Mon, Jun 20, 2011 at 11:54:32AM -0700, Taylor Hutt wrote:
> The base hardware revision of the Maxim 98095 part is 0x40; the code
> which outputs the revision of the hardware has been updated to
> properly use uppercase alphabetic values for the revision numbers.
Are you sure that this is true for all devices that might be supported
by the driver (I'm guessing there may be other variants)? There's often
a drift between silicon and package revisions which gets papered over by
datasheets and ignored by drivers.
> Also, the use of a constant for the length 'max98095_dai' has been
> replaced with ARRAY_SIZE().
Don't include a series of random unrelated changes in a single patch,
split them up into separate patches. This makes review much easier if
nothing else. There's no overlap at all between this change and the one
above. The change is sensible.
> ret = snd_soc_read(codec, M98095_0FF_REV_ID);
> if (ret < 0) {
> - dev_err(codec->dev, "Failed to read device revision: %d\n",
> + dev_err(codec->dev, "Failure reading hardware revision: %d\n",
> ret);
You've also got this again unrelated change which isn't mentioned in the
changelog at all.
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision.
2011-06-21 0:23 ` Mark Brown
@ 2011-06-21 0:43 ` Peter Hsiang
2011-06-21 1:10 ` Mark Brown
[not found] ` <BANLkTikH6XpGNamh8z4zspxteH3K4mNmew@mail.gmail.com>
1 sibling, 1 reply; 11+ messages in thread
From: Peter Hsiang @ 2011-06-21 0:43 UTC (permalink / raw)
To: Mark Brown, Taylor Hutt
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Olof Johansson,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
On Mon, Jun 20, 2011, Mark Brown wrote:
> On Mon, Jun 20, 2011 at 11:54:32AM -0700, Taylor Hutt wrote:
> > The base hardware revision of the Maxim 98095 part is 0x40; the code
> > which outputs the revision of the hardware has been updated to
> > properly use uppercase alphabetic values for the revision numbers.
>
> Are you sure that this is true for all devices that might be supported
> by the driver (I'm guessing there may be other variants)? There's
> often a drift between silicon and package revisions which gets papered
> over by datasheets and ignored by drivers.
I checked with hardware engineering and was told 0x40=RevA, 0x41=RevB..
Would a raw value or the use of a 0x3F bit mask be more acceptable?
Peter
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision.
2011-06-21 0:43 ` Peter Hsiang
@ 2011-06-21 1:10 ` Mark Brown
2011-06-21 11:55 ` Mark Brown
0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2011-06-21 1:10 UTC (permalink / raw)
To: Peter Hsiang
Cc: Taylor Hutt, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Olof Johansson, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
On Mon, Jun 20, 2011 at 05:43:58PM -0700, Peter Hsiang wrote:
> I checked with hardware engineering and was told 0x40=RevA, 0x41=RevB..
> Would a raw value or the use of a 0x3F bit mask be more acceptable?
I don't mind (though it does seem like the high bit isn't part of the
actual data), it was just that it's a common error to assume that die
revisions and package revisions correspond directly.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision.
[not found] ` <BANLkTikH6XpGNamh8z4zspxteH3K4mNmew@mail.gmail.com>
@ 2011-06-21 10:06 ` Mark Brown
0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2011-06-21 10:06 UTC (permalink / raw)
To: Taylor Hutt
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Hsiang,
Olof Johansson, alsa-devel, linux-kernel
On Mon, Jun 20, 2011 at 08:22:32PM -0700, Taylor Hutt wrote:
> On Mon, Jun 20, 2011 at 5:23 PM, Mark Brown <
> > Don't include a series of random unrelated changes in a single patch,
> > split them up into separate patches. This makes review much easier if
> > nothing else. There's no overlap at all between this change and the one
> > above. The change is sensible.
> Ok, fine. Seemed trivial enough and didn't seem like the code churn for
> another patch was warranted.
> But, ok.
Like I say it's for review - it's much easier to look at a diff and
verify that it does exactly one thing than it is to verify that it does
a series of unrelated things, that all of them got covered, that there's
no unexpected additional changes and that all of them are complete.
> > > ret = snd_soc_read(codec, M98095_0FF_REV_ID);
> > > if (ret < 0) {
> > > - dev_err(codec->dev, "Failed to read device revision: %d\n",
> > > + dev_err(codec->dev, "Failure reading hardware revision:
> > %d\n",
> > > ret);
> > You've also got this again unrelated change which isn't mentioned in the
> > changelog at all.
> This is part of the change for the hardware revision, and it seems pretty
> clear that they're related to me. The text of the two output messages are
> now more aligned, and they are both related to reporting the hardware
> revision.
You're doing three things here - you're changing the revision that's
printed, you're rewriting the text that's output for some reason and
you're changing the way the number of DAIs is stored and you only
mentioned two of those. My first thought when I saw this change, just
looking at the shape of the diff rather than reading the text of the
message, was that it didn't belong and I needed to slow down and look in
more detail. Had it been mentioned in the log I would have been
expecting to see some random text only updates, making this less of a
surprise.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision.
2011-06-21 1:10 ` Mark Brown
@ 2011-06-21 11:55 ` Mark Brown
[not found] ` <BANLkTinfL8uSdCvrQYPJb1TQH3HSCu=wAPFZv-AcWRw1_jspXg@mail.gmail.com>
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Mark Brown @ 2011-06-21 11:55 UTC (permalink / raw)
To: Peter Hsiang
Cc: Taylor Hutt, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Olof Johansson, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
On Tue, Jun 21, 2011 at 02:10:39AM +0100, Mark Brown wrote:
> On Mon, Jun 20, 2011 at 05:43:58PM -0700, Peter Hsiang wrote:
> > I checked with hardware engineering and was told 0x40=RevA, 0x41=RevB..
> > Would a raw value or the use of a 0x3F bit mask be more acceptable?
> I don't mind (though it does seem like the high bit isn't part of the
> actual data), it was just that it's a common error to assume that die
> revisions and package revisions correspond directly.
This means if you're OK with it I can apply the patch as-is, BTW.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision.
[not found] ` <BANLkTinfL8uSdCvrQYPJb1TQH3HSCu=wAPFZv-AcWRw1_jspXg@mail.gmail.com>
@ 2011-06-21 17:10 ` Mark Brown
0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2011-06-21 17:10 UTC (permalink / raw)
To: Taylor Hutt
Cc: Peter Hsiang, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Olof Johansson, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
On Tue, Jun 21, 2011 at 07:52:41AM -0700, Taylor Hutt wrote:
> Please let me know if you'd like me to continue splitting this patch into
> two changes.
It won't hurt if you don't need to respin for some other reason, but
it's not 100% essential.
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision.
2011-06-21 11:55 ` Mark Brown
[not found] ` <BANLkTinfL8uSdCvrQYPJb1TQH3HSCu=wAPFZv-AcWRw1_jspXg@mail.gmail.com>
@ 2011-06-21 20:16 ` Peter Hsiang
2011-06-21 20:48 ` Peter Hsiang
2 siblings, 0 replies; 11+ messages in thread
From: Peter Hsiang @ 2011-06-21 20:16 UTC (permalink / raw)
To: Mark Brown
Cc: Taylor Hutt, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Olof Johansson, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
On Tue, Jun 21, 2011, Mark Brown wrote:
> On Tue, Jun 21, 2011 at 02:10:39AM +0100, Mark Brown wrote:
> > On Mon, Jun 20, 2011 at 05:43:58PM -0700, Peter Hsiang wrote:
>
> > > I checked with hardware engineering and was told 0x40=RevA,
> 0x41=RevB..
>
> This means if you're OK with it I can apply the patch as-is, BTW.
Mark, I am ok with this. Thanks!
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision.
2011-06-21 11:55 ` Mark Brown
[not found] ` <BANLkTinfL8uSdCvrQYPJb1TQH3HSCu=wAPFZv-AcWRw1_jspXg@mail.gmail.com>
2011-06-21 20:16 ` Peter Hsiang
@ 2011-06-21 20:48 ` Peter Hsiang
2 siblings, 0 replies; 11+ messages in thread
From: Peter Hsiang @ 2011-06-21 20:48 UTC (permalink / raw)
To: Mark Brown
Cc: Taylor Hutt, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Olof Johansson, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
On Tue, Jun 21, 2011, Mark Brown wrote:
> On Tue, Jun 21, 2011 at 02:10:39AM +0100, Mark Brown wrote:
> > On Mon, Jun 20, 2011 at 05:43:58PM -0700, Peter Hsiang wrote:
>
> > > I checked with hardware engineering and was told 0x40=RevA,
> 0x41=RevB..
>
> This means if you're OK with it I can apply the patch as-is, BTW.
Acked-by: Peter Hsiang <peter.hsiang@maxim-ic.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision.
2011-06-20 18:54 [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision Taylor Hutt
2011-06-20 20:06 ` Liam Girdwood
2011-06-21 0:23 ` Mark Brown
@ 2011-06-21 23:28 ` Mark Brown
2 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2011-06-21 23:28 UTC (permalink / raw)
To: Taylor Hutt
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Hsiang,
Olof Johansson, alsa-devel, linux-kernel
On Mon, Jun 20, 2011 at 11:54:32AM -0700, Taylor Hutt wrote:
> The base hardware revision of the Maxim 98095 part is 0x40; the code
> which outputs the revision of the hardware has been updated to
> properly use uppercase alphabetic values for the revision numbers.
>
> Also, the use of a constant for the length 'max98095_dai' has been
> replaced with ARRAY_SIZE().
Applied. Like I said in my previous mail please do try to split your
patches up better and make sure the changelogs are accurate.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-06-21 23:28 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-20 18:54 [PATCH] ASoC: codecs: Max98095: Fix logging of hardware revision Taylor Hutt
2011-06-20 20:06 ` Liam Girdwood
2011-06-21 0:23 ` Mark Brown
2011-06-21 0:43 ` Peter Hsiang
2011-06-21 1:10 ` Mark Brown
2011-06-21 11:55 ` Mark Brown
[not found] ` <BANLkTinfL8uSdCvrQYPJb1TQH3HSCu=wAPFZv-AcWRw1_jspXg@mail.gmail.com>
2011-06-21 17:10 ` Mark Brown
2011-06-21 20:16 ` Peter Hsiang
2011-06-21 20:48 ` Peter Hsiang
[not found] ` <BANLkTikH6XpGNamh8z4zspxteH3K4mNmew@mail.gmail.com>
2011-06-21 10:06 ` Mark Brown
2011-06-21 23:28 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox