Re: [PATCH] of: Add simple panel device tree binding

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

 



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@xxxxxxxxx> 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

Attachment: pgplPiLSr0u3W.pgp
Description: PGP signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux