/linux/drivers/i2c/busses/ |
A D | i2c-pxa.c | 269 #define _IBMR(i2c) ((i2c)->reg_ibmr) argument 270 #define _IDBR(i2c) ((i2c)->reg_idbr) argument 271 #define _ICR(i2c) ((i2c)->reg_icr) argument 272 #define _ISR(i2c) ((i2c)->reg_isr) argument 353 readl(_ISR(i2c)), readl(_ICR(i2c)), readl(_IBMR(i2c))); in i2c_pxa_show_state() 366 i2c->msg_num, i2c->msg_idx, i2c->msg_ptr); in i2c_pxa_scream_blue_murder() 368 readl(_IBMR(i2c)), readl(_IDBR(i2c)), readl(_ICR(i2c)), in i2c_pxa_scream_blue_murder() 578 writel(readl(_ICR(i2c)) | (i2c->high_mode ? i2c->hs_mask : 0), _ICR(i2c)); in i2c_pxa_do_reset() 914 writel(i2c->msg->buf[i2c->msg_ptr++], _IDBR(i2c)); in i2c_pxa_irq_txempty() 973 i2c->msg->buf[i2c->msg_ptr++] = readl(_IDBR(i2c)); in i2c_pxa_irq_rxfull() [all …]
|
A D | i2c-xiic.c | 173 #define xiic_tx_space(i2c) ((i2c)->tx_msg->len - (i2c)->tx_pos) argument 174 #define xiic_rx_space(i2c) ((i2c)->rx_msg->len - (i2c)->rx_pos) argument 332 i2c->rx_msg->buf[i2c->rx_pos++] = in xiic_read_rx() 357 u16 data = i2c->tx_msg->buf[i2c->tx_pos++]; in xiic_fill_tx_fifo() 399 i2c->tx_msg, i2c->nmsgs); in xiic_process() 477 if (i2c->nmsgs == 1 && !i2c->rx_msg && in xiic_process() 546 if (i2c->tx_msg || i2c->rx_msg) in xiic_busy() 574 struct i2c_msg *msg = i2c->rx_msg = i2c->tx_msg; in xiic_start_recv() 632 ((i2c->nmsgs > 1 || xiic_tx_space(i2c)) ? in xiic_start_send() 754 if (!i2c) in xiic_i2c_probe() [all …]
|
A D | i2c-s3c2410.c | 279 while ((i2c->msg_num != 0) && is_ack(i2c)) { in s3c24xx_i2c_message_start() 354 return i2c->msg_idx >= (i2c->msg_num - 1); in is_lastmsg() 370 return i2c->msg_ptr == i2c->msg->len-1; in is_msglast() 378 return i2c->msg_ptr >= i2c->msg->len; in is_msgend() 423 if (is_lastmsg(i2c) && i2c->msg->len == 0) { in i2c_s3c_irq_nextbyte() 453 byte = i2c->msg->buf[i2c->msg_ptr++]; in i2c_s3c_irq_nextbyte() 492 s3c24xx_i2c_message_start(i2c, i2c->msg); in i2c_s3c_irq_nextbyte() 509 i2c->msg->buf[i2c->msg_ptr++] = byte; in i2c_s3c_irq_nextbyte() 900 delta_f = clk_get_rate(i2c->clk) - i2c->clkrate; in s3c24xx_i2c_cpufreq_transition() 1109 i2c->adap.algo_data = i2c; in s3c24xx_i2c_probe() [all …]
|
A D | i2c-img-scb.c | 637 img_i2c_atomic_op(i2c, i2c->at_cur_cmd, i2c->at_cur_data); in img_i2c_raw_atomic_delay_handler() 671 if (!i2c->at_slave_event || !i2c->at_t_done) in img_i2c_sequence() 744 if (!i2c->at_slave_event || !i2c->at_t_done) in img_i2c_atomic() 784 *i2c->msg.buf = (i2c->line_status & in img_i2c_atomic() 874 img_i2c_transaction_halt(i2c, !i2c->last_msg); in img_i2c_auto() 908 img_i2c_transaction_halt(i2c, !i2c->last_msg); in img_i2c_auto() 1103 img_i2c_transaction_halt(i2c, !i2c->last_msg); in img_i2c_xfer() 1119 img_i2c_transaction_halt(i2c, !i2c->last_msg); in img_i2c_xfer() 1140 return i2c->msg_status ? i2c->msg_status : num; in img_i2c_xfer() 1337 if (!i2c) in img_i2c_probe() [all …]
|
A D | i2c-jz4780.c | 467 *(i2c->rbuf++) = jz4780_i2c_readw(i2c, JZ4780_I2C_DC) in jz4780_i2c_irq() 470 if (i2c->rd_data_xfered == i2c->rd_total_len) { in jz4780_i2c_irq() 476 rd_left = i2c->rd_total_len - i2c->rd_data_xfered; in jz4780_i2c_irq() 484 int cmd_left = i2c->rd_total_len - i2c->rd_cmd_xfered; in jz4780_i2c_irq() 528 if ((i2c->wt_len == 1) && (!i2c->stop_hold) && in jz4780_i2c_irq() 537 if ((!i2c->stop_hold) && (i2c->cdata->version < in jz4780_i2c_irq() 560 src, i2c->cmd, i2c->cmd_buf[i2c->cmd], i2c->data_buf[i2c->cmd]); in jz4780_i2c_txabrt() 609 i2c->cmd, i2c->cmd_buf[i2c->cmd]); in jz4780_i2c_xfer_read() 611 i2c->cmd, i2c->data_buf[i2c->cmd]); in jz4780_i2c_xfer_read() 769 if (!i2c) in jz4780_i2c_probe() [all …]
|
A D | i2c-mt65xx.c | 434 writew(val, i2c->base + i2c->dev_comp->regs[reg]); in mtk_i2c_writew() 536 mtk_i2c_writew(i2c, i2c->ac_timing.inter_clk_div, in mtk_i2c_init_hw() 540 mtk_i2c_writew(i2c, i2c->ac_timing.sda_timing, in mtk_i2c_init_hw() 544 mtk_i2c_writew(i2c, i2c->ac_timing.htiming, in mtk_i2c_init_hw() 547 mtk_i2c_writew(i2c, i2c->ac_timing.ltiming, in mtk_i2c_init_hw() 550 mtk_i2c_writew(i2c, i2c->ac_timing.scl_hl_ratio, in mtk_i2c_init_hw() 554 mtk_i2c_writew(i2c, i2c->ac_timing.sta_stop, in mtk_i2c_init_hw() 556 mtk_i2c_writew(i2c, i2c->ac_timing.hs_sta_stop, in mtk_i2c_init_hw() 1314 i2c->adap.quirks = i2c->dev_comp->quirks; in mtk_i2c_probe() 1329 if (i2c->have_pmic && !i2c->dev_comp->pmic_i2c) in mtk_i2c_probe() [all …]
|
A D | Makefile | 39 i2c-at91-objs := i2c-at91-core.o i2c-at91-master.o 41 i2c-at91-objs += i2c-at91-slave.o 52 i2c-designware-core-y := i2c-designware-common.o 53 i2c-designware-core-y += i2c-designware-master.o 56 i2c-designware-platform-y := i2c-designware-platdrv.o 59 i2c-designware-pci-y := i2c-designware-pcidrv.o 87 i2c-pasemi-objs := i2c-pasemi-core.o i2c-pasemi-pci.o 89 i2c-apple-objs := i2c-pasemi-core.o i2c-pasemi-platform.o 107 i2c-stm32f7-drv-objs := i2c-stm32f7.o i2c-stm32.o 117 i2c-octeon-objs := i2c-octeon-core.o i2c-octeon-platdrv.o [all …]
|
A D | i2c-ocores.c | 91 iowrite8(value, i2c->base + (reg << i2c->reg_shift)); in oc_setreg_8() 96 iowrite16(value, i2c->base + (reg << i2c->reg_shift)); in oc_setreg_16() 116 return ioread8(i2c->base + (reg << i2c->reg_shift)); in oc_getreg_8() 121 return ioread16(i2c->base + (reg << i2c->reg_shift)); in oc_getreg_16() 151 i2c->setreg(i2c, reg, value); in oc_setreg() 156 return i2c->getreg(i2c, reg); in oc_getreg() 194 msg->buf[i2c->pos++] = oc_getreg(i2c, OCI2C_DATA); in ocores_process() 228 oc_setreg(i2c, OCI2C_DATA, msg->buf[i2c->pos++]); in ocores_process() 434 i2c->ip_clock_khz, i2c->bus_clock_khz); in ocores_init() 655 if (!i2c->setreg || !i2c->getreg) { in ocores_i2c_probe() [all …]
|
A D | i2c-digicolor.c | 99 dc_i2c_write_byte(i2c, i2c->msg->buf[i2c->msgbuf_ptr++]); in dc_i2c_write_buf() 104 bool last = (i2c->msgbuf_ptr + 1 == i2c->msg->len); in dc_i2c_next_read() 112 if (i2c->last) in dc_i2c_stop() 125 i2c->msg->buf[i2c->msgbuf_ptr++] = dc_i2c_read_byte(i2c); in dc_i2c_read_buf() 191 if (i2c->msgbuf_ptr < i2c->msg->len) in dc_i2c_irq() 197 if (i2c->msgbuf_ptr < i2c->msg->len) in dc_i2c_irq() 220 i2c->msg = msg; in dc_i2c_xfer_msg() 223 i2c->error = 0; in dc_i2c_xfer_msg() 237 if (i2c->error) in dc_i2c_xfer_msg() 295 if (!i2c) in dc_i2c_probe() [all …]
|
A D | i2c-synquacer.c | 151 return i2c->msg_idx >= (i2c->msg_num - 1); in is_lastmsg() 156 return i2c->msg_ptr == (i2c->msg->len - 1); in is_msglast() 161 return i2c->msg_ptr >= i2c->msg->len; in is_msgend() 332 ret = synquacer_i2c_master_start(i2c, i2c->msg); in synquacer_i2c_doxfer() 394 if (is_lastmsg(i2c) && i2c->msg->len == 0) { in synquacer_i2c_isr() 411 writeb(i2c->msg->buf[i2c->msg_ptr++], in synquacer_i2c_isr() 432 ret = synquacer_i2c_master_start(i2c, i2c->msg); in synquacer_i2c_isr() 444 i2c->msg->buf[i2c->msg_ptr++] = byte; in synquacer_i2c_isr() 476 ret = synquacer_i2c_master_start(i2c, i2c->msg); in synquacer_i2c_isr() 565 i2c->pclkrate = clk_get_rate(i2c->pclk); in synquacer_i2c_probe() [all …]
|
A D | i2c-exynos5.c | 474 len = min(fifo_level, i2c->msg->len - i2c->msg_ptr); in exynos5_i2c_irq() 479 i2c->msg->buf[i2c->msg_ptr++] = byte; in exynos5_i2c_irq() 488 if (len > (i2c->msg->len - i2c->msg_ptr)) { in exynos5_i2c_irq() 493 len = i2c->msg->len - i2c->msg_ptr; in exynos5_i2c_irq() 497 byte = i2c->msg->buf[i2c->msg_ptr++]; in exynos5_i2c_irq() 505 if ((i2c->trans_done && (i2c->msg->len == i2c->msg_ptr)) || in exynos5_i2c_irq() 628 trig_lvl = (i2c->msg->len > i2c->variant->fifo_depth) ? in exynos5_i2c_message_start() 629 (i2c->variant->fifo_depth * 3 / 4) : i2c->msg->len; in exynos5_i2c_message_start() 638 (i2c->variant->fifo_depth * 1 / 4) : i2c->msg->len; in exynos5_i2c_message_start() 748 if (!i2c) in exynos5_i2c_probe() [all …]
|
A D | i2c-meson.c | 206 i2c->count = min(i2c->msg->len - i2c->pos, 8); in meson_i2c_prepare_xfer() 212 if (write || i2c->pos + i2c->count < i2c->msg->len) in meson_i2c_prepare_xfer() 219 meson_i2c_put_data(i2c, i2c->msg->buf + i2c->pos, i2c->count); in meson_i2c_prepare_xfer() 221 if (i2c->last && i2c->pos + i2c->count >= i2c->msg->len) in meson_i2c_prepare_xfer() 224 writel(i2c->tokens[0], i2c->regs + REG_TOK_LIST0); in meson_i2c_prepare_xfer() 241 if (i2c->state == STATE_READ && i2c->count) in meson_i2c_transfer_complete() 242 meson_i2c_get_data(i2c, i2c->msg->buf + i2c->pos, in meson_i2c_transfer_complete() 245 i2c->pos += i2c->count; in meson_i2c_transfer_complete() 247 if (i2c->pos >= i2c->msg->len) in meson_i2c_transfer_complete() 264 i2c->state, i2c->pos, i2c->count, ctrl); in meson_i2c_irq() [all …]
|
A D | i2c-lpc2k.c | 143 if (i2c->msg_idx < i2c->msg->len) { in i2c_lpc2k_pump_msg() 144 writel(i2c->msg->buf[i2c->msg_idx], in i2c_lpc2k_pump_msg() 181 if (i2c->msg_idx < i2c->msg->len) { in i2c_lpc2k_pump_msg() 182 i2c->msg->buf[i2c->msg_idx] = in i2c_lpc2k_pump_msg() 187 if (i2c->msg_idx >= i2c->msg->len - 1 && i2c->is_last) { in i2c_lpc2k_pump_msg() 194 if (i2c->msg_idx >= i2c->msg->len - 1) { in i2c_lpc2k_pump_msg() 203 if (i2c->msg_idx >= i2c->msg->len - 2) { in i2c_lpc2k_pump_msg() 283 if (wait_event_timeout(i2c->wait, i2c->msg_status != -EBUSY, in lpc2k_process_msg() 354 i2c = devm_kzalloc(&pdev->dev, sizeof(*i2c), GFP_KERNEL); in i2c_lpc2k_probe() 355 if (!i2c) in i2c_lpc2k_probe() [all …]
|
A D | i2c-mpc.c | 489 writeccr(i2c, i2c->cntl_bits); in mpc_i2c_finish() 505 msg = &i2c->msgs[i2c->curr_msg]; in mpc_i2c_do_action() 519 writeccr(i2c, i2c->cntl_bits); in mpc_i2c_do_action() 530 writeccr(i2c, i2c->cntl_bits); in mpc_i2c_do_action() 546 writeccr(i2c, i2c->cntl_bits); in mpc_i2c_do_action() 563 writeccr(i2c, i2c->cntl_bits); in mpc_i2c_do_action() 591 if (i2c->curr_msg == i2c->num_msgs) { in mpc_i2c_do_action() 654 time_left = wait_event_timeout(i2c->waitq, !i2c->block, i2c->adap.timeout); in mpc_i2c_wait_for_completion() 679 writeccr(i2c, i2c->cntl_bits); in mpc_i2c_execute_msg() 689 if (i2c->rc == -EIO || i2c->rc == -EAGAIN || i2c->rc == -ETIMEDOUT) in mpc_i2c_execute_msg() [all …]
|
A D | i2c-octeon-core.c | 28 i2c->int_disable(i2c); in octeon_i2c_isr() 63 i2c->int_enable(i2c); in octeon_i2c_wait() 66 i2c->int_disable(i2c); in octeon_i2c_wait() 157 i2c->hlc_int_enable(i2c); in octeon_i2c_hlc_wait() 161 i2c->hlc_int_disable(i2c); in octeon_i2c_hlc_wait() 186 stat = __raw_readq(i2c->twsi_base + SW_TWSI(i2c)); in octeon_i2c_check_status() 427 cmd = __raw_readq(i2c->twsi_base + SW_TWSI(i2c)); in octeon_i2c_hlc_read() 435 cmd = __raw_readq(i2c->twsi_base + SW_TWSI_EXT(i2c)); in octeon_i2c_hlc_read() 480 cmd = __raw_readq(i2c->twsi_base + SW_TWSI(i2c)); in octeon_i2c_hlc_write() 525 cmd = __raw_readq(i2c->twsi_base + SW_TWSI(i2c)); in octeon_i2c_hlc_comp_read() [all …]
|
A D | i2c-mxs.c | 146 writel(i2c->timing0, i2c->regs + MXS_I2C_TIMING0); in mxs_i2c_reset() 147 writel(i2c->timing1, i2c->regs + MXS_I2C_TIMING1); in mxs_i2c_reset() 148 writel(i2c->timing2, i2c->regs + MXS_I2C_TIMING2); in mxs_i2c_reset() 161 dma_unmap_sg(i2c->dev, i2c->sg_io, 2, DMA_TO_DEVICE); in mxs_i2c_dma_finish() 200 sg_init_one(&i2c->sg_io[0], &i2c->addr_data, 1); in mxs_i2c_dma_setup_xfer() 261 sg_set_buf(&i2c->sg_io[0], &i2c->addr_data, 1); in mxs_i2c_dma_setup_xfer() 263 dma_map_sg(i2c->dev, i2c->sg_io, 2, DMA_TO_DEVICE); in mxs_i2c_dma_setup_xfer() 365 writel(data, i2c->regs + MXS_I2C_DATA(i2c)); in mxs_i2c_pio_trigger_write_cmd() 436 data = readl(i2c->regs + MXS_I2C_DATA(i2c)); in mxs_i2c_pio_setup_xfer() 514 i2c->regs + MXS_I2C_DEBUG0_CLR(i2c)); in mxs_i2c_pio_setup_xfer() [all …]
|
A D | i2c-octeon-platdrv.c | 60 enable_irq(i2c->irq); in octeon_i2c_int_enable78() 80 __octeon_i2c_irq_disable(&i2c->int_enable_cnt, i2c->irq); in octeon_i2c_int_disable78() 99 __octeon_i2c_irq_disable(&i2c->hlc_int_enable_cnt, i2c->hlc_irq); in octeon_i2c_hlc_int_disable78() 107 i2c->hlc_int_disable(i2c); in octeon_i2c_hlc_isr78() 108 wake_up(&i2c->queue); in octeon_i2c_hlc_isr78() 158 i2c = devm_kzalloc(&pdev->dev, sizeof(*i2c), GFP_KERNEL); in octeon_i2c_probe() 159 if (!i2c) { in octeon_i2c_probe() 182 dev_err(i2c->dev, in octeon_i2c_probe() 192 i2c->irq = irq; in octeon_i2c_probe() 207 DRV_NAME, i2c); in octeon_i2c_probe() [all …]
|
A D | i2c-rk3x.c | 305 unsigned int len = i2c->msg->len - i2c->processed; in rk3x_i2c_prepare_read() 350 byte = i2c->msg->buf[i2c->processed++]; in rk3x_i2c_fill_transmit_buf() 358 if (i2c->processed == i2c->msg->len) in rk3x_i2c_fill_transmit_buf() 409 if (i2c->processed == i2c->msg->len) in rk3x_i2c_handle_write() 410 rk3x_i2c_stop(i2c, i2c->error); in rk3x_i2c_handle_write() 439 i2c->msg->buf[i2c->processed++] = byte; in rk3x_i2c_handle_read() 443 if (i2c->processed == i2c->msg->len) in rk3x_i2c_handle_read() 444 rk3x_i2c_stop(i2c, i2c->error); in rk3x_i2c_handle_read() 1103 i2c_readl(i2c, REG_IPD), i2c->state); in rk3x_i2c_xfer_common() 1248 i2c->adap.algo_data = i2c; in rk3x_i2c_probe() [all …]
|
A D | i2c-thunderx-pcidrv.c | 92 i2c->clk = NULL; in thunder_i2c_clock_enable() 99 i2c->sys_freq = clk_get_rate(i2c->clk); in thunder_i2c_clock_enable() 106 if (!i2c->sys_freq) in thunder_i2c_clock_enable() 130 ara = i2c_new_smbus_alert_device(&i2c->adap, &i2c->alert_data); in thunder_i2c_smbus_setup_of() 134 i2c->ara = ara; in thunder_i2c_smbus_setup_of() 161 i2c = devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL); in thunder_i2c_probe_pci() 162 if (!i2c) in thunder_i2c_probe_pci() 169 i2c->dev = dev; in thunder_i2c_probe_pci() 216 snprintf(i2c->adap.name, sizeof(i2c->adap.name), in thunder_i2c_probe_pci() 218 i2c_set_adapdata(&i2c->adap, i2c); in thunder_i2c_probe_pci() [all …]
|
A D | i2c-pca-platform.c | 83 if (i2c->irq) { in i2c_pca_pf_waitforcompletion() 85 i2c->algo_data.read_byte(i2c, I2C_PCA_CON) in i2c_pca_pf_waitforcompletion() 92 if (i2c->algo_data.read_byte(i2c, I2C_PCA_CON) in i2c_pca_pf_waitforcompletion() 122 if ((i2c->algo_data.read_byte(i2c, I2C_PCA_CON) & I2C_PCA_CON_SI) == 0) in i2c_pca_pf_handler() 146 i2c = devm_kzalloc(&pdev->dev, sizeof(*i2c), GFP_KERNEL); in i2c_pca_pf_probe() 147 if (!i2c) in i2c_pca_pf_probe() 157 i2c->irq = irq; in i2c_pca_pf_probe() 161 snprintf(i2c->adap.name, sizeof(i2c->adap.name), in i2c_pca_pf_probe() 164 i2c->adap.algo_data = &i2c->algo_data; in i2c_pca_pf_probe() 183 i2c->algo_data.data = i2c; in i2c_pca_pf_probe() [all …]
|
A D | .built-in.a.cmd | 1 …i2c/busses/built-in.a := echo >/dev/null; rm -f drivers/i2c/busses/built-in.a; /usr/bin/ccache /ho…
|
A D | i2c-mt7621.c | 102 dev_dbg(i2c->dev, in mtk_i2c_dump_reg() 141 struct mtk_i2c *i2c; in mtk_i2c_master_xfer() local 239 mtk_i2c_reset(i2c); in mtk_i2c_master_xfer() 262 i2c->clk_div = clk_get_rate(i2c->clk) / i2c->bus_freq - 1; in mtk_i2c_init() 264 i2c->clk_div = 99; in mtk_i2c_init() 268 mtk_i2c_reset(i2c); in mtk_i2c_init() 274 struct mtk_i2c *i2c; in mtk_i2c_probe() local 281 if (!i2c) in mtk_i2c_probe() 302 &i2c->bus_freq)) in mtk_i2c_probe() 310 adap = &i2c->adap; in mtk_i2c_probe() [all …]
|
/linux/drivers/media/pci/netup_unidvb/ |
A D | netup_unidvb_i2c.c | 136 u32 msg_length = i2c->msg->len - i2c->xmit_size; in netup_i2c_fifo_tx() 140 data = i2c->msg->buf[i2c->xmit_size++]; in netup_i2c_fifo_tx() 145 if (i2c->xmit_size < i2c->msg->len) { in netup_i2c_fifo_tx() 163 i2c->xmit_size < i2c->msg->len) { in netup_i2c_fifo_rx() 164 i2c->msg->buf[i2c->xmit_size++] = data; in netup_i2c_fifo_rx() 169 if (i2c->xmit_size < i2c->msg->len) { in netup_i2c_fifo_rx() 183 writew(i2c->msg->len, &i2c->regs->length); in netup_i2c_start_xfer() 235 i2c->xmit_size != i2c->msg->len) in netup_i2c_xfer() 306 i2c = &ndev->i2c[bus_num]; in netup_i2c_init() 314 i2c_set_adapdata(&i2c->adap, i2c); in netup_i2c_init() [all …]
|
/linux/drivers/media/pci/ddbridge/ |
A D | ddbridge-i2c.c | 51 dev->nr, i2c->nr, i2c->link); in ddb_i2c_cmd() 56 if (i2c->link) { in ddb_i2c_cmd() 123 i2c->rbuf, in ddb_i2c_master_xfer() 148 i2c = &dev->i2c[i]; in ddb_i2c_release() 166 i2c->nr = i; in ddb_i2c_add() 167 i2c->dev = dev; in ddb_i2c_add() 168 i2c->link = link; in ddb_i2c_add() 172 i2c->rbuf = i2c->wbuf; /* + i2c->bsize / 2 */ in ddb_i2c_add() 174 (regmap->i2c->base + regmap->i2c->size * i); in ddb_i2c_add() 215 i2c = &dev->i2c[num]; in ddb_i2c_init() [all …]
|
/linux/arch/arm/boot/dts/ |
A D | aspeed-bmc-facebook-cmm.dts | 331 i2c-switch@77 { 339 imux16: i2c@0 { 344 i2c-switch@70 { 393 i2c-switch@73 { 444 imux17: i2c@1 { 549 imux18: i2c@2 { 654 imux19: i2c@3 { 759 imux20: i2c@4 { 864 imux21: i2c@5 { 1186 i2c-switch@71 { [all …]
|