RE: [RFC] [Patch 0/2] Proposal for changes to TWL4030/TWL5030 framework for integrating the new TWL6030 chip

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -       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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux