Commit 32912042 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'auxdisplay-for-linus-v5.3-rc5' of git://github.com/ojeda/linux

Pull auxdisplay fixes from Miguel Ojeda:
 "A few minor auxdisplay improvements:

   - A couple of small header cleanups for charlcd (Masahiro Yamada)

   - A trivial typo fix for the examples of cfag12864b (Masahiro Yamada)

   - An Kconfig help text improvement for charlcd (Mans Rullgard)

   - An error path fix for panel (zhengbin)"

* tag 'auxdisplay-for-linus-v5.3-rc5' of git://github.com/ojeda/linux:
  auxdisplay: Fix a typo in cfag12864b-example.c
  auxdisplay: charlcd: add include guard to charlcd.h
  auxdisplay: charlcd: move charlcd.h to drivers/auxdisplay
  auxdisplay: charlcd: add help text for backlight initial state
  auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach
parents 2b245b8b 6c4d6bc5
...@@ -448,6 +448,11 @@ config PANEL_BOOT_MESSAGE ...@@ -448,6 +448,11 @@ config PANEL_BOOT_MESSAGE
choice choice
prompt "Backlight initial state" prompt "Backlight initial state"
default CHARLCD_BL_FLASH default CHARLCD_BL_FLASH
---help---
Select the initial backlight state on boot or module load.
Previously, there was no option for this: the backlight flashed
briefly on init. Now you can also turn it off/on.
config CHARLCD_BL_OFF config CHARLCD_BL_OFF
bool "Off" bool "Off"
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <generated/utsrelease.h> #include <generated/utsrelease.h>
#include <misc/charlcd.h> #include "charlcd.h"
#define LCD_MINOR 156 #define LCD_MINOR 156
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
* Copyright (C) 2016-2017 Glider bvba * Copyright (C) 2016-2017 Glider bvba
*/ */
#ifndef _CHARLCD_H
#define _CHARLCD_H
struct charlcd { struct charlcd {
const struct charlcd_ops *ops; const struct charlcd_ops *ops;
const unsigned char *char_conv; /* Optional */ const unsigned char *char_conv; /* Optional */
...@@ -37,3 +40,5 @@ int charlcd_register(struct charlcd *lcd); ...@@ -37,3 +40,5 @@ int charlcd_register(struct charlcd *lcd);
int charlcd_unregister(struct charlcd *lcd); int charlcd_unregister(struct charlcd *lcd);
void charlcd_poke(struct charlcd *lcd); void charlcd_poke(struct charlcd *lcd);
#endif /* CHARLCD_H */
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
#include <linux/property.h> #include <linux/property.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <misc/charlcd.h> #include "charlcd.h"
enum hd44780_pin { enum hd44780_pin {
/* Order does matter due to writing to GPIO array subsets! */ /* Order does matter due to writing to GPIO array subsets! */
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <misc/charlcd.h> #include "charlcd.h"
#define KEYPAD_MINOR 185 #define KEYPAD_MINOR 185
...@@ -1617,6 +1617,8 @@ static void panel_attach(struct parport *port) ...@@ -1617,6 +1617,8 @@ static void panel_attach(struct parport *port)
return; return;
err_lcd_unreg: err_lcd_unreg:
if (scan_timer.function)
del_timer_sync(&scan_timer);
if (lcd.enabled) if (lcd.enabled)
charlcd_unregister(lcd.charlcd); charlcd_unregister(lcd.charlcd);
err_unreg_device: err_unreg_device:
......
...@@ -245,7 +245,7 @@ int main(int argc, char *argv[]) ...@@ -245,7 +245,7 @@ int main(int argc, char *argv[])
if (argc != 2) { if (argc != 2) {
printf( printf(
"Sintax: %s fbdev\n" "Syntax: %s fbdev\n"
"Usually: /dev/fb0, /dev/fb1...\n", argv[0]); "Usually: /dev/fb0, /dev/fb1...\n", argv[0]);
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment