Skip to contentSkip to conversation

isl29003: Move from misc to als now it available with minimal changes

PATCH In review Jonathan Cameron 2 participants 2 messages Dec 13, 2009 – Feb 11, 2010 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 isl29003: Move from misc to als now it available with minimal changes

---

I originally offered to move this to IIO, but ALS is more appropriate. There are a couple of attibutes in here that don't correspond directly to any currently in ALS. Feel free to offer suggestions for renames etc on these, but I'd prefer to see them in a second patch allowing us to keep things in this movement patch nice and clean. Will do api help once these are pinned down.

I've used the git move detection here so as to highlight what has actually changed in the driver. Just ask if you would prefer a version without that.

Daniel: Don't suppose you could test this? I don't think I have done anything that should cause any problems and it builds fine, but always nice to confirm!

Other than the tsl2563 driver currently in IIO (Greg K-H has sent pull request) I think this is the final non ALS ambient light sensor in mainline (assuming other patches have gone in first)

For purposes of testing I've put a kit tree up on kernel.org.
I will rebase this as makes sense to make minor edits to this and the tsl2550 driver so please don't base off it or send on without either telling me or warning whoever you send it to.

git://git.kernel.org/pub/scm/linux/kernel/git/jic23/als-temp.git

 drivers/als/Kconfig              |   10 ++++++++
 drivers/als/Makefile             |    1 +
 drivers/{misc => als}/isl29003.c |   45 +++++++++++++++++++++++++------------
 drivers/misc/Kconfig             |   10 --------
 drivers/misc/Makefile            |    1 -
 5 files changed, 41 insertions(+), 26 deletions(-)
drivers/als/Kconfig +10 -0
index 1564ffc..9d99ac2 100644
@@ -11,6 +11,16 @@ menuconfig ALS
 
 if ALS
 
+config ALS_ISL29003
+	tristate "Intersil ISL29003 ambient light sensor"
+	depends on I2C && SYSFS
+	help
+	  If you say yes here you get support for the Intersil ISL29003
+	  ambient light sensor.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called isl29003.
+
 config ALS_TSL2550
 	tristate "Taos TSL2550 ambient light sensor"
 	depends on EXPERIMENTAL && I2C
drivers/als/Makefile +1 -0
index 7be5631..55aa8af 100644
@@ -4,4 +4,5 @@
 
 obj-$(CONFIG_ALS)		+= als_sys.o
 
+obj-$(CONFIG_ALS_ISL29003)	+= isl29003.o
 obj-$(CONFIG_ALS_TSL2550)	+= tsl2550.o
\ No newline at end of file
drivers/als/isl29003.c renamed from drivers/misc/isl29003.c +30 -15

145 lines not on this page · raw message

drivers/misc/Kconfig +0 -10
index 2c16ca6..e5ffa20 100644
@@ -223,16 +223,6 @@ config DELL_LAPTOP
 	This driver adds support for rfkill and backlight control to Dell
 	laptops.
 
-config ISL29003
-	tristate "Intersil ISL29003 ambient light sensor"
-	depends on I2C && SYSFS
-	help
-	  If you say yes here you get support for the Intersil ISL29003
-	  ambient light sensor.
-
-	  This driver can also be built as a module.  If so, the module
-	  will be called isl29003.
-
 config EP93XX_PWM
 	tristate "EP93xx PWM support"
 	depends on ARCH_EP93XX
drivers/misc/Makefile +0 -1
index 906a0ed..ab6e0af 100644
@@ -18,7 +18,6 @@ obj-$(CONFIG_KGDB_TESTS)	+= kgdbts.o
 obj-$(CONFIG_SGI_XP)		+= sgi-xp/
 obj-$(CONFIG_SGI_GRU)		+= sgi-gru/
 obj-$(CONFIG_HP_ILO)		+= hpilo.o
-obj-$(CONFIG_ISL29003)		+= isl29003.o
 obj-$(CONFIG_EP93XX_PWM)	+= ep93xx_pwm.o
 obj-$(CONFIG_DS1682)		+= ds1682.o
 obj-$(CONFIG_C2PORT)		+= c2port/
Signature · 1 line
1.6.4.4
Acked-by on v1 1/1
#1 lore raw

Hi Jonathan,

Quoted 6 lines · Jonathan Cameron

I originally offered to move this to IIO, but ALS is more appropriate. There are a couple of attibutes in here that don't correspond directly to any currently in ALS. Feel free to offer suggestions for renames etc on these, but I'd prefer to see them in a second patch allowing us to keep things in this movement patch nice and clean. Will do api help once these are pinned down.

Thanks again for doing this. I gave that ported driver a quick test and it seems to work fine. Just one thing below ...

drivers/als/isl29003.c line 34

Quoted 12 lines
drivers/als/isl29003.c renamed from drivers/misc/isl29003.c +1 -0
similarity index 90%
rename from drivers/misc/isl29003.c
rename to drivers/als/isl29003.c
index a71e245..2ab188e 100644
@@ -31,9 +31,10 @@
 #include <linux/i2c.h>
 #include <linux/mutex.h>
 #include <linux/delay.h>
+#include <linux/als_sys.h>

You need linux/err.h here. Without that, it breaks at compile time on a PXA board as 'PTR_ERR' and 'IS_ERR' are undefined.

Apart from that: