Beispiel #1
0
static int hub_read_vo_bit(struct i2c_client *client)
{
	int val = 0;

	if(enabled) {
		msleep(1);
		hub_proxi_read_reg(client, 0x00, &val);
	}
	else
		return -EPERM;

	val = val & 0x01 ? 0 : 1; //0:near, 1:far

	printk("[!]%s() read val = %x\n", __func__, val);
	//	hub_proxi_write_reg(client, 0x02, 0x20); // test

	return val;

}
Beispiel #2
0
static int hub_read_vo_bit(struct i2c_client *client)
{
	unsigned char val = 0;

	if(enabled) {
		msleep(1);
		hub_proxi_read_reg(client, 0x00, &val);
	}
	else
		return -EPERM;

	val = val & 0x01 ? 0 : 1; //0:near, 1:far

/* LGE_CHANGE_S, [email protected], 2011-04-06, Disable Proximity Log */
//	printk("[!]%s() read val = %x\n", __func__, val);
/* LGE_CHANGE_E, [email protected], 2011-04-06, Disable Proximity Log */
	//	hub_proxi_write_reg(client, 0x02, 0x20); // test

	return val;

}