Skip to contentSkip to conversation

Driver Merge Questions

DISCUSSION Chris Hudson 3 participants 6 messages Nov 3, 2009 – Nov 9, 2009

lore
Share & tools
lore
#0 lore raw

Hello all,

I've never submitted any software to Linux before, but I've been working on some new accelerometer drivers that should be ready for review soon (pending company approval). I've read lots of documentation on patch and driver submissions, but I still have some questions that I was hoping someone could help me find the answers to.

1- My drivers use i2c for hardware communications, miscdevice for IOCTLs, and input_dev for data and interrupt status outputs. Most of the other accelerometer drivers that I've looked at use similar designs and are located in drivers/hwmon, but I just wanted to confirm that this is the correct location currently.

2- I have done all of my hardware testing with OMAP development platforms, so I thought it would be best to send my patch submissions to this list for review. The hardware monitoring tree is listed in MAINTAINERS as an orphan, but I was planning on including [email protected] as well. If either of these assumptions is incorrect, please let me know.

3- Should my patch set consist of source, header, kconfig, and makefile patches, or should I include my custom changes to mux.c, mux.h, and board-zoom2.c as well? The former are necessary for adding driver support, but the latter are specific for my hardware testing platform (which others may want to duplicate for testing purposes). I noticed that recent versions of board-zoom2.c are nice and clean, so it's probably not a good idea to wedge infrequently-used code in there with a bunch of #ifdefs. I just want to get an idea of what is generally included with a new driver.

Any help or advice would be greatly appreciated.

Thank you,

Chris Hudson
Kionix, Inc.

#1 lore raw
Quoted 9 lines · Chris Hudson

Hello all,

I've never submitted any software to Linux before, but I've been working on some new accelerometer drivers that should be ready for review soon (pending company approval). I've read lots of documentation on patch and driver submissions, but I still have some questions that I was hoping someone could help me find the answers to.

Quoted 5 lines

1- My drivers use i2c for hardware communications, miscdevice for IOCTLs, and input_dev for data and interrupt status outputs. Most of the other accelerometer drivers that I've looked at use similar designs and are located in drivers/hwmon, but I just wanted to confirm that this is the correct location currently.

Sounds correct.

Quoted 6 lines

2- I have done all of my hardware testing with OMAP development platforms, so I thought it would be best to send my patch submissions to this list for review. The hardware monitoring tree is listed in MAINTAINERS as an orphan, but I was planning on including [email protected] as well. If either of these assumptions is incorrect, please let me know.

Yes, please send the patches to both. Also, please run the patches through scripts/checkpatch.pl --strict, and read the files under Documentation/Submit* ;)

Quoted 9 lines

3- Should my patch set consist of source, header, kconfig, and makefile patches, or should I include my custom changes to mux.c, mux.h, and board-zoom2.c as well? The former are necessary for adding driver support, but the latter are specific for my hardware testing platform (which others may want to duplicate for testing purposes). I noticed that recent versions of board-zoom2.c are nice and clean, so it's probably not a good idea to wedge infrequently-used code in there with a bunch of #ifdefs. I just want to get an idea of what is generally included with a new driver.

Compile should work throughout the series for each patch to keep git bisect working. To me it sounds like one patch for the driver, and then one to enable the driver in some hardware.

Please not that we're reworking the mux code for omap3 to make it easier to use. So please make the mux changes yet another patch.

Quoted 1 line

Any help or advice would be greatly appreciated.

Hope this helps!

Regards,

Tony

#2 lore raw
Quoted 10 lines · Tony Lindgren
Quoted 9 lines · Chris Hudson

Hello all,

I've never submitted any software to Linux before, but I've been working on some new accelerometer drivers that should be ready for review soon (pending company approval). I've read lots of documentation on patch and driver submissions, but I still have some questions that I was hoping someone could help me find the answers to.

Quoted 7 lines
Quoted 5 lines

1- My drivers use i2c for hardware communications, miscdevice for IOCTLs, and input_dev for data and interrupt status outputs. Most of the other accelerometer drivers that I've looked at use similar designs and are located in drivers/hwmon, but I just wanted to confirm that this is the correct location currently.

Sounds correct.

Unfortunately it will probably get rejected in drivers/hwmon. The maintainer, Jean Delavare wants them out of hwmon[1]. It seems that everyone (for the moment) is leaning towards a new subsystem called industrial IO (drivers/staging/iio) for such drivers.

Please ask Jean before you do the work to make your driver behave like a hwmon driver.

Regards,
Amit

[1] http://lkml.org/lkml/2009/7/2/153

Signature · 3 lines
-------------------------------------------------------------------------
Amit Kucheria,				 Kernel Developer, Verdurent
-------------------------------------------------------------------------
#3 lore raw
Quoted 17 lines · Amit Kucheria
Quoted 16 lines · Tony Lindgren
Quoted 14 lines · Chris Hudson

Hello all,

I've never submitted any software to Linux before, but I've been working on some new accelerometer drivers that should be ready for review soon (pending company approval).  I've read lots of documentation on patch and driver submissions, but I still have some questions that I was hoping someone could help me find the answers to.

1- My drivers use i2c for hardware communications, miscdevice for IOCTLs, and input_dev for data and interrupt status outputs.  Most of the other accelerometer drivers that I've looked at use similar designs and are located in drivers/hwmon, but I just wanted to confirm that this is the correct location currently.

Quoted 4 lines
Quoted 1 line

Sounds correct.

Unfortunately it will probably get rejected in drivers/hwmon. The maintainer, Jean Delavare wants them out of hwmon[1]. It seems that everyone (for the

s/Delavare/Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to Amit Kucheria

Hello Amit,

Thank you for the information.

The driver is just about finished actually; I was going to do some final testing and pull and submit the patches today. I read the lkml.org source and it definitely seems like things are in a state of limbo at the moment (well, as of a few months ago) with regard to sensor drivers. So, should I submit the code as-is and work on changing it as necessary with the help of the community, or do I step back and modify for the iio subsystem before submission? Alternatively, since the code was originally written for the 2.6.29 Android kernel, should I submit the current version of the driver to that branch first? Please let me know.

Thank you,
Chris

Quoted 36 lines · Amit Kucheria
Quoted 11 lines · Tony Lindgren
Quoted 9 lines · Chris Hudson

Hello all,

I've never submitted any software to Linux before, but I've been working on some new accelerometer drivers that should be ready for review soon (pending company approval). I've read lots of documentation on patch and driver submissions, but I still have some questions that I was hoping someone could help me find the answers to.

Quoted 8 lines
Quoted 6 lines

1- My drivers use i2c for hardware communications, miscdevice for IOCTLs, and input_dev for data and interrupt status outputs. Most of the other accelerometer drivers that I've looked at use similar designs and are located in drivers/hwmon, but I just wanted to confirm that this is the correct location currently.

Sounds correct.

Unfortunately it will probably get rejected in drivers/hwmon. The maintainer, Jean Delavare wants them out of hwmon[1]. It seems that everyone (for the moment) is leaning towards a new subsystem called industrial IO (drivers/staging/iio) for such drivers.

Please ask Jean before you do the work to make your driver behave like a hwmon driver.

Regards,
Amit

[1] http://lkml.org/lkml/2009/7/2/153

#5 lore raw
Quoted 4 lines · Chris Hudson

Hello Amit,

Thank you for the information.

Quoted 10 lines

The driver is just about finished actually; I was going to do some final testing and pull and submit the patches today. I read the lkml.org source and it definitely seems like things are in a state of limbo at the moment (well, as of a few months ago) with regard to sensor drivers. So, should I submit the code as-is and work on changing it as necessary with the help of the community, or do I step back and modify for the iio subsystem before submission? Alternatively, since the code was originally written for the 2.6.29 Android kernel, should I submit the current version of the driver to that branch first? Please let me know.

Hi Chris,

No harm is submitting a patch for a hwmon-based driver against mainline 2.6.32-rc6 to LKML (cc the requisite maintainers). It might help get review on obvious issues, if any.

But be prepared to modify the driver to use IIO. I just modified a driver to use IIO and isn't that hard - probably an afternoon's work.

Regards,
Amit

Signature · 3 lines
-------------------------------------------------------------------------
Amit Kucheria,				 Kernel Developer, Verdurent
-------------------------------------------------------------------------