diff mbox

[PATCHv2,4/8] dt-bindings: panel: common: document orientation property

Message ID 20180208183035.8461-5-sebastian.reichel@collabora.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Sebastian Reichel Feb. 8, 2018, 6:30 p.m. UTC
Introduce new "orientation" property for describing in which
orientation a panel has been mounted to the device. This can
be used by the operating system to automatically rotate the
display correctly.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
 .../devicetree/bindings/display/panel/panel-common.txt     | 12 ++++++++++++
 include/dt-bindings/display/common.h                       | 14 ++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 include/dt-bindings/display/common.h

Comments

Rob Herring (Arm) Feb. 18, 2018, 11:24 p.m. UTC | #1
On Thu, Feb 08, 2018 at 07:30:31PM +0100, Sebastian Reichel wrote:
> Introduce new "orientation" property for describing in which
> orientation a panel has been mounted to the device. This can
> be used by the operating system to automatically rotate the
> display correctly.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> ---
>  .../devicetree/bindings/display/panel/panel-common.txt     | 12 ++++++++++++
>  include/dt-bindings/display/common.h                       | 14 ++++++++++++++
>  2 files changed, 26 insertions(+)
>  create mode 100644 include/dt-bindings/display/common.h
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.txt b/Documentation/devicetree/bindings/display/panel/panel-common.txt
> index 557fa765adcb..c646b8908458 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-common.txt
> +++ b/Documentation/devicetree/bindings/display/panel/panel-common.txt
> @@ -18,6 +18,18 @@ Descriptive Properties
>    physical area where images are displayed. These properties are expressed in
>    millimeters and rounded to the closest unit.
>  
> +- orientation: The orientation property specifies the panel orientation
> +  in relation to the device's casing. The following values are possible:
> +
> +   * 0 = The top side of the panel matches the top side of the device's
> +         casing.
> +   * 1 = The top side of the panel matches the bottom side of the device's
> +         casing. In other words the panel is mounted upside-down.
> +   * 2 = The left side of the panel matches the top side of the device's
> +         casing.
> +   * 3 = The right side of the panel matches the top side of the device's
> +         casing.


The rotation property in panel.txt already handles this, right?

> +
>  - label: The label property specifies a symbolic name for the panel as a
>    string suitable for use by humans. It typically contains a name inscribed on
>    the system (e.g. as an affixed label) or specified in the system's
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sebastian Reichel Feb. 19, 2018, 11:06 a.m. UTC | #2
Hi,

On Sun, Feb 18, 2018 at 05:24:24PM -0600, Rob Herring wrote:
> On Thu, Feb 08, 2018 at 07:30:31PM +0100, Sebastian Reichel wrote:
> > Introduce new "orientation" property for describing in which
> > orientation a panel has been mounted to the device. This can
> > be used by the operating system to automatically rotate the
> > display correctly.
> > 
> > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> > ---
> >  .../devicetree/bindings/display/panel/panel-common.txt     | 12 ++++++++++++
> >  include/dt-bindings/display/common.h                       | 14 ++++++++++++++
> >  2 files changed, 26 insertions(+)
> >  create mode 100644 include/dt-bindings/display/common.h
> > 
> > diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.txt b/Documentation/devicetree/bindings/display/panel/panel-common.txt
> > index 557fa765adcb..c646b8908458 100644
> > --- a/Documentation/devicetree/bindings/display/panel/panel-common.txt
> > +++ b/Documentation/devicetree/bindings/display/panel/panel-common.txt
> > @@ -18,6 +18,18 @@ Descriptive Properties
> >    physical area where images are displayed. These properties are expressed in
> >    millimeters and rounded to the closest unit.
> >  
> > +- orientation: The orientation property specifies the panel orientation
> > +  in relation to the device's casing. The following values are possible:
> > +
> > +   * 0 = The top side of the panel matches the top side of the device's
> > +         casing.
> > +   * 1 = The top side of the panel matches the bottom side of the device's
> > +         casing. In other words the panel is mounted upside-down.
> > +   * 2 = The left side of the panel matches the top side of the device's
> > +         casing.
> > +   * 3 = The right side of the panel matches the top side of the device's
> > +         casing.
> 
> The rotation property in panel.txt already handles this, right?

Yes, looks like it can be used. I guess panel.txt and
panel-common.txt should be merged, though?

> >  - label: The label property specifies a symbolic name for the panel as a
> >    string suitable for use by humans. It typically contains a name inscribed on
> >    the system (e.g. as an affixed label) or specified in the system's

-- Sebastian
Rob Herring (Arm) Feb. 20, 2018, 7:09 p.m. UTC | #3
On Mon, Feb 19, 2018 at 5:06 AM, Sebastian Reichel
<sebastian.reichel@collabora.co.uk> wrote:
> Hi,
>
> On Sun, Feb 18, 2018 at 05:24:24PM -0600, Rob Herring wrote:
>> On Thu, Feb 08, 2018 at 07:30:31PM +0100, Sebastian Reichel wrote:
>> > Introduce new "orientation" property for describing in which
>> > orientation a panel has been mounted to the device. This can
>> > be used by the operating system to automatically rotate the
>> > display correctly.
>> >
>> > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
>> > ---
>> >  .../devicetree/bindings/display/panel/panel-common.txt     | 12 ++++++++++++
>> >  include/dt-bindings/display/common.h                       | 14 ++++++++++++++
>> >  2 files changed, 26 insertions(+)
>> >  create mode 100644 include/dt-bindings/display/common.h
>> >
>> > diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.txt b/Documentation/devicetree/bindings/display/panel/panel-common.txt
>> > index 557fa765adcb..c646b8908458 100644
>> > --- a/Documentation/devicetree/bindings/display/panel/panel-common.txt
>> > +++ b/Documentation/devicetree/bindings/display/panel/panel-common.txt
>> > @@ -18,6 +18,18 @@ Descriptive Properties
>> >    physical area where images are displayed. These properties are expressed in
>> >    millimeters and rounded to the closest unit.
>> >
>> > +- orientation: The orientation property specifies the panel orientation
>> > +  in relation to the device's casing. The following values are possible:
>> > +
>> > +   * 0 = The top side of the panel matches the top side of the device's
>> > +         casing.
>> > +   * 1 = The top side of the panel matches the bottom side of the device's
>> > +         casing. In other words the panel is mounted upside-down.
>> > +   * 2 = The left side of the panel matches the top side of the device's
>> > +         casing.
>> > +   * 3 = The right side of the panel matches the top side of the device's
>> > +         casing.
>>
>> The rotation property in panel.txt already handles this, right?
>
> Yes, looks like it can be used. I guess panel.txt and
> panel-common.txt should be merged, though?

Yes, please. Actually, I'd like to merge simple-panel.txt too because
that is really kernel driver, not a type of panel. But there's a lot
of references to it to fix.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.txt b/Documentation/devicetree/bindings/display/panel/panel-common.txt
index 557fa765adcb..c646b8908458 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-common.txt
+++ b/Documentation/devicetree/bindings/display/panel/panel-common.txt
@@ -18,6 +18,18 @@  Descriptive Properties
   physical area where images are displayed. These properties are expressed in
   millimeters and rounded to the closest unit.
 
+- orientation: The orientation property specifies the panel orientation
+  in relation to the device's casing. The following values are possible:
+
+   * 0 = The top side of the panel matches the top side of the device's
+         casing.
+   * 1 = The top side of the panel matches the bottom side of the device's
+         casing. In other words the panel is mounted upside-down.
+   * 2 = The left side of the panel matches the top side of the device's
+         casing.
+   * 3 = The right side of the panel matches the top side of the device's
+         casing.
+
 - label: The label property specifies a symbolic name for the panel as a
   string suitable for use by humans. It typically contains a name inscribed on
   the system (e.g. as an affixed label) or specified in the system's
diff --git a/include/dt-bindings/display/common.h b/include/dt-bindings/display/common.h
new file mode 100644
index 000000000000..a864775445a0
--- /dev/null
+++ b/include/dt-bindings/display/common.h
@@ -0,0 +1,14 @@ 
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * This header provides common constants for displays
+ */
+
+#ifndef _DT_BINDINGS_DISPLAY_COMMON_H
+#define _DT_BINDINGS_DISPLAY_COMMON_H
+
+#define PANEL_ORIENTATION_NORMAL 0
+#define PANEL_ORIENTATION_BOTTOM_UP 1
+#define PANEL_ORIENTATION_LEFT_UP 2
+#define PANEL_ORIENTATION_RIGHT_UP 3
+
+#endif