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]
Message-ID: <515151A5.3090306@stericsson.com>
Date:	Tue, 26 Mar 2013 08:43:33 +0100
From:	Bengt Jönsson <bengt.g.jonsson@...ricsson.com>
To:	Axel Lin <axel.lin@...ics.com>
Cc:	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Lee Jones <lee.jones@...aro.org>,
	Yvan FILLION <yvan.fillion@...ricsson.com>,
	Mattias WALLIN <mattias.wallin@...ricsson.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC/RFT] regulator: ab8500: Remove is_enabled from struct
 ab8500_regulator_info

On 03/26/2013 07:50 AM, Axel Lin wrote:
> The is_enabled flag looks not necessary at all, it also introduces some issues
> because current code updates info->is_enabled flag in error paths of
> ab8500_regulator_enable() and ab8500_regulator_disable().
> Thus this patch removes is_enabled from struct ab8500_regulator_info.
>
> This patch also removes info->is_enabled checking in ab8500_regulator_set_mode(),
> so it allows setting mode even the regulator is disabled.
This patch will change the behaviour of set_mode as the ab8500 
regulators share mode and enable in the same register bits:
- off = 0b00
- low power mode= 0b11
- full powermode = 0b01
- (HW control mode = 0b10)

To keep regulator_enable/disable apart from regulator_set_mode I think 
this patch should not go in.
>
> Signed-off-by: Axel Lin <axel.lin@...ics.com>
> ---
> Hi,
> This patch also removes info->is_enabled checking in ab8500_regulator_set_mode().
> I'm not very clear if we should avoid setting mode when the regulator is disabled.
> It looks to me if we don't want to allow setting mode when regulator is disabled,
> this checking should be done in regulator-core.
Checking in regulator-core seems like a good idea to me.It would make 
the ab8500 code more clean, but I don't know how other drivers will be 
affected.
> Seems current code in other regulator drivers does not check if regulator is
> enabled or not in set_mode callback implementation.
> Axel
I know some other hardware has separate register bits for mode and 
enable which matches the framework better.

Bengt
--
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