summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2017-03-23 14:25:37 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-08 17:48:19 +0200
commitc7c3f096eb5e721d8522ba060fa621ea906ef738 (patch)
tree3aa2dcdf4771aee2af27523fdf94332646bbf00a
parentdeb0b9b21d374f09de0745e0ed29a67503b44384 (diff)
downloadlwn-c7c3f096eb5e721d8522ba060fa621ea906ef738.tar.gz
lwn-c7c3f096eb5e721d8522ba060fa621ea906ef738.zip
auxdisplay: hd44780: Fix DT properties to include units of measurement
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> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt11
-rw-r--r--drivers/auxdisplay/hd44780.c5
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 ee4054da458d..2aa24b889923 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 1665ac6ef9ff..036eec404289 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;