Skip to contentSkip to conversation

Duplicated driver for LIS302-like device.

DISCUSSION Matt Hsu 3 participants 5 messages Dec 11, 2009 – Dec 14, 2009 HID

lore
Share & tools
lore

Matt Hsu

author
#0 lore raw

Hi all,

Recently I was managed to make LIS302DL device work on Beagleboard. It's almost done.

The last thing I would like to do is to commit the driver to upstream. Here comes a problem. I found there's a similar driver named lis3lv02d.c. which is located drivers/hwmon/. They are pretty much the same. Only registers mapping is different slightly.

Originally, I plan to use this driver directly instead of implementing another lis302dl-like driver. Unfortunately, this driver is dependent on ACPI subsystem.
The target platform for this device is based on ARM.
Therefore, I could not re-use this driver for my work
and re-implement it based on I2C interface.

My question is, is this a duplicated driver for upstream if I send patches for this driver without any ACPI dependency?

Cheers,
Matt

#1 lore raw

Hi Matt

Quoted 8 lines

Recently I was managed to make LIS302DL device work on Beagleboard. It's almost done.

The last thing I would like to do is to commit the driver to upstream. Here comes a problem. I found there's a similar driver named lis3lv02d.c. which is located drivers/hwmon/. They are pretty much the same. Only registers mapping is different slightly.

Firstly that would make emailing lm-sensors more sensible than linux-input but what the heck, some of us read both. Also for queries like this copy in the maintainer of the driver you are asking about.

Quoted 7 lines

Originally, I plan to use this driver directly instead of implementing another lis302dl-like driver.
Unfortunately, this driver is dependent on ACPI subsystem. The target platform for this device is based on ARM. Therefore, I could not re-use this driver for my work
and re-implement it based on I2C interface.

Gah, Not again! So far we have had two patch sets implementing just this. Looking at the latest from Samu, Eric's patch has been sent on to Andrew Morton for the current merge window (and is listed as being in his mm tree). May even have merged since I last pulled mainline.

You have my sympathies as the whole duplicating work thing happens to us all from time to time. The answer is as ever, post early and post often to the relevant mailing lists. (though of course hardly anyone actually keeps to this!)

I've cc'd in everyone I know has an interest in this driver for any thing else they might want to add.

Jonathan

#2 lore raw

(Thank you Jonathan for the CC!)

Quoted 24 lines · Jonathan Cameron

Hi Matt

Quoted 8 lines

Recently I was managed to make LIS302DL device work on Beagleboard. It's almost done.

The last thing I would like to do is to commit the driver to upstream. Here comes a problem. I found there's a similar driver named lis3lv02d.c. which is located drivers/hwmon/. They are pretty much the same. Only registers mapping is different slightly.

Firstly that would make emailing lm-sensors more sensible than linux-input but what the heck, some of us read both. Also for queries like this copy in the maintainer of the driver you are asking about.

Quoted 7 lines

Originally, I plan to use this driver directly instead of implementing another lis302dl-like driver.
Unfortunately, this driver is dependent on ACPI subsystem. The target platform for this device is based on ARM. Therefore, I could not re-use this driver for my work
and re-implement it based on I2C interface.

Gah, Not again! So far we have had two patch sets implementing just this. Looking at the latest from Samu, Eric's patch has been sent on to Andrew Morton for the current merge window (and is listed as being in his mm tree). May even have merged since I last pulled mainline.

Quoted 5 lines

You have my sympathies as the whole duplicating work thing happens to us all from time to time. The answer is as ever, post early and post often to the relevant mailing lists. (though of course hardly anyone actually keeps to this!)

Hi Matt,

As Jonathan said, it seems most of what you look for (support of lis302dl via I²C) is now present as a patch series in mmotm. Please have a look at http://userweb.kernel.org/~akpm/mmotm/broken-out/ , where you should find ~11 patches for lis3*. You need to check
http://userweb.kernel.org/~akpm/mmotm/series for knowing the correct order to apply them. I expect them to be sent to Linus for 2.6.33 within a few days.

Hopefully, what you need is already there. Well, of course it depends also on what interface you need in userspace for the hardware. There is currently only position reporting (via joystick interface and sysfs file), freefall detection (via a misc device) and selftest (via sysfs file). Let me know if you have additional features in your implementation, or some bug fixes, and we could incorporate them in the lis3lv02d driver.

See you,
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#4 lore raw
In reply to Jonathan Cameron
Quoted 7 lines · Jonathan Cameron

Hi Matt

Gah, Not again! So far we have had two patch sets implementing just this. Looking at the latest from Samu, Eric's patch has been sent on to Andrew Morton for the current merge window (and is listed as being in his mm tree). May even have merged since I last pulled mainline.

Quoted 5 lines

You have my sympathies as the whole duplicating work thing happens to us all from time to time. The answer is as ever, post early and post often to the relevant mailing lists. (though of course hardly anyone actually keeps to this!)

Hi Jonathan,

Thanks for your information.
Previously, I only went through input subsystem instead of lm-sensors. And now the upstream driver seems to be implemented and merged. I
will cherry pick them into 0xlab kernel repository.

Cheers,
Matt

Quoted 5 lines

I've cc'd in everyone I know has an interest in this driver for any thing else they might want to add.

Jonathan

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

author
#3 lore raw
In reply to Éric Piel
Quoted 3 lines

Hopefully, what you need is already there. Well, of course it depends also on what interface you need in userspace for the hardware.

Hi Eric,

I poked series patches you mentioned above.
These patches add the support of both interface.
That's great work. Originally, it was my next TODO, integration both
interfaces.

Btw, here is the demo for this device. Just FYI.

http://matthsu-abacus.blogspot.com/2009/12/motion-sensor-demo-on-beagleboard.html

I will cherry pick the upstream patches when they are merged into
2.6.33.

Cheers,
Matt

Quoted 10 lines

There is
currently only position reporting (via joystick interface and sysfs file), freefall detection (via a misc device) and selftest (via sysfs file). Let me know if you have additional features in your implementation, or some bug fixes, and we could incorporate them in the lis3lv02d driver.

See you,
Eric

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors