Re: [PATCH 13/22] lcd: Add GPIO LCD driver.
Alexander Shiyan
shc_work at mail.ru
Mon Jul 15 11:30:00 EDT 2013
> Signed-off-by: Denis Carikli <denis at eukrea.com>
> ---
> .../bindings/video/backlight/gpio-lcd.txt | 15 ++
> drivers/video/backlight/Kconfig | 8 +
> drivers/video/backlight/Makefile | 1 +
> drivers/video/backlight/gpio_lcd.c | 178 ++++++++++++++++++++
> 4 files changed, 202 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/video/backlight/gpio-lcd.txt
> create mode 100644 drivers/video/backlight/gpio_lcd.c
>
> diff --git a/Documentation/devicetree/bindings/video/backlight/gpio-lcd.txt b/Documentation/devicetree/bindings/video/backlight/gpio-lcd.txt
> new file mode 100644
> index 0000000..4ff409d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/video/backlight/gpio-lcd.txt
> @@ -0,0 +1,15 @@
> +gpio-lcd bindings
> +
> +Required properties:
> + - compatible: "gpio-lcd"
> + - gpios: describes the gpio that is used for enabling/disabling the lcd
> + (see GPIO binding[0] for more details).
> +
> +[0]: Documentation/devicetree/bindings/gpio/gpio.txt
> +
> +Example:
> +
> + lcd {
> + compatible = "gpio-lcd";
> + gpios = <&gpio3 13 0>;
> + };
> diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
> index 70e7706..eaf0525 100644
> --- a/drivers/video/backlight/Kconfig
> +++ b/drivers/video/backlight/Kconfig
> @@ -34,6 +34,14 @@ config LCD_CORGI
> Say y here to support the LCD panels usually found on SHARP
> corgi (C7x0) and spitz (Cxx00) models.
>
> +config LCD_GPIO
> + tristate "LCD GPIO Driver"
> + depends on OF && GPIOLIB
> + help
> + If your LCD enbling/disabling is controlled by a GPIO
> + and that you use the device tree for booting,
> + say y to enable the LCD GPIO driver.
> +
Instead of using GPIO maybe it would be better to use a regulator here?
That would be a universal solution.
Thanks.
---
More information about the linux-arm-kernel
mailing list