mt8173: elm: initialize touchscreen reset gpio

In order to save power in S3, we remove reset gpio setting in kernel.
We still need to initialize touchscreen ic.
Do it by pulling low reset gpio for 500us and then pulling high
in firmware.

BRANCH=none
BUG=chrome-os-partner:55170
TEST=build on elm.

Change-Id: If2ac815c4fd5c5ae15443348a49eb31449b724b1
Signed-off-by: YH Huang <yh.huang@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/360312
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yidi Lin <yidi.lin@mediatek.com>
Reviewed-by: Johnny Chuang <johnny.chuang@emc.com.tw>
This commit is contained in:
YH Huang 2016-07-14 11:49:01 +08:00 committed by chrome-bot
parent 83a4c8ff68
commit f40cc9a22c

View file

@ -66,6 +66,16 @@ static void configure_ext_buck(void)
}
}
static void configure_touchscreen(void)
{
/* Pull low reset gpio for 500us and then pull high */
if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT >= 7) {
gpio_output(PAD_PCM_SYNC, 0);
udelay(500);
gpio_output(PAD_PCM_SYNC, 1);
}
}
static void configure_audio(void)
{
mtcmos_audio_power_on();
@ -252,6 +262,7 @@ static void mainboard_init(device_t dev)
configure_usb();
configure_usb_hub();
configure_ext_buck();
configure_touchscreen();
elog_init();
elog_add_watchdog_reset();