static void __init thunderg_init_i2c_prox_ecom(int bus_num)
{
	proxi_ecom_i2c_device.id = bus_num;

	init_gpio_i2c_pin(&proxi_ecom_i2c_pdata, proxi_ecom_i2c_pin[0], &prox_ecom_i2c_bdinfo[0]);
	init_gpio_i2c_pin(&proxi_ecom_i2c_pdata, proxi_ecom_i2c_pin[1], &prox_ecom_i2c_bdinfo[1]);

	i2c_register_board_info(bus_num, &prox_ecom_i2c_bdinfo[0], 2);
	platform_device_register(&proxi_ecom_i2c_device);
}
static void __init victor_init_i2c_ecom_accel_proxi(int bus_num)
{
	ecom_accel_proxi_i2c_device.id = 15;

	//init_gpio_i2c_pin(&ecom_accel_proxi_i2c_pdata, ecom_accel_proxi_i2c_pin[0], &ecom_accel_proxi_i2c_bdinfo[1]);
	init_gpio_i2c_pin(&ecom_accel_proxi_i2c_pdata, ecom_accel_proxi_i2c_pin[0], &ecom_accel_proxi_i2c_bdinfo[0]);
	init_gpio_i2c_pin(&ecom_accel_proxi_i2c_pdata, ecom_accel_proxi_i2c_pin[1], &ecom_accel_proxi_i2c_bdinfo[1]);
	init_gpio_i2c_pin(&ecom_accel_proxi_i2c_pdata, ecom_accel_proxi_i2c_pin[2], &ecom_accel_proxi_i2c_bdinfo[2]);
	
	//i2c_register_board_info(15, ecom_accel_proxi_i2c_bdinfo, ARRAY_SIZE(ecom_accel_proxi_i2c_bdinfo));
	i2c_register_board_info(15, &ecom_accel_proxi_i2c_bdinfo[0], 3/*ARRAY_SIZE(ecom_accel_proxi_i2c_bdinfo)*/);
	
	platform_device_register(&ecom_accel_proxi_i2c_device);
}
static void __init thunderg_init_i2c_touch(int bus_num)
{
	ts_i2c_device.id = bus_num;

	init_gpio_i2c_pin(&ts_i2c_pdata, ts_i2c_pin[0],	&ts_i2c_bdinfo[0]);
	i2c_register_board_info(bus_num, &ts_i2c_bdinfo[0], 1);
	platform_device_register(&ts_i2c_device);
}
static void __init gelato_init_i2c_acceleration(int bus_num)
{
	accel_i2c_device.id = bus_num;

	init_gpio_i2c_pin(&accel_i2c_pdata, accel_i2c_pin[0], &accel_i2c_bdinfo[0]);
	i2c_register_board_info(bus_num, &accel_i2c_bdinfo[0], 1);	/* KR3DH */
	platform_device_register(&accel_i2c_device);
}
static void __init gelato_init_i2c_prox(int bus_num)
{
	proxi_i2c_device.id = bus_num;

	init_gpio_i2c_pin(&proxi_i2c_pdata, proxi_i2c_pin[0], &prox_i2c_bdinfo[0]);

	i2c_register_board_info(bus_num, &prox_i2c_bdinfo[0], 1);
	platform_device_register(&proxi_i2c_device);
}
static void __init gelato_init_i2c_ecom(int bus_num)
{
	ecom_i2c_device.id = bus_num;

	init_gpio_i2c_pin(&ecom_i2c_pdata, ecom_i2c_pin[0], &ecom_i2c_bdinfo[0]);

	i2c_register_board_info(bus_num, &ecom_i2c_bdinfo[0], 1);
	platform_device_register(&ecom_i2c_device);
}
void __init jump_init_i2c_backlight(int bus_num)
{
	bl_i2c_device.id = bus_num;
	bl_i2c_bdinfo[0].platform_data = &aat2870bl_data;

	init_gpio_i2c_pin(&bl_i2c_pdata, bl_i2c_pin[0],	&bl_i2c_bdinfo[0]);
	i2c_register_board_info(bus_num, &bl_i2c_bdinfo[0], 1);
	platform_device_register(&bl_i2c_device);
}
static void __init flip_init_i2c_sub_touch(int bus_num)
{	
	printk("[Touch] flip_init_i2c_sub_touch\n");

	sub_ts_i2c_device.id = bus_num;

	init_gpio_i2c_pin(&sub_ts_i2c_pdata, sub_ts_i2c_pin[0],	&sub_ts_i2c_bdinfo[0]);
	i2c_register_board_info(bus_num, &sub_ts_i2c_bdinfo[0], 1);
	platform_device_register(&sub_ts_i2c_device);
}
static void __init gelato_init_i2c_nfc(int bus_num)
{
	int ret;

	gpio_tlmm_config(GPIO_CFG(NFC_GPIO_FRIM, 0, GPIO_CFG_OUTPUT,
				GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA), GPIO_CFG_ENABLE);

	nfc_i2c_device.id = bus_num;
	ret = init_gpio_i2c_pin(&nfc_i2c_pdata, nfc_i2c_pin[0],	&nfc_i2c_bdinfo[0]);
	ret = i2c_register_board_info(bus_num, &nfc_i2c_bdinfo[0], 1);
	platform_device_register(&nfc_i2c_device);
}
Exemple #10
0
static void __init thunderg_init_i2c_acceleration(int bus_num)
{
	accel_i2c_device.id = bus_num;

	init_gpio_i2c_pin(&accel_i2c_pdata, accel_i2c_pin[0], &accel_i2c_bdinfo[0]);

	if(lge_bd_rev >= LGE_REV_11)
		i2c_register_board_info(bus_num, &accel_i2c_bdinfo[1], 1);	/* KR3DH */
	else
		i2c_register_board_info(bus_num, &accel_i2c_bdinfo[0], 1);	/* KR3DM */

	platform_device_register(&accel_i2c_device);
}
static void __init thunderc_init_i2c_acceleration(int bus_num)
{
	accel_i2c_device.id = bus_num;

	init_gpio_i2c_pin(&accel_i2c_pdata, accel_i2c_pin[0], &accel_i2c_bdinfo[0]);

	// LGE_CHANGE [[email protected]] 2010-07-18, check the pcb revision
	//i2c_register_board_info(bus_num, &accel_i2c_bdinfo[0], 2);
	if (lge_bd_rev >= 9) /* KR_3DH >= Rev. 1.1 */
		i2c_register_board_info(bus_num, &accel_i2c_bdinfo[0], 1);
	else
		i2c_register_board_info(bus_num, &accel_i2c_bdinfo[1], 1);
	platform_device_register(&accel_i2c_device);
}