Skip to content

Commit

Permalink
mfd: twl-core: Fix chip ID for the twl6030-pwm module
Browse files Browse the repository at this point in the history
The correct chip id is 1 since the PWM module is on address 0x49. With the
current TWL6030_MODULE_ID1 the kernel will crash early since we have:

 #define TWL6030_MODULE_ID1 0x0E
and
 static struct twl_client twl_modules[4];

Down in the stack we try to get the module by:
struct twl_client	*twl = &twl_modules[chip];

Which is obviously going to do nasty things.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Peter Ujfalusi authored and Samuel Ortiz committed Nov 20, 2012
1 parent f4a75d2 commit 78a3c5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mfd/twl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
}

if (IS_ENABLED(CONFIG_PWM_TWL6030) && twl_class_is_6030()) {
child = add_child(TWL6030_MODULE_ID1, "twl6030-pwm", NULL, 0,
child = add_child(SUB_CHIP_ID1, "twl6030-pwm", NULL, 0,
false, 0, 0);
if (IS_ERR(child))
return PTR_ERR(child);
Expand Down

0 comments on commit 78a3c5a

Please sign in to comment.