2011-07-30 06:20:01     Backlight of LQ035Q1 switches off when closing AD7879

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-07-30 06:20:01     Backlight of LQ035Q1 switches off when closing AD7879

Chandrashekhar Lavania (INDIA)

Message: 102731   

 

Hi,

 

I am using 2010R1-RC5 with a BF527 based board.

 

I tried to use my display and touchscree at the same time and it worked fine.

 

But, once I close my touchscreen (AD7879), the backlight of the screen switched off and I was no longer able to see anything on the screen.

 

The issue seems to be that ADI LCD EzExtender uses touchsceen GPIO to switch on and off the LCD, and when we close the touchscreen then that gpio is made low hence switching off the backlight.

 

I was wondering what would be the best way to resolve this issue.

 

 

 

Regards,

 

Shekhar

QuoteReplyEditDelete

 

 

2011-07-31 23:07:17     Re: Backlight of LQ035Q1 switches off when closing AD7879

Aaron Wu (CHINA)

Message: 102736   

 

Could you attach the schematics for both of your BF527 board and the LCD display board you find this problem?

QuoteReplyEditDelete

 

 

2011-08-01 07:19:58     Re: Backlight of LQ035Q1 switches off when closing AD7879

Chandrashekhar Lavania (INDIA)

Message: 102748   

 

Hi,

 

My LCD Display Board follows the LCD EzExtender. Hence, the schematic can be found on page 45 of Blackfin_Lndscpe_LCD_EZ_Extender_Manual_Rev.1.0_Aug08 .

 

The manual can be found at   www.analog.com/static/imported-files/eval_kit_manuals/Blackfin_Lndscpe_LCD_EZ_Extender_Manual_Rev.1.0_Aug08.pdf

 

 

 

As can be seen in this, the AUX pin for AD7879 LFCSP_VQ16 (U1)  is LCDBACKLIGHT_EN , which is connected to the pin 1 of IDC3X1_SMT (JP 13) in the Backlight Power System.

 

 

 

From a driver point of view.

 

the __ad7879_disable function in drivers/input/touchscreen/ad7879.c is the following

static void __ad7879_disable(struct ad7879 *ts)

{

disable_irq(ts->irq);

 

if (del_timer_sync(&ts->timer))

ad7879_ts_event_release(ts);

 

ad7879_write(ts, AD7879_REG_CTRL2, AD7879_PM(AD7879_PM_SHUTDOWN));

}

 

This function is called by the ad7879_close function of ad7879.c

 

This __ad7879_disable function manipulates the control register 2 of ad7879 by making it 0. Hence the "GPIO EN" bit gets set to zero thereby switching off the backlight.

 

 

 

On another note, a similar issue may occur if we make touchscreen as a loadable module since, ad7879_remove() funtion of the driver calls ad7879_gpio_remove() function, thereby disabling the gpio.

 

Regards,

Shekhar

QuoteReplyEditDelete

 

 

2011-08-01 07:44:49     Re: Backlight of LQ035Q1 switches off when closingAD7879

Michael Hennerich (GERMANY)

Message: 102749    You're right input close shouldn't effect the GPIOLIB functionality of

the part.

 

Can you try this?

 

diff --git a/drivers/input/touchscreen/ad7879.c

b/drivers/input/touchscreen/ad7879.c

index bc3b518..844e305 100644

--- a/drivers/input/touchscreen/ad7879.c

+++ b/drivers/input/touchscreen/ad7879.c

@@ -249,12 +249,14 @@ static void __ad7879_enable(struct ad7879 *ts)

 

static void __ad7879_disable(struct ad7879 *ts)

{

+ u16 reg = (ts->cmd_crtl2 & ~AD7879_PM(-1)) |

+ AD7879_PM(AD7879_PM_SHUTDOWN);

disable_irq(ts->irq);

 

if (del_timer_sync(&ts->timer))

ad7879_ts_event_release(ts);

 

- ad7879_write(ts, AD7879_REG_CTRL2, AD7879_PM(AD7879_PM_SHUTDOWN));

+ ad7879_write(ts, AD7879_REG_CTRL2, reg);

}

 

Let me know if this fixes all your problems.

 

Regarding module remove - it's expected that the GPIOLIB functionality

is also removed.

So nothing needs to be done here.

 

-Michael

QuoteReplyEditDelete

 

 

2011-08-02 07:34:05     Re: Backlight of LQ035Q1 switches off when closingAD7879

Chandrashekhar Lavania (INDIA)

Message: 102784   

 

Hi Michael,

 

Thanks a lot.

 

The displayed image no longer goes off when a close command is issued on the file handle of my touchscreen.

 

 

 

Although if the fbcon module is not built as a pre-loaded module, then my display image vanishes shortly after being displayed unless I put it in a loop.

 

The video_test works fine since the draw_lissajous() function contains an infinite loop.

 

 

 

If the fbcon module is pre loaded then it all works fine.

 

 

 

Regards,

 

Shekhar

Attachments

    Outcomes