static ssize_t MHD_check_read(struct device *dev,
                              struct device_attribute *attr, char *buf)
{
    int count;
    int res;
    /*TVout_LDO_ctrl(true);*/
    if (!MHD_HW_IsOn()) {
        sii9234_tpi_init();
        res = MHD_Read_deviceID();
        MHD_HW_Off();
    } else {
        sii9234_tpi_init();
        res = MHD_Read_deviceID();
    }

    count = sprintf(buf, "%d\n", res);
    /*TVout_LDO_ctrl(false);*/
    return count;
}
예제 #2
0
static ssize_t MHD_check_read(struct device *dev, struct device_attribute *attr, char *buf)
{
	int count;
	int res;
	#if 0

	s3c_gpio_setpull(GPIO_MHL_SEL, S3C_GPIO_PULL_UP);	//MHL_SEL

	gpio_set_value(GPIO_MHL_SEL, 1);
	

	//TVout_LDO_ctrl(true);
	
	if(!MHD_HW_IsOn())
	{
		sii9234_tpi_init();
		res = MHD_Read_deviceID();
		MHD_HW_Off();		
	}
	else
	{
		sii9234_tpi_init();
		res = MHD_Read_deviceID();
	}

	I2C_WriteByte(0x72, 0xA5, 0xE1);
	res = 0;
	res = I2C_ReadByte(0x72, 0xA5);

	printk("A5 res %x",res);

	res = 0;
	res = I2C_ReadByte(0x72, 0x1B);

	printk("Device ID res %x",res);

	res = 0;
	res = I2C_ReadByte(0x72, 0x1C);

	printk("Device Rev ID res %x",res);

	res = 0;
	res = I2C_ReadByte(0x72, 0x1D);

	printk("Device Reserved ID res %x",res);

	printk("\n####HDMI_EN1 %x MHL_RST %x GPIO_MHL_SEL %x\n",gpio_get_value(GPIO_HDMI_EN1),gpio_get_value(GPIO_MHL_RST),gpio_get_value(GPIO_MHL_SEL));

	res = I2C_ReadByte(0x7A, 0x3D);

	res = I2C_ReadByte(0x7A, 0xFF);
		
	s3c_gpio_setpull(GPIO_MHL_SEL, S3C_GPIO_PULL_NONE);	//MHL_SEL

	gpio_set_value(GPIO_MHL_SEL, 0);

#endif
	count = sprintf(buf,"%d\n", res );
	//TVout_LDO_ctrl(false);
	return count;
}