static int s6e8ax0_read_mtp(struct lcd_info *lcd, u8 *mtp_data)
{
	int ret;

	ret = s6e8ax0_read(lcd, LDI_MTP_ADDR, LDI_MTP_LENGTH, mtp_data, 1);

	return ret;
}
static int s6e8ax0_read_ddi_status_reg(struct lcd_info *lcd, u8 *buf)
{
	int ret = 0;
	ret = s6e8ax0_read(lcd, DDI_STATUS_REG, DDI_STATUS_LEN, buf, 0);
	if (!ret)
		dev_info(&lcd->ld->dev, "read failed ddi_status_reg\n");

	return ret;
}
Example #3
0
static int s6e8ax0_read_mtp(struct lcd_info *lcd, u8 *mtp_data)
{
	int ret, i;

	for (i = 0; i < 3; i++)
		ret = s6e8ax0_read(lcd, LDI_MTP_ADDR+i, LDI_MTP_LENGTH, mtp_data, 0);

	return ret;
}
static void s6e8ax0_read_id(struct lcd_info *lcd, u8 *buf)
{
	int ret = 0;

	ret = s6e8ax0_read(lcd, LDI_ID_REG, LDI_ID_LEN, buf, 2);
	if (!ret) {
		lcd->connected = 0;
		dev_info(&lcd->ld->dev, "panel is not connected well\n");
	}
}
static int s6e8ax0_read_mtp(struct lcd_info *lcd, u8 *mtp_data)
{
	int ret;

	unsigned char wbuf[] = {0xFD, LDI_MTP_ADDR};

	s6e8ax0_write(lcd, wbuf, ARRAY_SIZE(wbuf));

	ret = s6e8ax0_read(lcd, 0xFE, LDI_MTP_LENGTH, mtp_data, 0);
	return ret;
}
static ssize_t read_acl_show(struct device *dev,
	struct device_attribute *attr, char *buf)
{
	struct lcd_info *lcd = dev_get_drvdata(dev);
	char *pos = buf;
	char temp[ACL_PARAM_SIZE] = {0,};
	u32 i;

	s6e8ax0_read(lcd, 0xC0, 3, temp, 0);
	pos += sprintf(pos, "0xC0=0x%02x, 0x%02x\n", temp[0], temp[1]);

	s6e8ax0_read(lcd, 0xC1, ACL_PARAM_SIZE, temp, 0);
	for (i = 0; i < ACL_PARAM_SIZE; i++) {
		pos += sprintf(pos, "0x%02x, ", temp[i]);
		if ((i % 5) == 0)
			pos += sprintf(pos, "\n");
	}
	pos += sprintf(pos, "\n");

	return pos - buf;
}
static void s6e8ax0_read_id(struct lcd_info *lcd, u8 *buf)
{
	int ret = 0;
	unsigned char wbuf[] = {0xFD, LDI_ID_REG};

	s6e8ax0_write(lcd, wbuf, ARRAY_SIZE(wbuf));

	ret = s6e8ax0_read(lcd, 0xFE, LDI_ID_LEN, buf, 3);
	if (!ret) {
		lcd->connected = 0;
		dev_info(&lcd->ld->dev, "panel is not connected well\n");
	}
}