Staging: add lcd-panel driver
[firefly-linux-kernel-4.4.55.git] / drivers / staging / panel / Kconfig
1 config PANEL
2         tristate "Parallel port LCD/Keypad Panel support"
3         depends on PARPORT
4         ---help---
5           Say Y here if you have an HD44780 or KS-0074 LCD connected to your
6           parallel port. This driver also features 4 and 6-key keypads, and a
7           'smartcard' reader. The LCD is accessible through the /dev/lcd char
8           device (10, 156), the keypad through /dev/keypad (10, 185), and the
9           smartcard through /dev/smartcard (10, 186). Both require misc device
10           to be enabled. This code can either be compiled as a module, or linked
11           into the kernel and started at boot. If you don't understand what all
12           this is about, say N.
13
14 config PANEL_PARPORT
15         int "Default parallel port number (0=LPT1)"
16         depends on PANEL
17         range 0 255
18         default "0"
19         ---help---
20           This is the index of the parallel port the panel is connected to. One
21           driver instance only supports one parallel port, so if your keypad
22           and LCD are connected to two separate ports, you have to start two
23           modules with different arguments. Numbering starts with '0' for LPT1,
24           and so on.
25
26 config PANEL_PROFILE
27         int "Default panel profile (0-5, 0=custom)"
28         depends on PANEL
29         range 0 5
30         default "5"
31         ---help---
32           To ease configuration, the driver supports different configuration
33           profiles for past and recent wirings. These profiles can also be
34           used to define an approximative configuration, completed by a few
35           other options. Here are the profiles :
36
37             0 = custom (see further)
38             1 = 2x16 parallel LCD, old keypad
39             2 = 2x16 serial LCD (KS-0074), new keypad
40             3 = 2x16 parallel LCD (Hantronix), no keypad
41             4 = 2x16 parallel LCD (Nexcom NSA1045) with Nexcom's keypad
42             5 = 2x40 parallel LCD (old one), with old keypad
43
44           Custom configurations allow you to define how your display is
45           wired to the parallel port, and how it works. This is only intended
46           for experts.
47
48 config PANEL_SMARTCARD
49         depends on PANEL && PANEL_PROFILE="0"
50         bool "Enable smartcard reader (read help!)"
51         default "n"
52         ---help---
53           This enables the 'smartcard' reader as installed on the server at
54           'www.ant-computing.com'. It was not really a smartcard reader, just
55           a telephone-card reader. It is left here for demonstration and
56           experimentation. If you enable this driver, it will be accessible
57           through character device 10,186.
58
59 config PANEL_KEYPAD
60         depends on PANEL && PANEL_PROFILE="0"
61         int "Keypad type (0=none, 1=old 6 keys, 2=new 6 keys, 3=Nexcom 4 keys)"
62         range 0 4
63         default 0
64         ---help---
65           This enables and configures a keypad connected to the parallel port.
66           The keys will be read from character device 10,185. Valid values are :
67
68             0 : do not enable this driver
69             1 : old 6 keys keypad
70             2 : new 6 keys keypad, as used on the server at www.ant-computing.com
71             3 : Nexcom NSA1045's 4 keys keypad
72
73           New profiles can be described in the driver source. The driver also
74           supports simultaneous keys pressed when the keypad supports them.
75
76 config PANEL_LCD
77         depends on PANEL && PANEL_PROFILE="0"
78         int "LCD type (0=none, 1=custom, 2=old //, 3=ks0074, 4=hantronix, 5=Nexcom)"
79         range 0 5
80         default 0
81         ---help---
82            This enables and configures an LCD connected to the parallel port.
83            The driver includes an interpreter for escape codes starting with
84            '\e[L' which are specific to the LCD, and a few ANSI codes. The
85            driver will be registered as character device 10,156, usually
86            under the name '/dev/lcd'. There are a total of 6 supported types :
87
88              0 : do not enable the driver
89              1 : custom configuration and wiring (see further)
90              2 : 2x16 & 2x40 parallel LCD (old wiring)
91              3 : 2x16 serial LCD (KS-0074 based)
92              4 : 2x16 parallel LCD (Hantronix wiring)
93              5 : 2x16 parallel LCD (Nexcom wiring)
94
95            When type '1' is specified, other options will appear to configure
96            more precise aspects (wiring, dimensions, protocol, ...). Please note
97            that those values changed from the 2.4 driver for better consistency.
98
99 config PANEL_LCD_HEIGHT
100         depends on PANEL && PANEL_PROFILE="0" && PANEL_LCD="1"
101         int "Number of lines on the LCD (1-2)"
102         range 1 2
103         default 2
104         ---help---
105           This is the number of visible character lines on the LCD in custom profile.
106           It can either be 1 or 2.
107
108 config PANEL_LCD_WIDTH
109         depends on PANEL && PANEL_PROFILE="0" && PANEL_LCD="1"
110         int "Number of characters per line on the LCD (1-40)"
111         range 1 40
112         default 40
113         ---help---
114           This is the number of characters per line on the LCD in custom profile.
115           Common values are 16,20,24,40.
116
117 config PANEL_LCD_BWIDTH
118         depends on PANEL && PANEL_PROFILE="0" && PANEL_LCD="1"
119         int "Internal LCD line width (1-40, 40 by default)"
120         range 1 40
121         default 40
122         ---help---
123           Most LCDs use a standard controller which supports hardware lines of 40
124           characters, although sometimes only 16, 20 or 24 of them are really wired
125           to the terminal. This results in some non-visible but adressable characters,
126           and is the case for most parallel LCDs. Other LCDs, and some serial ones,
127           however, use the same line width internally as what is visible. The KS0074
128           for example, uses 16 characters per line for 16 visible characters per line.
129
130           This option lets you configure the value used by your LCD in 'custom' profile.
131           If you don't know, put '40' here.
132
133 config PANEL_LCD_HWIDTH
134         depends on PANEL && PANEL_PROFILE="0" && PANEL_LCD="1"
135         int "Hardware LCD line width (1-64, 64 by default)"
136         range 1 64
137         default 64
138         ---help---
139           Most LCDs use a single address bit to differentiate line 0 and line 1. Since
140           some of them need to be able to address 40 chars with the lower bits, they
141           often use the immediately superior power of 2, which is 64, to address the
142           next line.
143
144           If you don't know what your LCD uses, in doubt let 16 here for a 2x16, and
145           64 here for a 2x40.
146
147 config PANEL_LCD_CHARSET
148         depends on PANEL && PANEL_PROFILE="0" && PANEL_LCD="1"
149         int "LCD character set (0=normal, 1=KS0074)"
150         range 0 1
151         default 0
152         ---help---
153           Some controllers such as the KS0074 use a somewhat strange character set
154           where many symbols are at unusual places. The driver knows how to map
155           'standard' ASCII characters to the character sets used by these controllers.
156           Valid values are :
157
158              0 : normal (untranslated) character set
159              1 : KS0074 character set
160
161           If you don't know, use the normal one (0).
162
163 config PANEL_LCD_PROTO
164         depends on PANEL && PANEL_PROFILE="0" && PANEL_LCD="1"
165         int "LCD communication mode (0=parallel 8 bits, 1=serial)"
166         range 0 1
167         default 0
168         ---help---
169           This driver now supports any serial or parallel LCD wired to a parallel
170           port. But before assigning signals, the driver needs to know if it will
171           be driving a serial LCD or a parallel one. Serial LCDs only use 2 wires
172           (SDA/SCL), while parallel ones use 2 or 3 wires for the control signals
173           (E, RS, sometimes RW), and 4 or 8 for the data. Use 0 here for a 8 bits
174           parallel LCD, and 1 for a serial LCD.
175
176 config PANEL_LCD_PIN_E
177         depends on PANEL && PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO="0"
178         int "Parallel port pin number & polarity connected to the LCD E signal (-17...17) "
179         range -17 17
180         default 14
181         ---help---
182           This describes the number of the parallel port pin to which the LCD 'E'
183           signal has been connected. It can be :
184
185                   0 : no connection (eg: connected to ground)
186               1..17 : directly connected to any of these pins on the DB25 plug
187             -1..-17 : connected to the same pin through an inverter (eg: transistor).
188
189           Default for the 'E' pin in custom profile is '14' (AUTOFEED).
190
191 config PANEL_LCD_PIN_RS
192         depends on PANEL && PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO="0"
193         int "Parallel port pin number & polarity connected to the LCD RS signal (-17...17) "
194         range -17 17
195         default 17
196         ---help---
197           This describes the number of the parallel port pin to which the LCD 'RS'
198           signal has been connected. It can be :
199
200                   0 : no connection (eg: connected to ground)
201               1..17 : directly connected to any of these pins on the DB25 plug
202             -1..-17 : connected to the same pin through an inverter (eg: transistor).
203
204           Default for the 'RS' pin in custom profile is '17' (SELECT IN).
205
206 config PANEL_LCD_PIN_RW
207         depends on PANEL && PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO="0"
208         int "Parallel port pin number & polarity connected to the LCD RW signal (-17...17) "
209         range -17 17
210         default 16
211         ---help---
212           This describes the number of the parallel port pin to which the LCD 'RW'
213           signal has been connected. It can be :
214
215                   0 : no connection (eg: connected to ground)
216               1..17 : directly connected to any of these pins on the DB25 plug
217             -1..-17 : connected to the same pin through an inverter (eg: transistor).
218
219           Default for the 'RW' pin in custom profile is '16' (INIT).
220
221 config PANEL_LCD_PIN_SCL
222         depends on PANEL && PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO!="0"
223         int "Parallel port pin number & polarity connected to the LCD SCL signal (-17...17) "
224         range -17 17
225         default 1
226         ---help---
227           This describes the number of the parallel port pin to which the serial
228           LCD 'SCL' signal has been connected. It can be :
229
230                   0 : no connection (eg: connected to ground)
231               1..17 : directly connected to any of these pins on the DB25 plug
232             -1..-17 : connected to the same pin through an inverter (eg: transistor).
233
234           Default for the 'SCL' pin in custom profile is '1' (STROBE).
235
236 config PANEL_LCD_PIN_SDA
237         depends on PANEL && PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO!="0"
238         int "Parallel port pin number & polarity connected to the LCD SDA signal (-17...17) "
239         range -17 17
240         default 2
241         ---help---
242           This describes the number of the parallel port pin to which the serial
243           LCD 'SDA' signal has been connected. It can be :
244
245                   0 : no connection (eg: connected to ground)
246               1..17 : directly connected to any of these pins on the DB25 plug
247             -1..-17 : connected to the same pin through an inverter (eg: transistor).
248
249           Default for the 'SDA' pin in custom profile is '2' (D0).
250
251 config PANEL_LCD_PIN_BL
252         depends on PANEL && PANEL_PROFILE="0" && PANEL_LCD="1"
253         int "Parallel port pin number & polarity connected to the LCD backlight signal (-17...17) "
254         range -17 17
255         default 0
256         ---help---
257           This describes the number of the parallel port pin to which the LCD 'BL' signal
258           has been connected. It can be :
259
260                   0 : no connection (eg: connected to ground)
261               1..17 : directly connected to any of these pins on the DB25 plug
262             -1..-17 : connected to the same pin through an inverter (eg: transistor).
263
264           Default for the 'BL' pin in custom profile is '0' (uncontrolled).
265
266 config PANEL_CHANGE_MESSAGE
267         depends on PANEL
268         bool "Change LCD initialization message ?"
269         default "n"
270         ---help---
271           This allows you to replace the boot message indicating the kernel version
272           and the driver version with a custom message. This is useful on appliances
273           where a simple 'Starting system' message can be enough to stop a customer
274           from worrying.
275
276           If you say 'Y' here, you'll be able to choose a message yourself. Otherwise,
277           say 'N' and keep the default message with the version.
278
279 config PANEL_BOOT_MESSAGE
280         depends on PANEL && PANEL_CHANGE_MESSAGE="y"
281         string "New initialization message"
282         default ""
283         ---help---
284           This allows you to replace the boot message indicating the kernel version
285           and the driver version with a custom message. This is useful on appliances
286           where a simple 'Starting system' message can be enough to stop a customer
287           from worrying.
288
289           An empty message will only clear the display at driver init time. Any other
290           printf()-formatted message is valid with newline and escape codes.