[PATCH] ASoC: twl6040: Support for DT
Mark Brown
broonie at opensource.wolfsonmicro.com
Fri May 11 23:08:16 EST 2012
On Fri, May 11, 2012 at 01:02:26PM +0200, Cousson, Benoit wrote:
> On 5/9/2012 3:35 PM, Mark Brown wrote:
> >Clearly. This is all very circular. Obviously if you're intent on
> >using a phandle specific to the MFD child then you need to have that in
> >the device tree but this is because you're making the child devices
> >externally visible... Clearly if we're not going to use the MFD
> >subdevices in the DT then the links ought to reference the chip.
> I'm not sure to understand you concern here.
> Describing sub nodes, especially for big SoC is pretty useful.
> It is as useful as doing that for board that are sharing similar components.
The concern here is that the device tree you're writing here is clearly
just a direct translation of the particular stuff Linux happens to use
internally into device tree; this is similar to the thing with using
hwmod in the device tree representation and omitting basic stuff like
the register ranges.
> It will allow to define several Audio / PMIC variants without having
> to rewrite a driver potentially.
This binding doesn't do anything to move towards that goal given that
the only information it includes about the contents of the chip is the
name. Writing the name out in separate CODEC and vibra nodes really
isn't going to accomplish much to promote reuse that can't trivially be
achieved by parsing the name in the MFD driver.
If the binding were doing things like describing the internals of the
device in a way that meant the driver didn't need to know that this was
a twl6040 in particular this sort of thinking is useful but the binding
we have here just isn't doing that at all.
> Both Vibra and Codec IPs can be located elsewhere, so by exposing
> that inside the DT, you will increase the level of HW details and
> thus make the re-use of these sub-IPs easier.
Especially for the CODEC it's not really an IP in itself, it's an
assembly of large numbers of other IPs - digital audio interfaces,
analogue amps and whatnot. Like I say if the device tree described
this assembly it'd be different but it's really not doing that.
> Moreover, the fact the Linux implementation uses MFD to represent
> that is irrelevant for the DT description. We should be able to use
> whatever SW representation for this type of HW.
This is precisely my point, what we're being presented with here is a
device tree description of the particular way that Linux wants to
understand this stuff rather than something that lets us learn about the
chip internals.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20120511/d7b67cad/attachment.sig>
More information about the devicetree-discuss
mailing list