Skip to contentSkip to conversation

LCD Display Driver lcddisplay, ks0108, cfag12864b

PATCH In review Miguel Ojeda Sandonis 2 participants 3 messages Sep 12, 2006 – Sep 13, 2006

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 LCD Display Driver lcddisplay, ks0108, cfag12864b

Miguel Ojeda Sandonis

Adds support for LCD Display devices.
Adds support for the ks0108 LCD Controller.
Adds support for the cfag12864b LCD Display.

---

CREDITS +8 -0
diff -uprN -X linux-2.6.17.13/Documentation/dontdiff linux-2.6.17.13-vanilla/CREDITS linux-2.6.17.13/CREDITS
@@ -2534,6 +2534,14 @@ S: Subiaco, 6008
 S: Perth, Western Australia
 S: Australia
 
+N: Miguel Ojeda Sandonis
+E: [email protected]
+D: Author: LCD Display Drivers (ks0108, cfag12864b)
+D: Maintainer: LCD Display Drivers Tree (drivers/lcddisplay/*)
+S: C/ Mieses 20, 9-B
+S: Valladolid 47009
+S: Spain
+
 N: Greg Page
 E: [email protected]
 D: IPX development and support
Documentation/drivers/lcddisplay/cfag12864b +368 -0

368 lines not on this page · raw message

Documentation/drivers/lcddisplay/lcddisplay +37 -0
diff -uprN -X linux-2.6.17.13/Documentation/dontdiff linux-2.6.17.13-vanilla/Documentation/drivers/lcddisplay/lcddisplay linux-2.6.17.13/Documentation/drivers/lcddisplay/lcddisplay
@@ -0,0 +1,37 @@
+	=================================
+	LCD Display Drivers Documentation
+	=================================
+
+License:		GPL
+Author & Maintainer:	Miguel Ojeda Sandonis <[email protected]>
+Date:			2006-09-12
+
+--------
+0. INDEX
+--------
+
+	1. NEW DISPLAY DRIVERS
+	2. GENERAL TIPS
+
+
+
+----------------------
+1. NEW DISPLAY DRIVERS
+----------------------
+
+Feel free to send me new display drivers. I will try to do my best.
+
+If you don't get any answer, send your patch directly to the linux-kernel ml.
+
+
+
+---------------
+2. GENERAL TIPS
+---------------
+
+- Divide your driver into the controller driver, like ks0108,
+  and the specific LCD display series driver, like cfag12864b.
+
+- Claim for your IO ports in the controller driver.
+
+EOF
Documentation/ioctl-number.txt +2 -0
diff -uprN -X linux-2.6.17.13/Documentation/dontdiff linux-2.6.17.13-vanilla/Documentation/ioctl-number.txt linux-2.6.17.13/Documentation/ioctl-number.txt
@@ -190,3 +190,5 @@ Code	Seq#	Include File		Comments
 					<mailto:[email protected]>
 0xF3	00-3F	video/sisfb.h		sisfb (in development)
 					<mailto:[email protected]>
+0xFF	00-1F	cfag12864b LCD Display	linux/cfag12864b.h
+					<mailto:[email protected]>
drivers/Kconfig +4 -0
diff -uprN -X linux-2.6.17.13/Documentation/dontdiff linux-2.6.17.13-vanilla/drivers/Kconfig linux-2.6.17.13/drivers/Kconfig
@@ -72,4 +72,8 @@ source "drivers/edac/Kconfig"
 
 source "drivers/rtc/Kconfig"
 
+# parport before lcddisplay - some displays depend on it.
+
+source "drivers/lcddisplay/Kconfig"
+
 endmenu
drivers/lcddisplay/cfag12864b.c +558 -0

558 lines not on this page · raw message

drivers/lcddisplay/Kconfig +61 -0

61 lines not on this page · raw message

drivers/lcddisplay/ks0108.c +175 -0

175 lines not on this page · raw message

drivers/lcddisplay/lcddisplay.c +71 -0

71 lines not on this page · raw message

drivers/lcddisplay/Makefile +7 -0
diff -uprN -X linux-2.6.17.13/Documentation/dontdiff linux-2.6.17.13-vanilla/drivers/lcddisplay/Makefile linux-2.6.17.13/drivers/lcddisplay/Makefile
@@ -0,0 +1,7 @@
+#
+# Makefile for the kernel LCD Display device drivers.
+#
+
+obj-$(CONFIG_LCDDISPLAY)	+= lcddisplay.o
+obj-$(CONFIG_KS0108)		+= ks0108.o
+obj-$(CONFIG_CFAG12864B)	+= cfag12864b.o
drivers/Makefile +1 -0
diff -uprN -X linux-2.6.17.13/Documentation/dontdiff linux-2.6.17.13-vanilla/drivers/Makefile linux-2.6.17.13/drivers/Makefile
@@ -74,3 +74,4 @@ obj-$(CONFIG_SGI_SN)		+= sn/
 obj-y				+= firmware/
 obj-$(CONFIG_CRYPTO)		+= crypto/
 obj-$(CONFIG_SUPERH)		+= sh/
+obj-$(CONFIG_LCDDISPLAY)	+= lcddisplay/
include/linux/cfag12864b.h +45 -0

45 lines not on this page · raw message

include/linux/ks0108.h +21 -0
diff -uprN -X linux-2.6.17.13/Documentation/dontdiff linux-2.6.17.13-vanilla/include/linux/ks0108.h linux-2.6.17.13/include/linux/ks0108.h
@@ -0,0 +1,21 @@
+/*
+ *    Filename: ks0108.h
+ *     Version: 0.1.0
+ * Description: ks0108 LCD Display Controller Driver Header
+ *     License: GPL
+ *
+ *      Author: Miguel Ojeda Sandonis <[email protected]>
+ *        Date: 2006-09-12
+ */
+
+#ifndef _KS0108_H_
+#define _KS0108_H_
+
+extern void ks0108_writedata(unsigned char byte);
+extern void ks0108_writecontrol(unsigned char byte);
+extern void ks0108_displaystate(unsigned char state);
+extern void ks0108_startline(unsigned char startline);
+extern void ks0108_address(unsigned char address);
+extern void ks0108_page(unsigned char page);
+
+#endif /* _KS0108_H_ */
include/linux/lcddisplay.h +19 -0
diff -uprN -X linux-2.6.17.13/Documentation/dontdiff linux-2.6.17.13-vanilla/include/linux/lcddisplay.h linux-2.6.17.13/include/linux/lcddisplay.h
@@ -0,0 +1,19 @@
+/*
+ *    Filename: lcddisplay.h
+ *     Version: 0.1.0
+ * Description: Display Class Header
+ *     License: GPL
+ *
+ *      Author: Miguel Ojeda Sandonis <[email protected]>
+ *        Date: 2006-09-12
+ */
+
+#ifndef _LCDDISPLAY_H_
+#define _LCDDISPLAY_H_
+
+#include <linux/device.h>
+
+extern struct class * lcddisplay_class;
+
+#endif /* _LCDDISPLAY_H_ */
+
MAINTAINERS +5 -0
diff -uprN -X linux-2.6.17.13/Documentation/dontdiff linux-2.6.17.13-vanilla/MAINTAINERS linux-2.6.17.13/MAINTAINERS
@@ -1640,6 +1640,11 @@ M:	[email protected]
 L:	[email protected]
 S:	Maintained
 
+LCD DISPLAY DRIVERS
+P:	Miguel Ojeda Sandonis
+M:	[email protected]
+S:	Maintained
+
 LED SUBSYSTEM
 P:	Richard Purdie
 M:	[email protected]
#1 lore raw

I think there would be a case for splitting the lcd drivers into two layers, one to deal with the hardware talking to an lcd device (such as an parallel port) and the second to deal with the command sequences being sent.

For instance, we have two boards based on ARM which use a CPLD to decode CS1 and CS2, etc. This would mean re-writing your driver (and anyone elses) depending on what sort of LCD we would like to connect to these.

If there was an generic device driver, then you could export the writing of bytes to user-space and have them use the hardware to do any protocol they liked.

Signature · 3 lines
Ben ([email protected], http://www.fluff.org/)

  'a smiley only costs 4 bytes'
#2 lore raw

Please reply in the last patch version, subject:

[PATCH 2/2] drivers: LCD Display support.

Quoted 6 lines · Ben Dooks

I think there would be a case for splitting the lcd drivers into two layers, one to deal with the hardware talking to an lcd device (such as an parallel port) and the second to deal with the command sequences being sent.

It is divided already in two layers:

ks0108.c -> It is the driver for a LCD controller. It deals with the hardware (not directly, it uses parport module). It exports the functions defined for such controller to other modules.

cfag12864b.c -> It is a LCD driver, depends on ks0108. This is the driver that tells what and how to write.

Quoted 6 lines

For instance, we have two boards based on ARM which use a CPLD to decode CS1 and CS2, etc. This would mean re-writing your driver (and anyone elses) depending on what sort of LCD we would like to connect to these.

I don't think so. The ks0108 controller driver was built to control the LCD using the parallel port and a specific wiring.

If you want to use your boards, write a driver for them. What is the problem.

(Please tell me if I misunderstood you)

Quoted 5 lines

If there was an generic device driver, then you could export the writing of bytes to user-space and have them use the hardware to do any protocol they liked.

A generic driver for what? There are many different ports/wirings, different LCDs displays, different LCD controllers, different protocols...

I didn't understand what do you mean.