return sprintf(buf, "%s\n", lcd_debug_tcon_usage_str);
}
+static ssize_t lcd_tcon_status_show(struct class *class,
+ struct class_attribute *attr, char *buf)
+{
+ struct aml_lcd_drv_s *lcd_drv = aml_lcd_get_driver();
+
+ return sprintf(buf, "%d\n", lcd_drv->tcon_status);
+}
+
static ssize_t lcd_ttl_debug_store(struct class *class,
struct class_attribute *attr, const char *buf, size_t count)
{
lcd_phy_debug_show, lcd_phy_debug_store),
__ATTR(tcon, 0644,
lcd_tcon_debug_show, lcd_tcon_debug_store),
+ __ATTR(tcon_status, 0644,
+ lcd_tcon_status_show, NULL),
__ATTR(null, 0644, NULL, NULL),
};
lcd_phy_debug_show, lcd_phy_debug_store),
__ATTR(tcon, 0644,
lcd_tcon_debug_show, lcd_tcon_debug_store),
+ __ATTR(tcon_status, 0644,
+ lcd_tcon_status_show, NULL),
__ATTR(null, 0644, NULL, NULL),
};
static int lcd_tcon_enable_tl1(struct lcd_config_s *pconf)
{
+ struct aml_lcd_drv_s *lcd_drv = aml_lcd_get_driver();
unsigned int n = 10;
int ret;
}
}
+ if (lcd_tcon_getb_byte(0x23d, 0, 1))
+ lcd_drv->tcon_status = 3;
+ else
+ lcd_drv->tcon_status = 0;
+
/* step 3: tcon_top_output_set */
lcd_tcon_write(TCON_OUT_CH_SEL0, 0x76543210);
lcd_tcon_write(TCON_OUT_CH_SEL1, 0xba98);
}
if (lcd_tcon_data == NULL)
return 0;
+ if (lcd_tcon_data->tcon_valid == 0)
+ return 0;
+ if (lcd_tcon_getb_byte(0x23d, 0, 1))
+ lcd_drv->tcon_status = 3;
+ else
+ lcd_drv->tcon_status = 0;
/* init reserved memory */
ret = of_reserved_mem_device_init(lcd_drv->dev);
if (ret) {