[PATCH v3 13/32] drm/exynos: hdmi: remove the i2c drivers and use devtree

Thierry Reding thierry.reding at gmail.com
Mon Nov 11 00:44:27 PST 2013


On Sun, Nov 10, 2013 at 09:46:02PM +0100, Tomasz Figa wrote:
[...]
> On Tuesday 29 of October 2013 12:12:59 Sean Paul wrote:
[...]
> [snip]
> > @@ -1957,21 +1943,30 @@ static int hdmi_probe(struct platform_device *pdev)
> >  	}
> >  
> >  	/* DDC i2c driver */
> > -	if (i2c_add_driver(&ddc_driver)) {
> > -		DRM_ERROR("failed to register ddc i2c driver\n");
> > -		return -ENOENT;
> > +	ddc_node = of_find_node_by_name(NULL, "hdmiddc");
> 
> This is wrong. You shall not reference a device tree node by its name,
> except some very specific well-defined cases, such as cpus or memory
> nodes.
> 
> A solution closest to yours, but correct, would be to use the same match
> table as in the I2C driver you are removing and call
> of_find_matching_node().

Isn't the correct solution to use a phandle? That might need the binding
to change in a backwards incompatible way. Then again, if something as
simple as specifying a DDC I2C bus causes the binding to change in a
backwards incompatible way then it can't have been a very good binding
in the first place, right? +1 for unstable DT bindings...

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20131111/22afc651/attachment.pgp>


More information about the dri-devel mailing list