[PATCH v7 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver

Mark Rutland mark.rutland at arm.com
Tue Aug 20 18:54:09 EST 2013


On Tue, Aug 20, 2013 at 06:19:49AM +0100, Shawn Guo wrote:
> On Mon, Aug 19, 2013 at 10:54:33AM +0100, Mark Rutland wrote:
> > > I guess it's better to drop the 'imx6q-spdif' here?
> > 
> > That depends:
> > 
> > * If the two IP blocks are identical, only the "imx35-spdif" name is
> >   necessary, and we can forget about "fsl,imx6q-spdif".
> > 
> > * If "fsl,imx6q-spdif" is a strict superset of "fsl,imx35-spdif", having
> >   both names documented and in a compatible list for a "fsl,imx6q-spdif"
> >   device makes sense.
> 
> Practically, I found it's very useful to have "fsl,<soc>-<ip>" in the
> device compatible property in <soc>.dtsi, even when device driver does
> not match it right now.  For this example, I still prefer to have the
> following line for spdif device in imx6q.dtsi.
> 
> 	compatible = "fsl,imx6q-spdif", "fsl,imx35-spdif";

This is a good thing, but I was not referring to the driver. Nicolin
presumably has enough information about the hardware to know if the new
block is fully compatible, even if the driver doesn't yet poke the
hardware in such a way as to make that obvious.

> 
> The reason for that is we usually do not see all the differences of an
> IP block from one SoC to another when we firstly define the bindings
> for the device by looking at hardware reference manual.  Some
> programming model differences are only identified when we're actually
> programming.  That said, if some day we find there is difference between
> imx6q-spdif and imx35-spdif to be handled when we add something new to
> the driver, we only need to add "fsl,imx6q-spdif" as a new compatible
> into device driver and bindings document.  The existing device tree
> would need no update to work with the new kernel driver.

That's a valid concern, but I think that bindings should be documented
from the start (even if unused by the driver), otherwise we're in an
equally bad position later if we discover a device isn't backwards
compatible as we have no guarantee the new (previously undocumented)
string was picked up in all dts.

Thanks,
Mark.


More information about the Linuxppc-dev mailing list