Here's my own implementation:
CODE
typedef struct { unsigned char id,addr,data;} i2cw;
typedef struct { unsigned char id,addr,*pdata;} i2cr;
void gp2x_i2c_write(unsigned char addr, unsigned char data)
{
i2cw a = {.id = 0x8A, .addr = addr, .data = data};
ioctl(handle, _IOW('v', 0x00, i2cw)...