[PATCH] of: Add simple panel device tree binding

Thierry Reding thierry.reding at gmail.com
Tue Nov 26 01:11:43 PST 2013


On Tue, Nov 26, 2013 at 10:01:54AM +0800, Daniel Kurtz wrote:
> On Sat, Nov 23, 2013 at 2:41 AM, Thierry Reding
> <thierry.reding at gmail.com> wrote:
> > This binding specifies a set of common properties for display panels. It
> > can be used as a basis by bindings for specific panels.
> >
> > Bindings for three specific panels are provided to show how the simple
> > panel binding can be used.
[...]
> > +Example:
> > +
> > +       panel: panel {
> > +               compatible = "cptt,claa101wb01";
> > +               ddc-i2c-bus = <&panelddc>;
> > +
> > +               power-supply = <&vdd_pnl_reg>;
> > +               enable-gpios = <&gpio 90 0>;
> > +
> > +               backlight = <&backlight>;
> > +       };
> 
> 
> Pardon the question if this has been discussed before, but, would this
> also be a good binding in which to store a panel's physical dimensions
> (mmWidth, mmHeight)?  Or is there another binding more appropriate?

This binding doesn't define those properties because they are implied by
the compatible string. The corresponding driver defines a structure like
this:

	struct panel_desc {
		const struct drm_display_mode *modes;
		unsigned int num_modes;

		struct {
			unsigned int width;
			unsigned int height;
		} size;
	};

The panel_desc.size structure contains the physical panel dimensions,
specified in mm. With that, a panel will be supported by defining
something like this:

	static const struct drm_display_mode foo_mode = {
		...
	};

	static const struct panel_desc foo = {
		.modes = &foo_mode,
		.num_modes = 1,
		.size {
			.width = 223,
			.height = 125,
		},
	};

	static const struct of_device_id platform_of_match[] = {
		...
		{
			.compatible = "vendor,foo",
			.data = &foo,
		},
		...
	};

I assume you have a specific use-case in mind. Does this provide what
you need? The driver patches were posted earlier[0][1]. They have
changed slightly since then to address review comments, but nothing
significant.

Thierry

[0]: http://www.spinics.net/lists/devicetree/msg08498.html
[1]: http://www.spinics.net/lists/devicetree/msg08499.html
-------------- 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/20131126/7411b98c/attachment.pgp>


More information about the dri-devel mailing list