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:	Fri, 1 Oct 2010 15:53:38 +0800
From:	Axel Lin <axel.lin@...il.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Haojian Zhuang <haojian.zhuang@...vell.com>,
	Liam Girdwood <lrg@...mlogic.co.uk>
Subject: Re: [PATCH] regulator: max8649 - fix setting extclk_freq

2010/10/1 Mark Brown <broonie@...nsource.wolfsonmicro.com>:
> On Fri, Oct 01, 2010 at 01:56:27PM +0800, Axel Lin wrote:
>> The SYNC bits are BIT6 and BIT7 of MAX8649_SYNC register.
>> pdata->extclk_freq could be [0|1|2].
>> (MAX8649_EXTCLK_26MHZ|MAX8649_EXTCLK_13MHZ|MAX8649_EXTCLK_19MHZ)
>> It requires to left shift 6 bits to properly set extclk_freq.
>>
>> Signed-off-by: Axel Lin <axel.lin@...il.com>
>
> Are there existing users of the driver?  It's not always 100% clear if
> people are expecting bitfield values that will be shifted in or values
> that can be ored directly in.  I don't really mind either way but I'd
> rather be careful.
>

max8649 regulator is used in arch/arm/mach-mmp/jasper.c (Marvell
Jasper Development Platform)

I checked include/linux/regulator/max8649.h
extclk_freq only takes 2 bits:
unsigned        extclk_freq:2;

People should set extclk_freq to
[MAX8649_EXTCLK_26MHZ|MAX8649_EXTCLK_13MHZ|MAX8649_EXTCLK_19MHZ],
so we need to do 6 bits left shift to properly set extclk_freq.

Regards,
Axel
--
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