MFD: twl-core: Fix chip ID for the twl6030-pwm module
Subsystems (2)
PATCH 1/1 MFD: twl-core: Fix chip ID for the twl6030-pwm module
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:
#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 obviously going to do nasty things.
---
Hi Samuel,
Can you push this patch to 3.7?
Without this if the user enables the twl6030-pwm driver the kernel will not going to boot on OMAP4.
Thank you,
Peter
drivers/mfd/twl-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/twl-core.c +1 -1
@@ -672,7 +672,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);
Signature · 1 line
1.7.12.4
Quoted 38 lines · Peter Ujfalusi
The correct chip id is 1 since the PWM module is on address
0x49. With the currentTWL6030_MODULE_ID1the kernel will crash early since:
#defineTWL6030_MODULE_ID10x0E
and
static structtwl_clienttwl_modules[4];Down in the stack we try to get the module by:
structtwl_client*twl = &twl_modules[chip];Which obviously going to do nasty things.
Signed-off-by Peter Ujfalusi <[email protected]>---
Hi Samuel,Can you push this patch to 3.7?
Without this if the user enables the twl6030-pwm driver the kernel will not going to boot on OMAP4.Thank you,
Peterdrivers/mfd/twl-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mfd/twl-core.c +1
-1@@ -672,7 +672,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);
Hi Samuel,
Quoted 1 line · Tero Kristo
Acked-by Tero Kristo <[email protected]>
Can you take this patch for 3.7?
Thank you,
Péter
Quoted 42 lines · Peter Ujfalusi
Quoted 38 lines
The correct chip id is 1 since the PWM module is on address
0x49. With the currentTWL6030_MODULE_ID1the kernel will crash early since:
#defineTWL6030_MODULE_ID10x0E
and
static structtwl_clienttwl_modules[4];Down in the stack we try to get the module by:
structtwl_client*twl = &twl_modules[chip];Which obviously going to do nasty things.
Signed-off-by Peter Ujfalusi <[email protected]>---
Hi Samuel,Can you push this patch to 3.7?
Without this if the user enables the twl6030-pwm driver the kernel will not going to boot on OMAP4.Thank you,
Peterdrivers/mfd/twl-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mfd/twl-core.c +1
-1@@ -672,7 +672,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);
Samuel Ortiz
AppliedHi Peter,
Quoted 9 lines · Peter Ujfalusi
The correct chip id is 1 since the PWM module is on address
0x49. With the currentTWL6030_MODULE_ID1the kernel will crash early since:
#defineTWL6030_MODULE_ID10x0E
and
static structtwl_clienttwl_modules[4];Down in the stack we try to get the module by:
structtwl_client*twl = &twl_modules[chip];
Quoted 7 lines
Which obviously going to do nasty things.
Signed-off-by Peter Ujfalusi <[email protected]>---
Hi Samuel,Can you push this patch to 3.7?
Applied to my for-linus branch. This should make it to 3.7.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/