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, 15 Jan 2016 08:58:10 +0100
From:	Peter Korsgaard <peter@...sgaard.com>
To:	"Yang\, Wenyou" <Wenyou.Yang@...el.com>
Cc:	Lee Jones <lee.jones@...aro.org>, Rob Herring <robh+dt@...nel.org>,
	"Pawel Moll" <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	"Ian Campbell" <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	"devicetree\@vger.kernel.org" <devicetree@...r.kernel.org>,
	"Krzysztof Kozlowski" <k.kozlowski@...sung.com>,
	"Ferre\, Nicolas" <Nicolas.FERRE@...el.com>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
	Javier Martinez Canillas <javier@...hile0.org>,
	"linux-arm-kernel\@lists.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD driver

>>>>> "Yang," == Yang, Wenyou <Wenyou.Yang@...el.com> writes:

Hi,

 >> Why not make it a tristate instead? Having regulators as modules is perhaps not a
 >> very wise thing to do, but conceptually I don't see why this code couldn't be a
 >> module.

 > Yes, you are right. it can be use a tristate.

Ok, good.

>> > +	act8945a = devm_kzalloc(&i2c->dev, sizeof(*act8945a), GFP_KERNEL);
 >> > +	if (!act8945a)
 >> > +		return -ENOMEM;
 >> > +
 >> 
 >> What is the point of this structure (and the header file)? Can't the subdevices just
 >> do dev_get_regmap(dev->parent)? regulator_register() afaik already does this by
 >> default.

 > Yes, I re-read regulator_register() code. It did do dev_get_regmap(dev->parent).

 > I think this structure should be pointed by dev->parent, this structure is necessary.

 > Yes regulator driver should be simpler.

 > Moreover, it is used by another sub device, charger. Which don't such code.

But the charger driver can just as well do:

dev_get_regmap(dev->parent);

instead of:

dev_get_drvdata(pdev->dev.parent)->regmap.

-- 
Venlig hilsen,
Peter Korsgaard 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ