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: <20151026004320.GU29919@sirena.org.uk>
Date:	Mon, 26 Oct 2015 09:43:20 +0900
From:	Mark Brown <broonie@...nel.org>
To:	"Andrew F. Davis" <afd@...com>
Cc:	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>,
	Lee Jones <lee.jones@...aro.org>,
	Alexandre Courbot <gnurou@...il.com>,
	Grygorii Strashko <grygorii.strashko@...com>,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 4/5] regulator: tps65912: Add regulator driver for the
 TPS65912 PMIC

On Sun, Oct 25, 2015 at 03:45:43PM -0500, Andrew F. Davis wrote:
> On 10/24/2015 05:14 PM, Mark Brown wrote:

> >Tbe binding document is buggy and doesn't reflect the code, there's no
> >compatible string in the driver.

> Sure there is:

> drivers/mfd/mt6397-core.c:48:
> .of_compatible = "mediatek,mt6397-regulator",

This is in the MFD, this is not used in actual systems.

> Then mfd_add_devices uses this to find the regulator node and fill
> in .of_node, then in the regulator driver:

> drivers/regulator/mt6397-regulator.c:48:
> .of_match = of_match_ptr(match),

> which uses your helper to match the nodes in the filled in .of_node.

This is in a regulator definition, it is using the regulator framework
support for parsing DT which must be used by modern drivers.  It is not
part of how the Linux driver model device is instantiated, that is done
using the struct platform_driver which is what we are talking about
here.

Please stop this, it is getting very tiresome.  

> >No, that's not the case - remember, users don't have to write a new
> >driver every time they instantiate a device on a board.  They're going
> >to have to list the in-use regulators one way or another but if we have
> >the extra compatible for regulators they have to bind both the core
> >device (which is going to be required anyway due to the control bus) and
> >the subnode saying that it has regulators (which we knew anyway as soon
> >as we knew we had the core device).

> We don't know what sub-devices the core device has, PMICs are more like
> SoCs on a bus than a regular device, the sub-parts change with every spin and
> we can represent this in DT like we do with SoCs. Else we would have to have
> a new core binding for every spin. We know what devices are on a particular
> SoC too, but we still list them and match them in DT so some SoC driver
> doesn't have to.

PMICs are very much smaller than SoCs, and again if you're not able to
usefully represent individual IPs in the DT (as is *clearly* the case
here where you are trying to make one node for the entire collection of
regulators) we're not getting any value.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ