Re: [PATCH 2/3] drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, Aug 05, 2016 at 12:02:39PM +0300, Jyri Sarha wrote:
> On 08/04/16 17:07, Russell King - ARM Linux wrote:
> > On Tue, Aug 02, 2016 at 03:05:08PM +0300, Jyri Sarha wrote:
> >> +	priv->audio_pdev = platform_device_register_data(
> >> +		dev, HDMI_CODEC_DRV_NAME, PLATFORM_DEVID_AUTO,
> >> +		&codec_data, sizeof(codec_data));
> > 
> > I'd much prefer that this was a child of the I2C device, which will
> > show the relationship between this virtual platform device and the
> > device which it's associated with.  That can be done via
> > platform_device_register_full().
> > 
> 
> That may be a problem. The ASoC card device tree binding current looks
> for the ASoC DAI's parent's of-node if it can not find the node for the
> DAI-device itself.

I don't follow.  The "parent" of this audio_pdev device above is
the "platform" device - /sys/devices/platform.  If ASoC is
referencing the parent of the above platform device for some
reason, it's probably not going to get anything useful from such
an attempt.

Any other ASoC codec driver where the codec platform device was
declared with a NULL parent pointer also ends up as a child of
that same location.

I'd _really_ be surprised if ASoC is even doing what you describe,
because such an action is totally illogical (as can be seen from
my description above.)

Moving it under the I2C device means it stays as a platform device,
but the relationship between the platform device and its I2C parent
is properly represented in the tree of devices, and also ensures
that, should PM hooks be added, that the platform device gets
properly ordered wrt the I2C device.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux