ARM: OMAP: board-4430sdp: Provide regulator to pwm-backlight
Subsystems (3)
PATCH 1/1 ARM: OMAP: board-4430sdp: Provide regulator to pwm-backlight
The pwm-backlight driver now takes a mandatory regulator that is gotten during driver probe. Initialize a dummy regulator to satisfy this requirement.
---
This patch, along with many more soon to follow, attempts to satisfy the new mandatory regulator that pwm-backlight will grab during probe. The only board in mach-omap2 to use the pwm-backlight appears to be the 4430sdp.
I thought I'd start small and use this board as an example.
I tested similar code in my Tegra board, so it should be okay. Of course, I don't have a 4430sdp to test with.
arch/arm/mach-omap2/board-4430sdp.c | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/mach-omap2/board-4430sdp.c +5 -0
@@ -291,6 +291,10 @@ static struct platform_device sdp4430_leds_pwm = { }, }; +/* Dummy regulator for pwm-backlight driver */ +static struct regulator_consumer_supply backlight_supply = +REGULATOR_SUPPLY ("enable" ,NULL ); +static struct platform_pwm_backlight_data sdp4430_backlight_data = { .max_brightness =127 , .dft_brightness =127 ,
@@ -718,6 +722,7 @@ static void __init omap_4430sdp_init(void)omap4_i2c_init ();omap_sfh7741prox_init (); +regulator_register_always_on (-1 ,"bl-enable" , &backlight_supply,1 ,0 );platform_add_devices (sdp4430_devices,ARRAY_SIZE (sdp4430_devices));omap_serial_init ();omap_sdrc_init (NULL ,NULL );
Signature · 1 line
1.7.9.5
Quoted 10 lines · Andrew Chew
The pwm-backlight driver now takes a mandatory regulator that is gotten during driver probe. Initialize a dummy regulator to satisfy this requirement.
Signed-off-by Andrew Chew <[email protected]>---
This patch, along with many more soon to follow, attempts to satisfy the new mandatory regulator that pwm-backlight will grab during probe. The only board in mach-omap2 to use the pwm-backlight appears to be the 4430sdp.
Quoted 4 lines
I thought I'd start small and use this board as an example.
I tested similar code in my Tegra board, so it should be okay. Of course, I don't have a 4430sdp to test with.
Hi Andrew,
This looks good, one minor comment below. I think it might make sense to post this patch as part of a series that includes the change to the pwm-backlight driver. This will make things easier on potential testers. You can later extend that series to include all the other users and eventually the whole series can be merged.
Quoted 19 lines
arch/arm/mach-omap2/board-4430sdp.c | 5 +++++ 1 file changed, 5 insertions(+)arch/arm/mach-omap2/board-4430sdp.c +4
-0@@ -291,6 +291,10 @@ static struct platform_device sdp4430_leds_pwm = { }, }; +/* Dummy regulator for pwm-backlight driver */ +static struct regulator_consumer_supply backlight_supply = +REGULATOR_SUPPLY ("enable" ,NULL ); +static struct platform_pwm_backlight_data sdp4430_backlight_data = { .max_brightness =127 , .dft_brightness =127 ,
arch/arm/mach-omap2/board-4430sdp.c static void __init omap_4430sdp_init(void) · line 725
Quoted 4 lines
arch/arm/mach-omap2/board-4430sdp.c +1
-0@@ -718,6 +722,7 @@ static void __init omap_4430sdp_init(void)omap4_i2c_init ();omap_sfh7741prox_init (); +regulator_register_always_on (-1 ,"bl-enable" , &backlight_supply,1 ,0 );
I think I'd prefer to spell out "backlight-enable". I know it's rather long but I find it is much easier on the eye to look at the various outputs where the string is used and see "backlight" instead of "bl". But it's really up to the OMAP crowd, if everybody else is fine with "bl-enable" I'll shut up.
Thierry
Quoted 26 lines
From: Thierry Reding [mailto:[email protected]]
Sent: Tuesday, March 12, 2013 12:01 AM
To: Andrew Chew
Cc: [email protected]; Alex Courbot; [email protected]
Subject: Re: [PATCH 1/1] ARM: OMAP: board-4430sdp: Provide regulator to pwm-backlight* PGP Signed by an unknown key
Quoted 9 lines · Andrew Chew
The pwm-backlight driver now takes a mandatory regulator that is gotten during driver probe. Initialize a dummy regulator to satisfy this requirement.
Signed-off-by Andrew Chew <[email protected]>---
This patch, along with many more soon to follow, attempts to satisfy the new mandatory regulator that pwm-backlight will grab during probe. The only board in mach-omap2 to use the pwm-backlight appears to be the4430sdp.
Quoted 5 lines
I thought I'd start small and use this board as an example.
I tested similar code in my Tegra board, so it should be okay. Of course, I don't have a 4430sdp to test with.
Quoted 7 lines
Hi Andrew,
This looks good, one minor comment below. I think it might make sense to post this patch as part of a series that includes the change to the pwm- backlight driver. This will make things easier on potential testers. You can later extend that series to include all the other users and eventually the whole series can be merged.
Do you mean I should do a single patch series, accumulating other boards as I go?
And by the way, do I have your reviewed-by for the pwm-backlight regulator patch?
Quoted 28 lines · Andrew Chew
Quoted 28 lines
From: Thierry Reding [mailto:[email protected]]
Sent: Tuesday, March 12, 2013 12:01 AM
To: Andrew Chew
Cc: [email protected]; Alex Courbot; [email protected]
Subject: Re: [PATCH 1/1] ARM: OMAP: board-4430sdp: Provide regulator to pwm-backlight* PGP Signed by an unknown key
Quoted 9 lines · Andrew Chew
The pwm-backlight driver now takes a mandatory regulator that is gotten during driver probe. Initialize a dummy regulator to satisfy this requirement.
Signed-off-by Andrew Chew <[email protected]>---
This patch, along with many more soon to follow, attempts to satisfy the new mandatory regulator that pwm-backlight will grab during probe. The only board in mach-omap2 to use the pwm-backlight appears to be the4430sdp.
Quoted 5 lines
I thought I'd start small and use this board as an example.
I tested similar code in my Tegra board, so it should be okay. Of course, I don't have a 4430sdp to test with.
Hi Andrew,
Quoted 8 lines
Quoted 5 lines
This looks good, one minor comment below. I think it might make sense to post this patch as part of a series that includes the change to the pwm- backlight driver. This will make things easier on potential testers. You can later extend that series to include all the other users and eventually the whole series can be merged.
Do you mean I should do a single patch series, accumulating other boards as I go?
Yes, that way everything needed will be in one patch series and people can easily apply that to their trees. It will also make things easier if we decide to merge all of them through one tree in the end.
Quoted 2 lines
And by the way, do I have your reviewed-by for the pwm-backlight regulator patch?
I think it looks good, but I'll go over it again in your repost of the whole series. I don't think you need my Reviewed-by, though, since I maintain the pwm-backlight driver. =)
Thierry
Hi,
Quoted 3 lines · Andrew Chew
The pwm-backlight driver now takes a mandatory regulator that is gotten during driver probe. Initialize a dummy regulator to satisfy this requirement.
Can you point me to the commit which makes a regulator mandatory for pwm-backlight?
Why the regulator is mandatory?
The 4430SDP (or Blaze) and Zoom2 is just happy alone with the PWM why should we have dummy regulators?
Quoted 39 lines
Signed-off-by Andrew Chew <[email protected]>---
This patch, along with many more soon to follow, attempts to satisfy the new mandatory regulator that pwm-backlight will grab during probe. The only board in mach-omap2 to use the pwm-backlight appears to be the 4430sdp.I thought I'd start small and use this board as an example.
I tested similar code in my Tegra board, so it should be okay. Of course, I don't have a 4430sdp to test with.
arch/arm/mach-omap2/board-4430sdp.c | 5 +++++ 1 file changed, 5 insertions(+)arch/arm/mach-omap2/board-4430sdp.c +5
-0@@ -291,6 +291,10 @@ static struct platform_device sdp4430_leds_pwm = { }, }; +/* Dummy regulator for pwm-backlight driver */ +static struct regulator_consumer_supply backlight_supply = +REGULATOR_SUPPLY ("enable" ,NULL ); +static struct platform_pwm_backlight_data sdp4430_backlight_data = { .max_brightness =127 , .dft_brightness =127 ,@@ -718,6 +722,7 @@ static void __init omap_4430sdp_init(void)omap4_i2c_init ();omap_sfh7741prox_init (); +regulator_register_always_on (-1 ,"bl-enable" , &backlight_supply,1 ,0 );platform_add_devices (sdp4430_devices,ARRAY_SIZE (sdp4430_devices));omap_serial_init ();omap_sdrc_init (NULL ,NULL );
Signature · 5 lines
Péter -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Andrew Chew
Quoted 3 lines
The pwm-backlight driver now takes a mandatory regulator that is gotten during driver probe. Initialize a dummy regulator to satisfy this requirement.
Can you point me to the commit which makes a regulator mandatory for pwm-backlight?
Why the regulator is mandatory?
The 4430SDP (or Blaze) and Zoom2 is just happy alone with the PWM why should we have dummy regulators?
I'm resubmitting the patch as a patch series that includes the pwm-backlight change. See the cover letter for an explanation of why this is needed.