[U-Boot] Adding a composite device, how to structure ?

Wolfgang,
I would like to add support for the twl4030, a composite i2c device, found on the omap3 zoom's. The header file will be include/twl4030.h. How do you want the source to be structured ? 1. A single large file in drivers/i2c/twl4030.c
or device files added under a directory ?
2. drivers/i2c/twl4030/keyboard, drivers/i2c/twl4030/usb, drivers/i2c/twl4030/battery,
or just the common code in i2c and twl4030 devices in the places they usually go.
3. drivers/i2c/twl4030.c, drivers/usb/tw4030_usb.c etc ..
My guess is #3.
Tom

Dear Tom,
In message 4A296B3C.1060208@windriver.com you wrote:
I would like to add support for the twl4030, a composite i2c device, found on the omap3 zoom's. The header file will be include/twl4030.h. How do you want the source to be structured ?
- A single large file in drivers/i2c/twl4030.c
or device files added under a directory ?
- drivers/i2c/twl4030/keyboard, drivers/i2c/twl4030/usb,
drivers/i2c/twl4030/battery,
or just the common code in i2c and twl4030 devices in the places they usually go.
- drivers/i2c/twl4030.c, drivers/usb/tw4030_usb.c etc ..
My guess is #3.
My guess is so, too - but this is acually for Heiko to answer.
Heiko?
Best regards,
Wolfgang Denk

Hello Tom,
Tom wrote:
I would like to add support for the twl4030, a composite i2c device, found on the omap3 zoom's. The header file will be include/twl4030.h. How do you want the source to be structured ?
- A single large file in drivers/i2c/twl4030.c
or device files added under a directory ?
- drivers/i2c/twl4030/keyboard, drivers/i2c/twl4030/usb,
drivers/i2c/twl4030/battery,
or just the common code in i2c and twl4030 devices in the places they usually go.
- drivers/i2c/twl4030.c, drivers/usb/tw4030_usb.c etc ..
My guess is #3.
Yep, I think #3 is the right way to go.
bye Heiko
participants (3)
-
Heiko Schocher
-
Tom
-
Wolfgang Denk