Lines Matching refs:client
153 struct bbc_i2c_client *client; in bbc_i2c_attach() local
157 client = kmalloc(sizeof(*client), GFP_KERNEL); in bbc_i2c_attach()
158 if (!client) in bbc_i2c_attach()
160 memset(client, 0, sizeof(*client)); in bbc_i2c_attach()
161 client->bp = bp; in bbc_i2c_attach()
162 client->echild = echild; in bbc_i2c_attach()
163 client->bus = echild->resource[0].start; in bbc_i2c_attach()
164 client->address = echild->resource[1].start; in bbc_i2c_attach()
168 return client; in bbc_i2c_attach()
171 void bbc_i2c_detach(struct bbc_i2c_client *client) in bbc_i2c_detach() argument
173 struct bbc_i2c_bus *bp = client->bp; in bbc_i2c_detach()
174 struct linux_ebus_child *echild = client->echild; in bbc_i2c_detach()
177 kfree(client); in bbc_i2c_detach()
206 int bbc_i2c_writeb(struct bbc_i2c_client *client, unsigned char val, int off) in bbc_i2c_writeb() argument
208 struct bbc_i2c_bus *bp = client->bp; in bbc_i2c_writeb()
209 int address = client->address; in bbc_i2c_writeb()
214 writeb(client->bus, bp->i2c_bussel_reg); in bbc_i2c_writeb()
237 int bbc_i2c_readb(struct bbc_i2c_client *client, unsigned char *byte, int off) in bbc_i2c_readb() argument
239 struct bbc_i2c_bus *bp = client->bp; in bbc_i2c_readb()
240 unsigned char address = client->address, status; in bbc_i2c_readb()
244 writeb(client->bus, bp->i2c_bussel_reg); in bbc_i2c_readb()
286 int bbc_i2c_write_buf(struct bbc_i2c_client *client, in bbc_i2c_write_buf() argument
292 int err = bbc_i2c_writeb(client, *buf, off); in bbc_i2c_write_buf()
306 int bbc_i2c_read_buf(struct bbc_i2c_client *client, in bbc_i2c_read_buf() argument
312 int err = bbc_i2c_readb(client, buf, off); in bbc_i2c_read_buf()