* [PATCH] auxdisplay: hd44780: Fix DT properties to include units of measurement
@ 2017-03-23 13:25 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2017-03-23 13:25 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Willy Tarreau, Miguel Ojeda Sandonis, Rob Herring, Mark Rutland,
Ksenija Stanojevic, Arnd Bergmann, devicetree, linux-kernel,
Geert Uytterhoeven
DT properties specifying physical properties should contain appropriate
suffices indicating the units of measurement.
Hence amend the HD44780 DT bindings to add "chars" suffixes to the
"display-height" and "display-width" properties, and update the driver
to parse them.
Fixes: dd9502a9e9156dd8 ("dt-bindings: auxdisplay: Add bindings for Hitachi HD44780")
Fixes: d47d88361feea2ce ("auxdisplay: Add HD44780 Character LCD support")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Against char-misc-next
Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt | 11 ++++++-----
drivers/auxdisplay/hd44780.c | 5 +++--
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt b/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt
index ee4054da458d412f..2aa24b8899236882 100644
--- a/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt
+++ b/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt
@@ -15,8 +15,8 @@ Required properties:
- rs-gpios: Must contain a GPIO specifier, referring to the GPIO pin
connected to the "RS" (Register Select) signal line of the LCD Controller's
bus interface,
- - display-height: Height of the display, in character cells,
- - display-width: Width of the display, in character cells.
+ - display-height-chars: Height of the display, in character cells,
+ - display-width-chars: Width of the display, in character cells.
Optional properties:
- rw-gpios: Must contain a GPIO specifier, referring to the GPIO pin
@@ -25,7 +25,8 @@ Optional properties:
- backlight-gpios: Must contain a GPIO specifier, referring to the GPIO pin
used for enabling the LCD's backlight,
- internal-buffer-width: Internal buffer width (default is 40 for displays
- with 1 or 2 lines, and display-width for displays with more than 2 lines).
+ with 1 or 2 lines, and display-width-chars for displays with more than 2
+ lines).
Example:
@@ -39,6 +40,6 @@ Example:
enable-gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
rs-gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
- display-height = <2>;
- display-width = <16>;
+ display-height-chars = <2>;
+ display-width-chars = <16>;
};
diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c
index 1665ac6ef9ffcb31..036eec40428943b7 100644
--- a/drivers/auxdisplay/hd44780.c
+++ b/drivers/auxdisplay/hd44780.c
@@ -264,10 +264,11 @@ static int hd44780_probe(struct platform_device *pdev)
}
/* Required properties */
- ret = device_property_read_u32(dev, "display-height", &lcd->height);
+ ret = device_property_read_u32(dev, "display-height-chars",
+ &lcd->height);
if (ret)
goto fail;
- ret = device_property_read_u32(dev, "display-width", &lcd->width);
+ ret = device_property_read_u32(dev, "display-width-chars", &lcd->width);
if (ret)
goto fail;
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] auxdisplay: hd44780: Fix DT properties to include units of measurement
@ 2017-03-23 13:25 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2017-03-23 13:25 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Willy Tarreau, Miguel Ojeda Sandonis, Rob Herring, Mark Rutland,
Ksenija Stanojevic, Arnd Bergmann,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven
DT properties specifying physical properties should contain appropriate
suffices indicating the units of measurement.
Hence amend the HD44780 DT bindings to add "chars" suffixes to the
"display-height" and "display-width" properties, and update the driver
to parse them.
Fixes: dd9502a9e9156dd8 ("dt-bindings: auxdisplay: Add bindings for Hitachi HD44780")
Fixes: d47d88361feea2ce ("auxdisplay: Add HD44780 Character LCD support")
Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
---
Against char-misc-next
Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt | 11 ++++++-----
drivers/auxdisplay/hd44780.c | 5 +++--
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt b/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt
index ee4054da458d412f..2aa24b8899236882 100644
--- a/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt
+++ b/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt
@@ -15,8 +15,8 @@ Required properties:
- rs-gpios: Must contain a GPIO specifier, referring to the GPIO pin
connected to the "RS" (Register Select) signal line of the LCD Controller's
bus interface,
- - display-height: Height of the display, in character cells,
- - display-width: Width of the display, in character cells.
+ - display-height-chars: Height of the display, in character cells,
+ - display-width-chars: Width of the display, in character cells.
Optional properties:
- rw-gpios: Must contain a GPIO specifier, referring to the GPIO pin
@@ -25,7 +25,8 @@ Optional properties:
- backlight-gpios: Must contain a GPIO specifier, referring to the GPIO pin
used for enabling the LCD's backlight,
- internal-buffer-width: Internal buffer width (default is 40 for displays
- with 1 or 2 lines, and display-width for displays with more than 2 lines).
+ with 1 or 2 lines, and display-width-chars for displays with more than 2
+ lines).
Example:
@@ -39,6 +40,6 @@ Example:
enable-gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
rs-gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
- display-height = <2>;
- display-width = <16>;
+ display-height-chars = <2>;
+ display-width-chars = <16>;
};
diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c
index 1665ac6ef9ffcb31..036eec40428943b7 100644
--- a/drivers/auxdisplay/hd44780.c
+++ b/drivers/auxdisplay/hd44780.c
@@ -264,10 +264,11 @@ static int hd44780_probe(struct platform_device *pdev)
}
/* Required properties */
- ret = device_property_read_u32(dev, "display-height", &lcd->height);
+ ret = device_property_read_u32(dev, "display-height-chars",
+ &lcd->height);
if (ret)
goto fail;
- ret = device_property_read_u32(dev, "display-width", &lcd->width);
+ ret = device_property_read_u32(dev, "display-width-chars", &lcd->width);
if (ret)
goto fail;
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] auxdisplay: hd44780: Fix DT properties to include units of measurement
@ 2017-03-29 2:34 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2017-03-29 2:34 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Greg Kroah-Hartman, Willy Tarreau, Miguel Ojeda Sandonis,
Mark Rutland, Ksenija Stanojevic, Arnd Bergmann, devicetree,
linux-kernel
On Thu, Mar 23, 2017 at 02:25:37PM +0100, Geert Uytterhoeven wrote:
> DT properties specifying physical properties should contain appropriate
> suffices indicating the units of measurement.
>
> Hence amend the HD44780 DT bindings to add "chars" suffixes to the
> "display-height" and "display-width" properties, and update the driver
> to parse them.
>
> Fixes: dd9502a9e9156dd8 ("dt-bindings: auxdisplay: Add bindings for Hitachi HD44780")
> Fixes: d47d88361feea2ce ("auxdisplay: Add HD44780 Character LCD support")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> Against char-misc-next
>
> Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt | 11 ++++++-----
> drivers/auxdisplay/hd44780.c | 5 +++--
> 2 files changed, 9 insertions(+), 7 deletions(-)
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] auxdisplay: hd44780: Fix DT properties to include units of measurement
@ 2017-03-29 2:34 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2017-03-29 2:34 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Greg Kroah-Hartman, Willy Tarreau, Miguel Ojeda Sandonis,
Mark Rutland, Ksenija Stanojevic, Arnd Bergmann,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Thu, Mar 23, 2017 at 02:25:37PM +0100, Geert Uytterhoeven wrote:
> DT properties specifying physical properties should contain appropriate
> suffices indicating the units of measurement.
>
> Hence amend the HD44780 DT bindings to add "chars" suffixes to the
> "display-height" and "display-width" properties, and update the driver
> to parse them.
>
> Fixes: dd9502a9e9156dd8 ("dt-bindings: auxdisplay: Add bindings for Hitachi HD44780")
> Fixes: d47d88361feea2ce ("auxdisplay: Add HD44780 Character LCD support")
> Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
> ---
> Against char-misc-next
>
> Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt | 11 ++++++-----
> drivers/auxdisplay/hd44780.c | 5 +++--
> 2 files changed, 9 insertions(+), 7 deletions(-)
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-29 2:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-23 13:25 [PATCH] auxdisplay: hd44780: Fix DT properties to include units of measurement Geert Uytterhoeven
2017-03-23 13:25 ` Geert Uytterhoeven
2017-03-29 2:34 ` Rob Herring
2017-03-29 2:34 ` Rob Herring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.