RE: [PATCH-V2 2/2] OMAP: OMAP3EVM: Add LCD Backlight brightness hookup function
> -Original Message- > From: Tomi Valkeinen [mailto:tomi.valkei...@nokia.com] > Sent: Thursday, April 15, 2010 7:30 PM > To: Hiremath, Vaibhav > Cc: linux-omap@vger.kernel.org; t...@atomide.com > Subject: RE: [PATCH-V2 2/2] OMAP: OMAP3EVM: Add LCD Backlight brightness > hookup function > > On Thu, 2010-04-15 at 15:52 +0200, ext Hiremath, Vaibhav wrote: > > > -Original Message- > > > From: Tomi Valkeinen [mailto:tomi.valkei...@nokia.com] > > > Sent: Thursday, April 15, 2010 7:18 PM > > > To: Hiremath, Vaibhav > > > Cc: linux-omap@vger.kernel.org; t...@atomide.com > > > Subject: Re: [PATCH-V2 2/2] OMAP: OMAP3EVM: Add LCD Backlight brightness > > > hookup function > > > > > > Hi, > > > > > > On Mon, 2010-04-12 at 13:50 +0200, ext hvaib...@ti.com wrote: > > > > From: Vaibhav Hiremath > > > > > > > > > > > > Signed-off-by: Vaibhav Hiremath > > > > > > What tree is this patch based on? It doesn't apply: > > > > > > Applying: OMAP: OMAP3EVM: Add LCD Backlight brightness hookup function > > > fatal: sha1 information is lacking or useless (arch/arm/mach- > omap2/board- > > > omap3evm.c). > > > Repository lacks necessary blobs to fall back on 3-way merge. > > > Cannot fall back to three-way merge. > > > > > [Hiremath, Vaibhav] I am really not sure why this error is coming up, > actually I using same patch and rebasing it with latest linux-omap/master > without any issue. > > > > I think this happens when you have some extra patches on your tree, and > these two patches are on top of them. Then you email me only these two > patches, and when I try to apply them, git will complain as the > underlying patches are missing from my tree. > > So you should always rebase the patches you will send on top of a clean > public tree, preferably my dss2 tree or main linux tree. [Hiremath, Vaibhav] I just send the 2 patches to you, and also verified it applies to linux-omap/dss2 branch cleanly. Thanks, Vaibhav > > Tomi > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH-V2 2/2] OMAP: OMAP3EVM: Add LCD Backlight brightness hookup function
On Thu, 2010-04-15 at 15:52 +0200, ext Hiremath, Vaibhav wrote: > > -Original Message- > > From: Tomi Valkeinen [mailto:tomi.valkei...@nokia.com] > > Sent: Thursday, April 15, 2010 7:18 PM > > To: Hiremath, Vaibhav > > Cc: linux-omap@vger.kernel.org; t...@atomide.com > > Subject: Re: [PATCH-V2 2/2] OMAP: OMAP3EVM: Add LCD Backlight brightness > > hookup function > > > > Hi, > > > > On Mon, 2010-04-12 at 13:50 +0200, ext hvaib...@ti.com wrote: > > > From: Vaibhav Hiremath > > > > > > > > > Signed-off-by: Vaibhav Hiremath > > > > What tree is this patch based on? It doesn't apply: > > > > Applying: OMAP: OMAP3EVM: Add LCD Backlight brightness hookup function > > fatal: sha1 information is lacking or useless (arch/arm/mach-omap2/board- > > omap3evm.c). > > Repository lacks necessary blobs to fall back on 3-way merge. > > Cannot fall back to three-way merge. > > > [Hiremath, Vaibhav] I am really not sure why this error is coming up, > actually I using same patch and rebasing it with latest linux-omap/master > without any issue. > I think this happens when you have some extra patches on your tree, and these two patches are on top of them. Then you email me only these two patches, and when I try to apply them, git will complain as the underlying patches are missing from my tree. So you should always rebase the patches you will send on top of a clean public tree, preferably my dss2 tree or main linux tree. Tomi -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH-V2 2/2] OMAP: OMAP3EVM: Add LCD Backlight brightness hookup function
> -Original Message- > From: Tomi Valkeinen [mailto:tomi.valkei...@nokia.com] > Sent: Thursday, April 15, 2010 7:18 PM > To: Hiremath, Vaibhav > Cc: linux-omap@vger.kernel.org; t...@atomide.com > Subject: Re: [PATCH-V2 2/2] OMAP: OMAP3EVM: Add LCD Backlight brightness > hookup function > > Hi, > > On Mon, 2010-04-12 at 13:50 +0200, ext hvaib...@ti.com wrote: > > From: Vaibhav Hiremath > > > > > > Signed-off-by: Vaibhav Hiremath > > What tree is this patch based on? It doesn't apply: > > Applying: OMAP: OMAP3EVM: Add LCD Backlight brightness hookup function > fatal: sha1 information is lacking or useless (arch/arm/mach-omap2/board- > omap3evm.c). > Repository lacks necessary blobs to fall back on 3-way merge. > Cannot fall back to three-way merge. > [Hiremath, Vaibhav] I am really not sure why this error is coming up, actually I using same patch and rebasing it with latest linux-omap/master without any issue. Let me re-submit it to you. Thanks, Vaibhav > Tomi > > > --- > > arch/arm/mach-omap2/board-omap3evm.c | 34 > ++ > > 1 files changed, 34 insertions(+), 0 deletions(-) > > > > diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach- > omap2/board-omap3evm.c > > index f2a52c3..1d1956f 100644 > > --- a/arch/arm/mach-omap2/board-omap3evm.c > > +++ b/arch/arm/mach-omap2/board-omap3evm.c > > @@ -253,6 +253,38 @@ static void omap3_evm_disable_lcd(struct > omap_dss_device *dssdev) > > lcd_enabled = 0; > > } > > > > +/* > > + * PWMA/B register offsets (TWL4030_MODULE_PWMA) > > + */ > > +#define TWL_LED_EN 0x0 > > +#define TWL_LED_PWMON 0x0 > > +#define TWL_LED_PWMOFF 0x1 > > + > > +static int omap3evm_set_bl_intensity(struct omap_dss_device *dssdev, int > level) > > +{ > > + unsigned char c; > > + > > + if (level > 100) > > + return -EINVAL; > > + /* > > +* Enable LEDA for backlight > > +*/ > > + twl_i2c_write_u8(TWL4030_MODULE_LED, 0x11, TWL_LED_EN); > > + > > + c = ((125 * (100 - level)) / 100); > > + if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { > > + c += 1; > > + twl_i2c_write_u8(TWL4030_MODULE_PWMA, 0x7F, TWL_LED_PWMOFF); > > + twl_i2c_write_u8(TWL4030_MODULE_PWMA, c, TWL_LED_PWMON); > > + } else { > > + c += 2; > > + twl_i2c_write_u8(TWL4030_MODULE_PWMA, 0x1, TWL_LED_PWMON); > > + twl_i2c_write_u8(TWL4030_MODULE_PWMA, c, TWL_LED_PWMOFF); > > + } > > + > > + return 0; > > +} > > + > > static struct omap_dss_device omap3_evm_lcd_device = { > > .name = "lcd", > > .driver_name= "sharp_ls_panel", > > @@ -260,6 +292,8 @@ static struct omap_dss_device omap3_evm_lcd_device = { > > .phy.dpi.data_lines = 18, > > .platform_enable= omap3_evm_enable_lcd, > > .platform_disable = omap3_evm_disable_lcd, > > + .max_backlight_level= 100, > > + .set_backlight = omap3evm_set_bl_intensity, > > }; > > > > static int omap3_evm_enable_tv(struct omap_dss_device *dssdev) > > -- > > 1.6.2.4 > > > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH-V2 2/2] OMAP: OMAP3EVM: Add LCD Backlight brightness hookup function
Hi, On Mon, 2010-04-12 at 13:50 +0200, ext hvaib...@ti.com wrote: > From: Vaibhav Hiremath > > > Signed-off-by: Vaibhav Hiremath What tree is this patch based on? It doesn't apply: Applying: OMAP: OMAP3EVM: Add LCD Backlight brightness hookup function fatal: sha1 information is lacking or useless (arch/arm/mach-omap2/board-omap3evm.c). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Tomi > --- > arch/arm/mach-omap2/board-omap3evm.c | 34 > ++ > 1 files changed, 34 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-omap2/board-omap3evm.c > b/arch/arm/mach-omap2/board-omap3evm.c > index f2a52c3..1d1956f 100644 > --- a/arch/arm/mach-omap2/board-omap3evm.c > +++ b/arch/arm/mach-omap2/board-omap3evm.c > @@ -253,6 +253,38 @@ static void omap3_evm_disable_lcd(struct omap_dss_device > *dssdev) > lcd_enabled = 0; > } > > +/* > + * PWMA/B register offsets (TWL4030_MODULE_PWMA) > + */ > +#define TWL_LED_EN 0x0 > +#define TWL_LED_PWMON0x0 > +#define TWL_LED_PWMOFF 0x1 > + > +static int omap3evm_set_bl_intensity(struct omap_dss_device *dssdev, int > level) > +{ > + unsigned char c; > + > + if (level > 100) > + return -EINVAL; > + /* > + * Enable LEDA for backlight > + */ > + twl_i2c_write_u8(TWL4030_MODULE_LED, 0x11, TWL_LED_EN); > + > + c = ((125 * (100 - level)) / 100); > + if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { > + c += 1; > + twl_i2c_write_u8(TWL4030_MODULE_PWMA, 0x7F, TWL_LED_PWMOFF); > + twl_i2c_write_u8(TWL4030_MODULE_PWMA, c, TWL_LED_PWMON); > + } else { > + c += 2; > + twl_i2c_write_u8(TWL4030_MODULE_PWMA, 0x1, TWL_LED_PWMON); > + twl_i2c_write_u8(TWL4030_MODULE_PWMA, c, TWL_LED_PWMOFF); > + } > + > + return 0; > +} > + > static struct omap_dss_device omap3_evm_lcd_device = { > .name = "lcd", > .driver_name= "sharp_ls_panel", > @@ -260,6 +292,8 @@ static struct omap_dss_device omap3_evm_lcd_device = { > .phy.dpi.data_lines = 18, > .platform_enable= omap3_evm_enable_lcd, > .platform_disable = omap3_evm_disable_lcd, > + .max_backlight_level= 100, > + .set_backlight = omap3evm_set_bl_intensity, > }; > > static int omap3_evm_enable_tv(struct omap_dss_device *dssdev) > -- > 1.6.2.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH-V2 2/2] OMAP: OMAP3EVM: Add LCD Backlight brightness hookup function
From: Vaibhav Hiremath Signed-off-by: Vaibhav Hiremath --- arch/arm/mach-omap2/board-omap3evm.c | 34 ++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index f2a52c3..1d1956f 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -253,6 +253,38 @@ static void omap3_evm_disable_lcd(struct omap_dss_device *dssdev) lcd_enabled = 0; } +/* + * PWMA/B register offsets (TWL4030_MODULE_PWMA) + */ +#define TWL_LED_EN 0x0 +#define TWL_LED_PWMON 0x0 +#define TWL_LED_PWMOFF 0x1 + +static int omap3evm_set_bl_intensity(struct omap_dss_device *dssdev, int level) +{ + unsigned char c; + + if (level > 100) + return -EINVAL; + /* +* Enable LEDA for backlight +*/ + twl_i2c_write_u8(TWL4030_MODULE_LED, 0x11, TWL_LED_EN); + + c = ((125 * (100 - level)) / 100); + if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { + c += 1; + twl_i2c_write_u8(TWL4030_MODULE_PWMA, 0x7F, TWL_LED_PWMOFF); + twl_i2c_write_u8(TWL4030_MODULE_PWMA, c, TWL_LED_PWMON); + } else { + c += 2; + twl_i2c_write_u8(TWL4030_MODULE_PWMA, 0x1, TWL_LED_PWMON); + twl_i2c_write_u8(TWL4030_MODULE_PWMA, c, TWL_LED_PWMOFF); + } + + return 0; +} + static struct omap_dss_device omap3_evm_lcd_device = { .name = "lcd", .driver_name= "sharp_ls_panel", @@ -260,6 +292,8 @@ static struct omap_dss_device omap3_evm_lcd_device = { .phy.dpi.data_lines = 18, .platform_enable= omap3_evm_enable_lcd, .platform_disable = omap3_evm_disable_lcd, + .max_backlight_level= 100, + .set_backlight = omap3evm_set_bl_intensity, }; static int omap3_evm_enable_tv(struct omap_dss_device *dssdev) -- 1.6.2.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html