Message ID | 20090428084013.GA3909@scadufax.research.nokia.com (mailing list archive) |
---|---|
State | Awaiting Upstream, archived |
Headers | show |
> - if (twl_has_keypad() && pdata->keypad) { > + if (twl_has_keypad() && pdata->keypad && > + !(features & TLW6030)) { > child = add_child(2, "twl4030_keypad", > pdata->keypad, sizeof(*pdata->keypad), > true, pdata->irq_base + 1, 0); > > You'd probably only need to make changes to register defines but almost > everything else could remain as is. There shouldn't be any need for > creating separate files. > Patch 0, of the series explains the differences between TWL4030 and TWL6030. Going the aforesaid way, we will need checks like this in almost every other line of code. And I believe having a separate file would be more modular, and hence readable (a twl.c which will bind with twl4030-core.c and twl4030-irq.c if TWL4030 is selected, and twl6030-core.c and twl6030-irq.c if TWL6030 is selected). I am not sure how we can incorporate all the hardware changes by just changing register addresses. -- Jagadeesh -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Jagadeesh, We are also working on similar lines and I have already sent a RFC to discuss it further in the community. Please have a look at the below link and provide your comments: http://marc.info/?l=linux-omap&m=124083364321017&w=2 Regards, Anuj Aggarwal > -----Original Message----- > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap- > owner@vger.kernel.org] On Behalf Of Pakaravoor, Jagadeesh > Sent: Tuesday, April 28, 2009 2:42 PM > To: felipe.balbi@nokia.com > Cc: linux-omap@vger.kernel.org > Subject: RE: [RFC] [Patch 0/2] Proposal for changes to TWL4030/TWL5030 > framework for integrating the new TWL6030 chip > > > - if (twl_has_keypad() && pdata->keypad) { > > + if (twl_has_keypad() && pdata->keypad && > > + !(features & TLW6030)) { > > child = add_child(2, "twl4030_keypad", > > pdata->keypad, sizeof(*pdata->keypad), > > true, pdata->irq_base + 1, 0); > > > > You'd probably only need to make changes to register defines but almost > > everything else could remain as is. There shouldn't be any need for > > creating separate files. > > > Patch 0, of the series explains the differences between TWL4030 and TWL6030. > > Going the aforesaid way, we will need checks like this in almost every other > line of code. And I believe having a separate file would be more modular, and > hence readable (a twl.c which will bind with twl4030-core.c and twl4030-irq.c if > TWL4030 is selected, and twl6030-core.c and twl6030-irq.c if TWL6030 is > selected). > > I am not sure how we can incorporate all the hardware changes by just > changing register addresses. > > -- > Jagadeesh > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c index 769b34b..c6eec75 100644 --- a/drivers/mfd/twl4030-core.c +++ b/drivers/mfd/twl4030-core.c @@ -176,6 +176,7 @@ /* chip-specific feature flags, for i2c_device_id.driver_data */ #define TWL4030_VAUX2 BIT(0) /* pre-5030 voltage ranges */ #define TPS_SUBSET BIT(1) /* tps659[23]0 have fewer LDOs */ +#define TWL6030 BIT(2) /* twl6030 doesn't have gpio nor keypad */