RE: [PATCH] backlight: lcd: add driver for raster-type lcd's with gpiocontrolled panel reset
From: Jingoo Han
Date: Thu Jan 05 2012 - 21:16:09 EST
Hi, Thomas.
> -----Original Message-----
> From: Thomas Abraham [mailto:thomas.abraham@xxxxxxxxxx]
> Sent: Friday, January 06, 2012 12:42 AM
> Subject: [PATCH] backlight: lcd: add driver for raster-type lcd's with gpio controlled panel reset
>
> Add a lcd panel driver for simple raster-type lcd's which uses a gpio
> controlled panel reset. The driver controls the nRESET line of the panel
> using a gpio connected from the host system. The Vcc supply to the panel
> is (optionally) controlled using a voltage regulator. This driver excludes
> support for lcd panels that use a serial command interface or direct
> memory mapped IO interface.
>
> Suggested-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
> Signed-off-by: Thomas Abraham <thomas.abraham@xxxxxxxxxx>
> ---
> .../devicetree/bindings/lcd/lcd-pwrctrl.txt | 39 ++++
> drivers/video/backlight/Kconfig | 7 +
> drivers/video/backlight/Makefile | 1 +
> drivers/video/backlight/lcd_pwrctrl.c | 231 ++++++++++++++++++++
> include/video/lcd_pwrctrl.h | 30 +++
> 5 files changed, 308 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/lcd/lcd-pwrctrl.txt
> create mode 100644 drivers/video/backlight/lcd_pwrctrl.c
> create mode 100644 include/video/lcd_pwrctrl.h
>
> [...]
> --- a/drivers/video/backlight/Makefile
> +++ b/drivers/video/backlight/Makefile
> @@ -8,6 +8,7 @@ obj-$(CONFIG_LCD_LMS283GF05) += lms283gf05.o
> obj-$(CONFIG_LCD_LTV350QV) += ltv350qv.o
> obj-$(CONFIG_LCD_ILI9320) += ili9320.o
> obj-$(CONFIG_LCD_PLATFORM) += platform_lcd.o
> +obj-$(CONFIG_LCD_PWRCTRL) += lcd_pwrctrl.o
Can you remove unnecessary space?
Please use <tab><space><space><space> instead of <space><tab><space><space><space>
between PWRCTRL) and += lcd_.
> [...]
> +static struct platform_driver lcd_pwrctrl_driver = {
> + .driver = {
> + .name = "lcd-pwrctrl",
> + .owner = THIS_MODULE,
> + .of_match_table = of_match_ptr(lcd_pwrctrl_match),
> + },
> + .probe = lcd_pwrctrl_probe,
> + .remove = lcd_pwrctrl_remove,
> + .suspend = lcd_pwrctrl_suspend,
> + .resume = lcd_pwrctrl_resume,
Please use 'struct dev_pm_ops'.
> +};
> +
> +static int __init lcd_pwrctrl_init(void)
> +{
> + return platform_driver_register(&lcd_pwrctrl_driver);
> +}
> +
> +static void __exit lcd_pwrctrl_cleanup(void)
> +{
> + platform_driver_unregister(&lcd_pwrctrl_driver);
> +}
> +
> +module_init(lcd_pwrctrl_init);
> +module_exit(lcd_pwrctrl_cleanup);
Use module_platform_driver(lcd_pwrctrl_driver).
It can make the code simpler.
> [...]
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/