lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 17 Jul 2012 15:01:46 +0200
From:	Peter Ujfalusi <peter.ujfalusi@...com>
To:	Rajeev kumar <rajeev-dlh.kumar@...com>
CC:	Samuel Ortiz <sameo@...ux.intel.com>, Liam Girdwood <lrg@...com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [alsa-devel] [PATCH 1/2] MFD: twl6040: Fix revision information

On 07/17/2012 08:39 AM, Rajeev kumar wrote:
>>   #define TWL6040_REV_ES1_0        0x00
>> -#define TWL6040_REV_ES1_1        0x01
>> -#define TWL6040_REV_ES1_2        0x02
>> +#define TWL6040_REV_ES1_1        0x01 /* Rev ES1.1 and ES1.2 */
>> +#define TWL6040_REV_ES1_3        0x02
>>
>>   #define TWL6040_IRQ_TH            0
>>   #define TWL6040_IRQ_PLUG        1
>> diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
>> index a36e9fc..2786de2 100644
>> --- a/sound/soc/codecs/twl6040.c
>> +++ b/sound/soc/codecs/twl6040.c
>> @@ -653,7 +653,7 @@ int twl6040_get_hs_step_size(struct snd_soc_codec *codec)
>>   {
>>       struct twl6040 *twl6040 = codec->control_data;
>>
>> -    if (twl6040_get_revid(twl6040)<  TWL6040_REV_ES1_2)
>> +    if (twl6040_get_revid(twl6040)<  TWL6040_REV_ES1_3)
> 
> 
> Instead of doing this change why not you take a #define for revision and  do
> if (twl6040_get_revid(twl6040)<  TWL6040_REV)

ES1.1, ES1.2 of twl6040 have 2mV HS step. Newer revisions (ES1.3 of twl6040
and twl6041) have 1mV HS step.
Here the comment was correct, but the define name was incorrect.

> 
> ~Rajeev
> 
>>           /* For ES under ES_1.3 HS step is 2 mV */
>>           return 2;
>>       else
> 


-- 
Péter


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ