Re: [PATCH v2] misc: Add driver for GP2AP002 proximity/ambient lightsensor

From: Jonathan Cameron
Date: Fri Sep 09 2011 - 05:08:13 EST


On 09/09/11 09:31, Greg KH wrote:
> On Fri, Sep 09, 2011 at 05:22:26PM +0900, Donggeun Kim wrote:
>> SHARP GP2AP002 is proximity and ambient light sensor.
>> This patch supports it.
>>
>> Signed-off-by: Donggeun Kim <dg77.kim@xxxxxxxxxxx>
>> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
>> ---
>> Changes for v2
>> - changed to expose lux
>> - changed request_irq to request_threaded_irq function
>> - added sysfs_notify function call
>
> Why? You should never do that unless you _really_ know what you are
> doing.
My bad. I suggested it was a better bet than doing a uevent to act
as a data ready notifier...

Greg, for future reference can you clarify why it's a bad idea or
give a reference (if it's been clarified elsewhere and I missed it!)
>
>
>> - cleaned up code
>>
>> Documentation/misc-devices/gp2ap002 | 44 +++
>> drivers/misc/Kconfig | 10 +
>> drivers/misc/Makefile | 1 +
>> drivers/misc/gp2ap002.c | 488 ++++++++++++++++++++++++++++++++
>> include/linux/platform_data/gp2ap002.h | 69 +++++
>
>
> Shouldn't this be an iio driver instead of some random misc driver with
> an undocumented sysfs file (hint, use Documentation/ABI for documenting
> stuff...) ?
Would certainly be welcome in IIO. We have a couple of similar sensors in there already.
I'm just aware some people/firms are really anti having
their drivers in staging (because the subsystem is there rather than because of issues
in the driver.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/