From: shaochan.liu Date: Wed, 28 Aug 2019 05:33:16 +0000 (+0800) Subject: lcd: add lcd status for detect VBO LOCKN and VBO HPDN work properly [1/1] X-Git-Tag: hardkernel-4.9.236-104~709 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=551936abc18b0b7b5633ef594911ce5b097aa9ab;p=platform%2Fkernel%2Flinux-amlogic.git lcd: add lcd status for detect VBO LOCKN and VBO HPDN work properly [1/1] PD#TV-9186 Problem: need provide interfaces for detect VBO LOCKN and VBO HPDN work properly. Solution: add lcd status for detect VBO LOCKN and VBO HPDN work properly Verify: t962x2_x301 Change-Id: I1f441a42f656205ef2ec15429c883ffc67e60a95 Signed-off-by: shaochan.liu --- diff --git a/drivers/amlogic/media/vout/lcd/lcd_debug.c b/drivers/amlogic/media/vout/lcd/lcd_debug.c index 16c53c2..1404533 100644 --- a/drivers/amlogic/media/vout/lcd/lcd_debug.c +++ b/drivers/amlogic/media/vout/lcd/lcd_debug.c @@ -3868,6 +3868,14 @@ static ssize_t lcd_phy_debug_store(struct class *class, return count; } +static ssize_t lcd_vx1_status_show(struct class *class, + struct class_attribute *attr, char *buf) +{ + return sprintf(buf, "vbyone status: lockn = %d hpdn = %d\n", + ((lcd_vcbus_read(VBO_STATUS_L) >> 7) & 0x1), + ((lcd_vcbus_read(VBO_STATUS_L) >> 6) & 0x1)); +} + static void lcd_tcon_reg_table_save(char *path, unsigned char *reg_table, unsigned int size) { @@ -4443,6 +4451,8 @@ static struct class_attribute lcd_debug_class_attrs_vbyone[] = { lcd_vx1_debug_show, lcd_vx1_debug_store), __ATTR(phy, 0644, lcd_phy_debug_show, lcd_phy_debug_store), + __ATTR(status, 0644, + lcd_vx1_status_show, NULL), __ATTR(null, 0644, NULL, NULL), };