Lines Matching refs:bus_prvdata
60 static int iproc_dump_i2c_regs(struct iproc_i2c *bus_prvdata) in iproc_dump_i2c_regs() argument
62 struct iproc_i2c_regs *base = bus_prvdata->base; in iproc_dump_i2c_regs()
114 static int iproc_dump_i2c_regs(struct iproc_i2c *bus_prvdata) in iproc_dump_i2c_regs() argument
125 static int iproc_i2c_startbusy_wait(struct iproc_i2c *bus_prvdata) in iproc_i2c_startbusy_wait() argument
127 struct iproc_i2c_regs *base = bus_prvdata->base; in iproc_i2c_startbusy_wait()
161 static int iproc_i2c_set_clk_freq(struct iproc_i2c *bus_prvdata) in iproc_i2c_set_clk_freq() argument
163 struct iproc_i2c_regs *base = bus_prvdata->base; in iproc_i2c_set_clk_freq()
168 switch (bus_prvdata->bus_speed) { in iproc_i2c_set_clk_freq()
187 struct iproc_i2c *bus_prvdata = dev_get_priv(bus); in iproc_i2c_init() local
188 struct iproc_i2c_regs *base = bus_prvdata->base; in iproc_i2c_init()
220 iproc_i2c_set_clk_freq(bus_prvdata); in iproc_i2c_init()
229 bus_prvdata->i2c_init_done = 1; in iproc_i2c_init()
231 iproc_dump_i2c_regs(bus_prvdata); in iproc_i2c_init()
248 static void iproc_i2c_write_trans_data(struct iproc_i2c *bus_prvdata, in iproc_i2c_write_trans_data() argument
252 struct iproc_i2c_regs *base = bus_prvdata->base; in iproc_i2c_write_trans_data()
333 static int iproc_i2c_data_send(struct iproc_i2c *bus_prvdata, in iproc_i2c_data_send() argument
337 struct iproc_i2c_regs *base = bus_prvdata->base; in iproc_i2c_data_send()
342 rc = iproc_i2c_startbusy_wait(bus_prvdata); in iproc_i2c_data_send()
350 iproc_i2c_write_trans_data(bus_prvdata, addr, info); in iproc_i2c_data_send()
386 static int iproc_i2c_data_recv(struct iproc_i2c *bus_prvdata, in iproc_i2c_data_recv() argument
391 struct iproc_i2c_regs *base = bus_prvdata->base; in iproc_i2c_data_recv()
396 rc = iproc_i2c_startbusy_wait(bus_prvdata); in iproc_i2c_data_recv()
404 iproc_i2c_write_trans_data(bus_prvdata, addr, info); in iproc_i2c_data_recv()
468 static int i2c_write_byte(struct iproc_i2c *bus_prvdata, in i2c_write_byte() argument
483 rc = iproc_i2c_data_send(bus_prvdata, devaddr, &info); in i2c_write_byte()
497 struct iproc_i2c *bus_prvdata = dev_get_priv(bus); in i2c_write() local
517 if (i2c_write_byte(bus_prvdata, chip, regaddr + i, data[i])) { in i2c_write()
527 static int i2c_read_byte(struct iproc_i2c *bus_prvdata, in i2c_read_byte() argument
543 rc = iproc_i2c_data_recv(bus_prvdata, devaddr, &info, &num_bytes_read); in i2c_read_byte()
557 struct iproc_i2c *bus_prvdata = dev_get_priv(bus); in i2c_read() local
566 if (i2c_read_byte(bus_prvdata, chip, addr + i, &buffer[i])) { in i2c_read()
597 struct iproc_i2c *bus_prvdata = dev_get_priv(bus); in iproc_i2c_probe_chip() local
598 struct iproc_i2c_regs *base = bus_prvdata->base; in iproc_i2c_probe_chip()
606 if (!bus_prvdata->i2c_init_done) in iproc_i2c_probe_chip()
626 iproc_dump_i2c_regs(bus_prvdata); in iproc_i2c_probe_chip()
634 struct iproc_i2c *bus_prvdata = dev_get_priv(bus); in iproc_i2c_set_bus_speed() local
636 bus_prvdata->bus_speed = speed; in iproc_i2c_set_bus_speed()
637 return iproc_i2c_set_clk_freq(bus_prvdata); in iproc_i2c_set_bus_speed()
647 struct iproc_i2c *bus_prvdata = dev_get_priv(bus); in iproc_i2c_get_bus_speed() local
648 struct iproc_i2c_regs *base = bus_prvdata->base; in iproc_i2c_get_bus_speed()
678 struct iproc_i2c *bus_prvdata = dev_get_priv(bus); in iproc_i2c_of_to_plat() local
682 bus_prvdata->base = map_physmem(dev_read_addr(bus), in iproc_i2c_of_to_plat()
686 bus_prvdata->bus_speed = in iproc_i2c_of_to_plat()