All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MFD: twl-core: Fix chip ID for the twl6030-pwm module
@ 2012-10-31 14:54 Peter Ujfalusi
  2012-11-01  9:09 ` Tero Kristo
  2012-11-13 18:59 ` Samuel Ortiz
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2012-10-31 14:54 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: Tero Kristo, linux-kernel, Thierry Reding

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.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
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(-)

diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 2624668..d7577cb 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -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);
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] MFD: twl-core: Fix chip ID for the twl6030-pwm module
  2012-10-31 14:54 [PATCH] MFD: twl-core: Fix chip ID for the twl6030-pwm module Peter Ujfalusi
@ 2012-11-01  9:09 ` Tero Kristo
  2012-11-12 14:50   ` Peter Ujfalusi
  2012-11-13 18:59 ` Samuel Ortiz
  1 sibling, 1 reply; 4+ messages in thread
From: Tero Kristo @ 2012-11-01  9:09 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: Samuel Ortiz, linux-kernel, Thierry Reding

Acked-by: Tero Kristo <t-kristo@ti.com>

On Wed, 2012-10-31 at 15:54 +0100, Peter Ujfalusi wrote:
> 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.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> 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(-)
> 
> diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
> index 2624668..d7577cb 100644
> --- a/drivers/mfd/twl-core.c
> +++ b/drivers/mfd/twl-core.c
> @@ -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);



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] MFD: twl-core: Fix chip ID for the twl6030-pwm module
  2012-11-01  9:09 ` Tero Kristo
@ 2012-11-12 14:50   ` Peter Ujfalusi
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2012-11-12 14:50 UTC (permalink / raw)
  To: t-kristo; +Cc: Samuel Ortiz, linux-kernel, Thierry Reding

Hi Samuel,

On 11/01/2012 10:09 AM, Tero Kristo wrote:
> Acked-by: Tero Kristo <t-kristo@ti.com>

Can you take this patch for 3.7?

Thank you,
Péter

> 
> On Wed, 2012-10-31 at 15:54 +0100, Peter Ujfalusi wrote:
>> 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.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> ---
>> 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(-)
>>
>> diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
>> index 2624668..d7577cb 100644
>> --- a/drivers/mfd/twl-core.c
>> +++ b/drivers/mfd/twl-core.c
>> @@ -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);
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] MFD: twl-core: Fix chip ID for the twl6030-pwm module
  2012-10-31 14:54 [PATCH] MFD: twl-core: Fix chip ID for the twl6030-pwm module Peter Ujfalusi
  2012-11-01  9:09 ` Tero Kristo
@ 2012-11-13 18:59 ` Samuel Ortiz
  1 sibling, 0 replies; 4+ messages in thread
From: Samuel Ortiz @ 2012-11-13 18:59 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: Tero Kristo, linux-kernel, Thierry Reding

Hi Peter,

On Wed, Oct 31, 2012 at 03:54:37PM +0100, Peter Ujfalusi wrote:
> 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.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> 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.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-13 18:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31 14:54 [PATCH] MFD: twl-core: Fix chip ID for the twl6030-pwm module Peter Ujfalusi
2012-11-01  9:09 ` Tero Kristo
2012-11-12 14:50   ` Peter Ujfalusi
2012-11-13 18:59 ` Samuel Ortiz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.