Re: [PATCH V2] ARM: EXYNOS4: Add machine support for 7" LCD on ORIGEN

2011-09-14 Thread Tushar Behera

Hi Kukjin,

On Thursday 15 September 2011 10:24 AM, Kukjin Kim wrote:

Tushar Behera wrote:


Hi Fabio,

On Wednesday 14 September 2011 05:06 PM, Fabio Estevam wrote:

On Wed, Sep 14, 2011 at 8:01 AM, Tushar Behera

wrote:

...

+static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, unsigned int

power)

+{
+   int gpio = EXYNOS4_GPE3(4);
+
+   gpio_request(gpio, "GPE3_4");
+   gpio_direction_output(gpio, power);


You should check for returned errors for these functions.


Ok.

Will this be better?

static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, \


No need '\'


unsigned int power)
{
int ret;
unsigned long flag = power ? GPIOF_OUT_INIT_HIGH : \


Same as above.


GPIOF_OUT_INIT_LOW;

ret = gpio_request_one(EXYNOS4_GPE3(4), flag, "GPE3_4");

if (ret)
printk(KERN_ERR "Could not request gpio for LCD power");
}


How about following?

if (power)
ret = gpio_request_one(EXYNOS4_GPE3(4), GPIOF_OUT_INIT_HIGH, 
"GPE3_4");
else
ret = gpio_request_one(EXYNOS4_GPE3(4), GPIOF_OUT_INIT_LOW, 
"GPE3_4");

if (ret)
pr_err("failed to request gpio for LCD power: %d\n", ret);

Thanks, I will update accordingly.

Also I will remove the .refresh value as suggested in the other thread.


Thanks.

Best regards,
Kgene.
--
Kukjin Kim, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.




--
Tushar Behera
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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] ARM: EXYNOS4: Add machine support for 7" LCD on ORIGEN

2011-09-14 Thread Kukjin Kim
Tushar Behera wrote:
> 
> Hi Fabio,
> 
> On Wednesday 14 September 2011 05:06 PM, Fabio Estevam wrote:
> > On Wed, Sep 14, 2011 at 8:01 AM, Tushar Behera
> wrote:
> > ...
> >> +static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, unsigned int
> power)
> >> +{
> >> +   int gpio = EXYNOS4_GPE3(4);
> >> +
> >> +   gpio_request(gpio, "GPE3_4");
> >> +   gpio_direction_output(gpio, power);
> >
> > You should check for returned errors for these functions.
> >
> Ok.
> 
> Will this be better?
> 
> static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, \

No need '\'

>   unsigned int power)
> {
>   int ret;
>   unsigned long flag = power ? GPIOF_OUT_INIT_HIGH : \

Same as above.

>   GPIOF_OUT_INIT_LOW;
> 
>   ret = gpio_request_one(EXYNOS4_GPE3(4), flag, "GPE3_4");
> 
>   if (ret)
>   printk(KERN_ERR "Could not request gpio for LCD power");
> }

How about following?

if (power)
ret = gpio_request_one(EXYNOS4_GPE3(4), GPIOF_OUT_INIT_HIGH, 
"GPE3_4");
else
ret = gpio_request_one(EXYNOS4_GPE3(4), GPIOF_OUT_INIT_LOW, 
"GPE3_4");

if (ret)
pr_err("failed to request gpio for LCD power: %d\n", ret);

Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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] ARM: EXYNOS4: Add machine support for 7" LCD on ORIGEN

2011-09-14 Thread Kukjin Kim
Tushar Behera wrote:
> 
> ORIGEN board is fitted with 7" LCD panel HV070WSA. The pixel
> resolution of the LCD panel is 1024x600.
> 
> Also power domain device for LCD0 is registered.
> 
> Signed-off-by: Tushar Behera 
> ---
> Changes for V2:
>   * Added power domain device registration for LCD0
> 
> The patch is rebased on [1]. For proper working of LCD on ORIGEN,
> following patches are needed. These patches are already submitted to
> the mailing list.
> 
> a. ARM: EXYNOS4: Add PWM backlight support on Origen
>   Author: Giridhar Maruthy

As I said, it is already in my tree.

> b. ARM: EXYNOS4: Configure MAX8997 PMIC for Origen
>   Author: Inderpal Singh

Will review it.

(snip)

> +
> +static struct s3c_fb_pd_win origen_fb_win0 = {
> + .win_mode = {
> + .left_margin= 64,
> + .right_margin   = 16,
> + .upper_margin   = 64,
> + .lower_margin   = 16,
> + .hsync_len  = 48,
> + .vsync_len  = 3,
> + .xres   = 1024,
> + .yres   = 600,
> + .refresh= 60,

We don't need to add '.refresh' here because its default value is 60.

> + },
> + .max_bpp= 32,
> + .default_bpp= 24,
> +};

Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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] ARM: EXYNOS4: Add machine support for 7" LCD on ORIGEN

2011-09-14 Thread Tushar Behera

Hi Fabio Estevam,

On Wednesday 14 September 2011 06:09 PM, Fabio Estevam wrote:

On Wed, Sep 14, 2011 at 9:07 AM, Tushar Behera  wrote:
...


Will this be better?

static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, \
unsigned int power)
{
int ret;
unsigned long flag = power ? GPIOF_OUT_INIT_HIGH : \
GPIOF_OUT_INIT_LOW;

ret = gpio_request_one(EXYNOS4_GPE3(4), flag, "GPE3_4");

if (ret)
printk(KERN_ERR "Could not request gpio for LCD power");
}


Looks better. You can use pr_err instead of printk(KERN_ERR .

Thanks for your review comments. I will send the next version with these 
changes.

Regards,

Fabio Estevam



--
Tushar Behera
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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] ARM: EXYNOS4: Add machine support for 7" LCD on ORIGEN

2011-09-14 Thread Fabio Estevam
On Wed, Sep 14, 2011 at 9:07 AM, Tushar Behera  wrote:
...

> Will this be better?
>
> static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, \
>                                        unsigned int power)
> {
>        int ret;
>        unsigned long flag = power ? GPIOF_OUT_INIT_HIGH : \
>                                        GPIOF_OUT_INIT_LOW;
>
>        ret = gpio_request_one(EXYNOS4_GPE3(4), flag, "GPE3_4");
>
>        if (ret)
>                printk(KERN_ERR "Could not request gpio for LCD power");
> }

Looks better. You can use pr_err instead of printk(KERN_ERR .

Regards,

Fabio Estevam


Re: [PATCH V2] ARM: EXYNOS4: Add machine support for 7" LCD on ORIGEN

2011-09-14 Thread Tushar Behera

Hi Fabio,

On Wednesday 14 September 2011 05:06 PM, Fabio Estevam wrote:

On Wed, Sep 14, 2011 at 8:01 AM, Tushar Behera  wrote:
...

+static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, unsigned int 
power)
+{
+   int gpio = EXYNOS4_GPE3(4);
+
+   gpio_request(gpio, "GPE3_4");
+   gpio_direction_output(gpio, power);


You should check for returned errors for these functions.


Ok.

Will this be better?

static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, \
unsigned int power)
{
int ret;
unsigned long flag = power ? GPIOF_OUT_INIT_HIGH : \
GPIOF_OUT_INIT_LOW;

ret = gpio_request_one(EXYNOS4_GPE3(4), flag, "GPE3_4");

if (ret)
printk(KERN_ERR "Could not request gpio for LCD power");
}


Regards,

Fabio Estevam



--
Tushar Behera
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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] ARM: EXYNOS4: Add machine support for 7" LCD on ORIGEN

2011-09-14 Thread Fabio Estevam
On Wed, Sep 14, 2011 at 8:01 AM, Tushar Behera  wrote:
...
> +static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, unsigned int 
> power)
> +{
> +       int gpio = EXYNOS4_GPE3(4);
> +
> +       gpio_request(gpio, "GPE3_4");
> +       gpio_direction_output(gpio, power);

You should check for returned errors for these functions.

Regards,

Fabio Estevam
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html