static int mmc328x_i2c_rx_data(char *buf, int len)
{
	u8 reg;
	OMAP_GPIO_I2C_RD_DATA i2c_rd_param;
	reg = *buf;
	i2c_rd_param.reg_addr = ®
	i2c_rd_param.reg_len = 1;
	i2c_rd_param.rdata_len = len;
	i2c_rd_param.rdata = buf;
	return omap_gpio_i2c_read(g_client, &i2c_rd_param);
}
Пример #2
0
static int yas_acc_i2c_read(uint8_t slave, uint8_t reg, uint8_t *buf, int len)
{
    OMAP_GPIO_I2C_RD_DATA i2c_rd_param;
    struct yas_acc_private_data *data = yas_acc_get_data();
    
    i2c_rd_param.reg_addr = ®
    i2c_rd_param.reg_len = 1;
    i2c_rd_param.rdata_len = len;
    i2c_rd_param.rdata = buf;
    return omap_gpio_i2c_read(data->client, &i2c_rd_param);
}