Signed-off-by: Claudio Nieder <private@claudio.ch>
---
drivers/video/backlight/Kconfig | 7 +
drivers/video/backlight/Makefile | 1 +
drivers/video/backlight/kb3886_bl.c | 218 +++++++++++++++++++++++++++++++++++
3 files changed, 226 insertions(+), 0 deletions(-)
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index 452b770..bc65541 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -164,3 +164,10 @@ config BACKLIGHT_MBP_NVIDIA
If you have an Apple Macbook Pro with Nvidia graphics hardware say Y
to enable a driver for its backlight
+config BACKLIGHT_SAHARA
+ tristate "Tabletkiosk Sahara Touch-iT Backlight Driver"
+ depends on BACKLIGHT_CLASS_DEVICE && X86
+ default y
+ help
+ If you have a Tabletkiosk Sahara Touch-iT, say y to enable the
+ backlight driver.
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
index b405aac..f4a1183 100644
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -16,4 +16,5 @@ obj-$(CONFIG_BACKLIGHT_PROGEAR) += progear_bl.o
obj-$(CONFIG_BACKLIGHT_CARILLO_RANCH) += cr_bllcd.o
obj-$(CONFIG_BACKLIGHT_PWM) += pwm_bl.o
obj-$(CONFIG_BACKLIGHT_MBP_NVIDIA) += mbp_nvidia_bl.o
+obj-$(CONFIG_BACKLIGHT_SAHARA) += kb3886_bl.o
diff --git a/drivers/video/backlight/kb3886_bl.c
b/drivers/video/backlight/kb3886_bl.c
new file mode 100644
index 0000000..1d86de3
--- /dev/null
+++ b/drivers/video/backlight/kb3886_bl.c
@@ -0,0 +1,218 @@
+/*
+ * Backlight Driver for the KB3886 Backlight
+ *
+ * Copyright (c) 2007 Claudio Nieder
+ *
+ * Based on corgi_bl.c by Richard Purdie and kb3886 driver by Robert Woerle
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include ...thank you for the remark. I have changed the mdelay to msleep in my
patch, reapplied it to the current Linus tree, built a kernel, installed
it on my computer and tested it. It works perfectly as you surely
expected. The corrected patch is included here.
BTW: I have noticed that some other drivers in video/backlight still use
mdelay: ili9320.c, locomolcd.c and vgg2432a4.c.
claudio
Signed-off-by: Claudio Nieder <private@claudio.ch>
---
drivers/video/backlight/Kconfig | 7 +
drivers/video/backlight/Makefile | 1 +
drivers/video/backlight/kb3886_bl.c | 218 +++++++++++++++++++++++++++++++++++
3 files changed, 226 insertions(+), 0 deletions(-)
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index 452b770..bc65541 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -164,3 +164,10 @@ config BACKLIGHT_MBP_NVIDIA
If you have an Apple Macbook Pro with Nvidia graphics hardware say Y
to enable a driver for its backlight
+config BACKLIGHT_SAHARA
+ tristate "Tabletkiosk Sahara Touch-iT Backlight Driver"
+ depends on BACKLIGHT_CLASS_DEVICE && X86
+ default y
+ help
+ If you have a Tabletkiosk Sahara Touch-iT, say y to enable the
+ backlight driver.
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
index b405aac..f4a1183 100644
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -16,4 +16,5 @@ obj-$(CONFIG_BACKLIGHT_PROGEAR) += progear_bl.o
obj-$(CONFIG_BACKLIGHT_CARILLO_RANCH) += cr_bllcd.o
obj-$(CONFIG_BACKLIGHT_PWM) += pwm_bl.o
obj-$(CONFIG_BACKLIGHT_MBP_NVIDIA) += mbp_nvidia_bl.o
+obj-$(CONFIG_BACKLIGHT_SAHARA) += kb3886_bl.o
diff --git a/drivers/video/backlight/kb3886_bl.c
b/drivers/video/backlight/kb3886_bl.c
new file mode 100644
index 0000000..60eec06
--- /dev/null
+++ b/drivers/video/backlight/kb3886_bl.c
@@ -0,0 +1,218 @@
+/*
+ * Backlight Driver for the KB3886 Backlight
+ *
+ * Copyright (c) ...Poking at random ports isn't very nice. Is it possible to autodetect this t= ablet PC ? This function is unused. Looks like you copied it from corgi_bl.c where --=20 Andrey Panin | Linux and UNIX system administrator pazke@donpac.ru | PGP key: wwwkeys.pgp.net
I didn't find anthing with lspci but can detect through DMI - if you are interested you find the dmidecode output at the end of http://claudio.ch/Bin/viewcvs.cgi/Config/sysinfo_touchIt213?rev=294 - and do it in a similar way as in mbp_nvidia_bl.c. Have done it in the included patch. Looking at the macbook driver I see it is much simpler and shorter than mine which I derived from corgi_bl.c. No platform driver, no probe, remove, suspend and resume. Why is one much simpler than the other? Is functionality missing in the MacBook driver or is the corgi one just (historically) overblown? If I could safely reduce my driver to be as simple as the macbook one I would be more than happy When I studied the corgi_bl driver I noticed that some stuff is done in the driver itself and then there is the "platform stuff". I didn't know how to handle it and was given the suggestion to put the platform stuff also in the driver which I did but tried to keep that textually separate. Thus the separate sahara_init. Yet I had to call it in kb3886_init otherwise nothing else would do. I surely didn't fully understand what I was doing when I wrote that. Have simplified it as suggested. If all this can be simplified even more, like is done in macbook driver, that Fixed, i.e. removed. Below the fixed patch, correcting all mistakes reported by Andrey. Signed-off-by: Claudio Nieder <private@claudio.ch> --- drivers/video/backlight/Kconfig | 7 + drivers/video/backlight/Makefile | 1 + drivers/video/backlight/kb3886_bl.c | 214 +++++++++++++++++++++++++++++++++++ 3 files changed, 222 insertions(+), 0 deletions(-) diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index 452b770..bc65541 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -164,3 +164,10 @@ config BACKLIGHT_MBP_NVIDIA If you have an Apple Macbook Pro with Nvidia graphics hardware say Y to enable a driver for its backlight +config ...
I usually built the kernel with my driver included. For once I tried to build as
module first without that line added and then with. And by magic the module is
loaded right at boot time. Thank you for your help.
Once again the patch in which all your suggestions are included. Furthermore I
noticed that I had "default y" in Kconfig. Handy for me, but a tad selfish I
think and so corrected that by setting it to "n".
Here the fixed patch:
Signed-off-by: Claudio Nieder <private@claudio.ch>
Backlight driver for Tabletkiosk Sahara TouchIT-213 Tablet PC
---
drivers/video/backlight/Kconfig | 7 +
drivers/video/backlight/Makefile | 1 +
drivers/video/backlight/kb3886_bl.c | 213 +++++++++++++++++++++++++++++++++++
3 files changed, 221 insertions(+), 0 deletions(-)
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index 452b770..7dd0ecd 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -164,3 +164,10 @@ config BACKLIGHT_MBP_NVIDIA
If you have an Apple Macbook Pro with Nvidia graphics hardware say Y
to enable a driver for its backlight
+config BACKLIGHT_SAHARA
+ tristate "Tabletkiosk Sahara Touch-iT Backlight Driver"
+ depends on BACKLIGHT_CLASS_DEVICE && X86
+ default n
+ help
+ If you have a Tabletkiosk Sahara Touch-iT, say y to enable the
+ backlight driver.
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
index b405aac..f4a1183 100644
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -16,4 +16,5 @@ obj-$(CONFIG_BACKLIGHT_PROGEAR) += progear_bl.o
obj-$(CONFIG_BACKLIGHT_CARILLO_RANCH) += cr_bllcd.o
obj-$(CONFIG_BACKLIGHT_PWM) += pwm_bl.o
obj-$(CONFIG_BACKLIGHT_MBP_NVIDIA) += mbp_nvidia_bl.o
+obj-$(CONFIG_BACKLIGHT_SAHARA) += kb3886_bl.o
diff --git a/drivers/video/backlight/kb3886_bl.c
b/drivers/video/backlight/kb3886_bl.c
new file mode 100644
index 0000000..feb750a
--- /dev/null
+++ ...