Skip to content

Commit 51c1e9b

Browse files
andy-shevgregkh
authored andcommitted
auxdisplay: Move panel.c to drivers/auxdisplay folder
It looks like panel.c belongs to auxdisplay subsystem. Move it to drivers/auxdisplay folder. No functional changes intended. Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6ef0c33 commit 51c1e9b

File tree

5 files changed

+281
-281
lines changed

5 files changed

+281
-281
lines changed

drivers/auxdisplay/Kconfig

Lines changed: 280 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,283 @@ config HT16K33
156156
LED controller driver with keyscan.
157157

158158
endif # AUXDISPLAY
159+
160+
config PANEL
161+
tristate "Parallel port LCD/Keypad Panel support"
162+
depends on PARPORT
163+
select CHARLCD
164+
---help---
165+
Say Y here if you have an HD44780 or KS-0074 LCD connected to your
166+
parallel port. This driver also features 4 and 6-key keypads. The LCD
167+
is accessible through the /dev/lcd char device (10, 156), and the
168+
keypad through /dev/keypad (10, 185). This code can either be
169+
compiled as a module, or linked into the kernel and started at boot.
170+
If you don't understand what all this is about, say N.
171+
172+
if PANEL
173+
174+
config PANEL_PARPORT
175+
int "Default parallel port number (0=LPT1)"
176+
range 0 255
177+
default "0"
178+
---help---
179+
This is the index of the parallel port the panel is connected to. One
180+
driver instance only supports one parallel port, so if your keypad
181+
and LCD are connected to two separate ports, you have to start two
182+
modules with different arguments. Numbering starts with '0' for LPT1,
183+
and so on.
184+
185+
config PANEL_PROFILE
186+
int "Default panel profile (0-5, 0=custom)"
187+
range 0 5
188+
default "5"
189+
---help---
190+
To ease configuration, the driver supports different configuration
191+
profiles for past and recent wirings. These profiles can also be
192+
used to define an approximative configuration, completed by a few
193+
other options. Here are the profiles :
194+
195+
0 = custom (see further)
196+
1 = 2x16 parallel LCD, old keypad
197+
2 = 2x16 serial LCD (KS-0074), new keypad
198+
3 = 2x16 parallel LCD (Hantronix), no keypad
199+
4 = 2x16 parallel LCD (Nexcom NSA1045) with Nexcom's keypad
200+
5 = 2x40 parallel LCD (old one), with old keypad
201+
202+
Custom configurations allow you to define how your display is
203+
wired to the parallel port, and how it works. This is only intended
204+
for experts.
205+
206+
config PANEL_KEYPAD
207+
depends on PANEL_PROFILE="0"
208+
int "Keypad type (0=none, 1=old 6 keys, 2=new 6 keys, 3=Nexcom 4 keys)"
209+
range 0 3
210+
default 0
211+
---help---
212+
This enables and configures a keypad connected to the parallel port.
213+
The keys will be read from character device 10,185. Valid values are :
214+
215+
0 : do not enable this driver
216+
1 : old 6 keys keypad
217+
2 : new 6 keys keypad, as used on the server at www.ant-computing.com
218+
3 : Nexcom NSA1045's 4 keys keypad
219+
220+
New profiles can be described in the driver source. The driver also
221+
supports simultaneous keys pressed when the keypad supports them.
222+
223+
config PANEL_LCD
224+
depends on PANEL_PROFILE="0"
225+
int "LCD type (0=none, 1=custom, 2=old //, 3=ks0074, 4=hantronix, 5=Nexcom)"
226+
range 0 5
227+
default 0
228+
---help---
229+
This enables and configures an LCD connected to the parallel port.
230+
The driver includes an interpreter for escape codes starting with
231+
'\e[L' which are specific to the LCD, and a few ANSI codes. The
232+
driver will be registered as character device 10,156, usually
233+
under the name '/dev/lcd'. There are a total of 6 supported types :
234+
235+
0 : do not enable the driver
236+
1 : custom configuration and wiring (see further)
237+
2 : 2x16 & 2x40 parallel LCD (old wiring)
238+
3 : 2x16 serial LCD (KS-0074 based)
239+
4 : 2x16 parallel LCD (Hantronix wiring)
240+
5 : 2x16 parallel LCD (Nexcom wiring)
241+
242+
When type '1' is specified, other options will appear to configure
243+
more precise aspects (wiring, dimensions, protocol, ...). Please note
244+
that those values changed from the 2.4 driver for better consistency.
245+
246+
config PANEL_LCD_HEIGHT
247+
depends on PANEL_PROFILE="0" && PANEL_LCD="1"
248+
int "Number of lines on the LCD (1-2)"
249+
range 1 2
250+
default 2
251+
---help---
252+
This is the number of visible character lines on the LCD in custom profile.
253+
It can either be 1 or 2.
254+
255+
config PANEL_LCD_WIDTH
256+
depends on PANEL_PROFILE="0" && PANEL_LCD="1"
257+
int "Number of characters per line on the LCD (1-40)"
258+
range 1 40
259+
default 40
260+
---help---
261+
This is the number of characters per line on the LCD in custom profile.
262+
Common values are 16,20,24,40.
263+
264+
config PANEL_LCD_BWIDTH
265+
depends on PANEL_PROFILE="0" && PANEL_LCD="1"
266+
int "Internal LCD line width (1-40, 40 by default)"
267+
range 1 40
268+
default 40
269+
---help---
270+
Most LCDs use a standard controller which supports hardware lines of 40
271+
characters, although sometimes only 16, 20 or 24 of them are really wired
272+
to the terminal. This results in some non-visible but addressable characters,
273+
and is the case for most parallel LCDs. Other LCDs, and some serial ones,
274+
however, use the same line width internally as what is visible. The KS0074
275+
for example, uses 16 characters per line for 16 visible characters per line.
276+
277+
This option lets you configure the value used by your LCD in 'custom' profile.
278+
If you don't know, put '40' here.
279+
280+
config PANEL_LCD_HWIDTH
281+
depends on PANEL_PROFILE="0" && PANEL_LCD="1"
282+
int "Hardware LCD line width (1-64, 64 by default)"
283+
range 1 64
284+
default 64
285+
---help---
286+
Most LCDs use a single address bit to differentiate line 0 and line 1. Since
287+
some of them need to be able to address 40 chars with the lower bits, they
288+
often use the immediately superior power of 2, which is 64, to address the
289+
next line.
290+
291+
If you don't know what your LCD uses, in doubt let 16 here for a 2x16, and
292+
64 here for a 2x40.
293+
294+
config PANEL_LCD_CHARSET
295+
depends on PANEL_PROFILE="0" && PANEL_LCD="1"
296+
int "LCD character set (0=normal, 1=KS0074)"
297+
range 0 1
298+
default 0
299+
---help---
300+
Some controllers such as the KS0074 use a somewhat strange character set
301+
where many symbols are at unusual places. The driver knows how to map
302+
'standard' ASCII characters to the character sets used by these controllers.
303+
Valid values are :
304+
305+
0 : normal (untranslated) character set
306+
1 : KS0074 character set
307+
308+
If you don't know, use the normal one (0).
309+
310+
config PANEL_LCD_PROTO
311+
depends on PANEL_PROFILE="0" && PANEL_LCD="1"
312+
int "LCD communication mode (0=parallel 8 bits, 1=serial)"
313+
range 0 1
314+
default 0
315+
---help---
316+
This driver now supports any serial or parallel LCD wired to a parallel
317+
port. But before assigning signals, the driver needs to know if it will
318+
be driving a serial LCD or a parallel one. Serial LCDs only use 2 wires
319+
(SDA/SCL), while parallel ones use 2 or 3 wires for the control signals
320+
(E, RS, sometimes RW), and 4 or 8 for the data. Use 0 here for a 8 bits
321+
parallel LCD, and 1 for a serial LCD.
322+
323+
config PANEL_LCD_PIN_E
324+
depends on PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO="0"
325+
int "Parallel port pin number & polarity connected to the LCD E signal (-17...17) "
326+
range -17 17
327+
default 14
328+
---help---
329+
This describes the number of the parallel port pin to which the LCD 'E'
330+
signal has been connected. It can be :
331+
332+
0 : no connection (eg: connected to ground)
333+
1..17 : directly connected to any of these pins on the DB25 plug
334+
-1..-17 : connected to the same pin through an inverter (eg: transistor).
335+
336+
Default for the 'E' pin in custom profile is '14' (AUTOFEED).
337+
338+
config PANEL_LCD_PIN_RS
339+
depends on PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO="0"
340+
int "Parallel port pin number & polarity connected to the LCD RS signal (-17...17) "
341+
range -17 17
342+
default 17
343+
---help---
344+
This describes the number of the parallel port pin to which the LCD 'RS'
345+
signal has been connected. It can be :
346+
347+
0 : no connection (eg: connected to ground)
348+
1..17 : directly connected to any of these pins on the DB25 plug
349+
-1..-17 : connected to the same pin through an inverter (eg: transistor).
350+
351+
Default for the 'RS' pin in custom profile is '17' (SELECT IN).
352+
353+
config PANEL_LCD_PIN_RW
354+
depends on PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO="0"
355+
int "Parallel port pin number & polarity connected to the LCD RW signal (-17...17) "
356+
range -17 17
357+
default 16
358+
---help---
359+
This describes the number of the parallel port pin to which the LCD 'RW'
360+
signal has been connected. It can be :
361+
362+
0 : no connection (eg: connected to ground)
363+
1..17 : directly connected to any of these pins on the DB25 plug
364+
-1..-17 : connected to the same pin through an inverter (eg: transistor).
365+
366+
Default for the 'RW' pin in custom profile is '16' (INIT).
367+
368+
config PANEL_LCD_PIN_SCL
369+
depends on PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO!="0"
370+
int "Parallel port pin number & polarity connected to the LCD SCL signal (-17...17) "
371+
range -17 17
372+
default 1
373+
---help---
374+
This describes the number of the parallel port pin to which the serial
375+
LCD 'SCL' signal has been connected. It can be :
376+
377+
0 : no connection (eg: connected to ground)
378+
1..17 : directly connected to any of these pins on the DB25 plug
379+
-1..-17 : connected to the same pin through an inverter (eg: transistor).
380+
381+
Default for the 'SCL' pin in custom profile is '1' (STROBE).
382+
383+
config PANEL_LCD_PIN_SDA
384+
depends on PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO!="0"
385+
int "Parallel port pin number & polarity connected to the LCD SDA signal (-17...17) "
386+
range -17 17
387+
default 2
388+
---help---
389+
This describes the number of the parallel port pin to which the serial
390+
LCD 'SDA' signal has been connected. It can be :
391+
392+
0 : no connection (eg: connected to ground)
393+
1..17 : directly connected to any of these pins on the DB25 plug
394+
-1..-17 : connected to the same pin through an inverter (eg: transistor).
395+
396+
Default for the 'SDA' pin in custom profile is '2' (D0).
397+
398+
config PANEL_LCD_PIN_BL
399+
depends on PANEL_PROFILE="0" && PANEL_LCD="1"
400+
int "Parallel port pin number & polarity connected to the LCD backlight signal (-17...17) "
401+
range -17 17
402+
default 0
403+
---help---
404+
This describes the number of the parallel port pin to which the LCD 'BL' signal
405+
has been connected. It can be :
406+
407+
0 : no connection (eg: connected to ground)
408+
1..17 : directly connected to any of these pins on the DB25 plug
409+
-1..-17 : connected to the same pin through an inverter (eg: transistor).
410+
411+
Default for the 'BL' pin in custom profile is '0' (uncontrolled).
412+
413+
config PANEL_CHANGE_MESSAGE
414+
bool "Change LCD initialization message ?"
415+
default "n"
416+
---help---
417+
This allows you to replace the boot message indicating the kernel version
418+
and the driver version with a custom message. This is useful on appliances
419+
where a simple 'Starting system' message can be enough to stop a customer
420+
from worrying.
421+
422+
If you say 'Y' here, you'll be able to choose a message yourself. Otherwise,
423+
say 'N' and keep the default message with the version.
424+
425+
config PANEL_BOOT_MESSAGE
426+
depends on PANEL_CHANGE_MESSAGE="y"
427+
string "New initialization message"
428+
default ""
429+
---help---
430+
This allows you to replace the boot message indicating the kernel version
431+
and the driver version with a custom message. This is useful on appliances
432+
where a simple 'Starting system' message can be enough to stop a customer
433+
from worrying.
434+
435+
An empty message will only clear the display at driver init time. Any other
436+
printf()-formatted message is valid with newline and escape codes.
437+
438+
endif # PANEL

drivers/auxdisplay/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ obj-$(CONFIG_CFAG12864B) += cfag12864b.o cfag12864bfb.o
88
obj-$(CONFIG_IMG_ASCII_LCD) += img-ascii-lcd.o
99
obj-$(CONFIG_HD44780) += hd44780.o
1010
obj-$(CONFIG_HT16K33) += ht16k33.o
11+
obj-$(CONFIG_PANEL) += panel.o
File renamed without changes.

0 commit comments

Comments
 (0)