/drivers/i2c/busses/ |
D | i2c-pxa.c | 272 #define _IBMR(i2c) ((i2c)->reg_ibmr) argument 273 #define _IDBR(i2c) ((i2c)->reg_idbr) argument 274 #define _ICR(i2c) ((i2c)->reg_icr) argument 275 #define _ISR(i2c) ((i2c)->reg_isr) argument 276 #define _ISAR(i2c) ((i2c)->reg_isar) argument 277 #define _ILCR(i2c) ((i2c)->reg_ilcr) argument 278 #define _IWCR(i2c) ((i2c)->reg_iwcr) argument 353 static void i2c_pxa_show_state(struct pxa_i2c *i2c, int lno, const char *fname) in i2c_pxa_show_state() argument 355 dev_dbg(&i2c->adap.dev, "state:%s:%d: ISR=%08x, ICR=%08x, IBMR=%02x\n", fname, lno, in i2c_pxa_show_state() 356 readl(_ISR(i2c)), readl(_ICR(i2c)), readl(_IBMR(i2c))); in i2c_pxa_show_state() [all …]
|
D | i2c-xiic.c | 170 #define xiic_tx_space(i2c) ((i2c)->tx_msg->len - (i2c)->tx_pos) argument 171 #define xiic_rx_space(i2c) ((i2c)->rx_msg->len - (i2c)->rx_pos) argument 173 static int xiic_start_xfer(struct xiic_i2c *i2c); 174 static void __xiic_start_xfer(struct xiic_i2c *i2c); 184 static inline void xiic_setreg8(struct xiic_i2c *i2c, int reg, u8 value) in xiic_setreg8() argument 186 if (i2c->endianness == LITTLE) in xiic_setreg8() 187 iowrite8(value, i2c->base + reg); in xiic_setreg8() 189 iowrite8(value, i2c->base + reg + 3); in xiic_setreg8() 192 static inline u8 xiic_getreg8(struct xiic_i2c *i2c, int reg) in xiic_getreg8() argument 196 if (i2c->endianness == LITTLE) in xiic_getreg8() [all …]
|
D | i2c-s3c2410.c | 140 static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat); 170 static inline void s3c24xx_i2c_master_complete(struct s3c24xx_i2c *i2c, int ret) in s3c24xx_i2c_master_complete() argument 172 dev_dbg(i2c->dev, "master_complete %d\n", ret); in s3c24xx_i2c_master_complete() 174 i2c->msg_ptr = 0; in s3c24xx_i2c_master_complete() 175 i2c->msg = NULL; in s3c24xx_i2c_master_complete() 176 i2c->msg_idx++; in s3c24xx_i2c_master_complete() 177 i2c->msg_num = 0; in s3c24xx_i2c_master_complete() 179 i2c->msg_idx = ret; in s3c24xx_i2c_master_complete() 181 if (!(i2c->quirks & QUIRK_POLL)) in s3c24xx_i2c_master_complete() 182 wake_up(&i2c->wait); in s3c24xx_i2c_master_complete() [all …]
|
D | i2c-img-scb.c | 414 static void img_i2c_writel(struct img_i2c *i2c, u32 offset, u32 value) in img_i2c_writel() argument 416 writel(value, i2c->base + offset); in img_i2c_writel() 419 static u32 img_i2c_readl(struct img_i2c *i2c, u32 offset) in img_i2c_readl() argument 421 return readl(i2c->base + offset); in img_i2c_readl() 436 static void img_i2c_wr_rd_fence(struct img_i2c *i2c) in img_i2c_wr_rd_fence() argument 438 if (i2c->need_wr_rd_fence) { in img_i2c_wr_rd_fence() 439 img_i2c_writel(i2c, SCB_CORE_REV_REG, 0); in img_i2c_wr_rd_fence() 440 img_i2c_writel(i2c, SCB_CORE_REV_REG, 0); in img_i2c_wr_rd_fence() 444 static void img_i2c_switch_mode(struct img_i2c *i2c, enum img_i2c_mode mode) in img_i2c_switch_mode() argument 446 i2c->mode = mode; in img_i2c_switch_mode() [all …]
|
D | i2c-jz4780.c | 171 static inline unsigned short jz4780_i2c_readw(struct jz4780_i2c *i2c, in jz4780_i2c_readw() argument 174 return readw(i2c->iomem + offset); in jz4780_i2c_readw() 177 static inline void jz4780_i2c_writew(struct jz4780_i2c *i2c, in jz4780_i2c_writew() argument 180 writew(val, i2c->iomem + offset); in jz4780_i2c_writew() 183 static int jz4780_i2c_disable(struct jz4780_i2c *i2c) in jz4780_i2c_disable() argument 188 jz4780_i2c_writew(i2c, JZ4780_I2C_ENB, 0); in jz4780_i2c_disable() 191 regval = jz4780_i2c_readw(i2c, JZ4780_I2C_ENSTA); in jz4780_i2c_disable() 198 dev_err(&i2c->adap.dev, "disable failed: ENSTA=0x%04x\n", regval); in jz4780_i2c_disable() 202 static int jz4780_i2c_enable(struct jz4780_i2c *i2c) in jz4780_i2c_enable() argument 207 jz4780_i2c_writew(i2c, JZ4780_I2C_ENB, 1); in jz4780_i2c_enable() [all …]
|
D | i2c-ocores.c | 49 void (*setreg)(struct ocores_i2c *i2c, int reg, u8 value); 50 u8 (*getreg)(struct ocores_i2c *i2c, int reg); 89 static void oc_setreg_8(struct ocores_i2c *i2c, int reg, u8 value) in oc_setreg_8() argument 91 iowrite8(value, i2c->base + (reg << i2c->reg_shift)); in oc_setreg_8() 94 static void oc_setreg_16(struct ocores_i2c *i2c, int reg, u8 value) in oc_setreg_16() argument 96 iowrite16(value, i2c->base + (reg << i2c->reg_shift)); in oc_setreg_16() 99 static void oc_setreg_32(struct ocores_i2c *i2c, int reg, u8 value) in oc_setreg_32() argument 101 iowrite32(value, i2c->base + (reg << i2c->reg_shift)); in oc_setreg_32() 104 static void oc_setreg_16be(struct ocores_i2c *i2c, int reg, u8 value) in oc_setreg_16be() argument 106 iowrite16be(value, i2c->base + (reg << i2c->reg_shift)); in oc_setreg_16be() [all …]
|
D | i2c-digicolor.c | 71 static void dc_i2c_cmd(struct dc_i2c *i2c, u8 cmd) in dc_i2c_cmd() argument 73 writeb_relaxed(cmd | II_COMMAND_GO, i2c->regs + II_COMMAND); in dc_i2c_cmd() 86 static void dc_i2c_data(struct dc_i2c *i2c, u8 data) in dc_i2c_data() argument 88 writeb_relaxed(data, i2c->regs + II_DATA); in dc_i2c_data() 91 static void dc_i2c_write_byte(struct dc_i2c *i2c, u8 byte) in dc_i2c_write_byte() argument 93 dc_i2c_data(i2c, byte); in dc_i2c_write_byte() 94 dc_i2c_cmd(i2c, II_CMD_SEND_ACK); in dc_i2c_write_byte() 97 static void dc_i2c_write_buf(struct dc_i2c *i2c) in dc_i2c_write_buf() argument 99 dc_i2c_write_byte(i2c, i2c->msg->buf[i2c->msgbuf_ptr++]); in dc_i2c_write_buf() 102 static void dc_i2c_next_read(struct dc_i2c *i2c) in dc_i2c_next_read() argument [all …]
|
D | i2c-synquacer.c | 149 static inline int is_lastmsg(struct synquacer_i2c *i2c) in is_lastmsg() argument 151 return i2c->msg_idx >= (i2c->msg_num - 1); in is_lastmsg() 154 static inline int is_msglast(struct synquacer_i2c *i2c) in is_msglast() argument 156 return i2c->msg_ptr == (i2c->msg->len - 1); in is_msglast() 159 static inline int is_msgend(struct synquacer_i2c *i2c) in is_msgend() argument 161 return i2c->msg_ptr >= i2c->msg->len; in is_msgend() 164 static inline unsigned long calc_timeout_ms(struct synquacer_i2c *i2c, in calc_timeout_ms() argument 177 static void synquacer_i2c_stop(struct synquacer_i2c *i2c, int ret) in synquacer_i2c_stop() argument 184 writeb(0, i2c->base + SYNQUACER_I2C_REG_BCR); in synquacer_i2c_stop() 186 i2c->state = STATE_IDLE; in synquacer_i2c_stop() [all …]
|
D | Makefile | 7 obj-$(CONFIG_I2C_SCMI) += i2c-scmi.o 10 obj-$(CONFIG_I2C_ALI1535) += i2c-ali1535.o 11 obj-$(CONFIG_I2C_ALI1563) += i2c-ali1563.o 12 obj-$(CONFIG_I2C_ALI15X3) += i2c-ali15x3.o 13 obj-$(CONFIG_I2C_AMD756) += i2c-amd756.o 14 obj-$(CONFIG_I2C_AMD756_S4882) += i2c-amd756-s4882.o 15 obj-$(CONFIG_I2C_AMD8111) += i2c-amd8111.o 16 obj-$(CONFIG_I2C_CHT_WC) += i2c-cht-wc.o 17 obj-$(CONFIG_I2C_I801) += i2c-i801.o 18 obj-$(CONFIG_I2C_ISCH) += i2c-isch.o [all …]
|
D | i2c-exynos5.c | 250 static void exynos5_i2c_clr_pend_irq(struct exynos5_i2c *i2c) in exynos5_i2c_clr_pend_irq() argument 252 writel(readl(i2c->regs + HSI2C_INT_STATUS), in exynos5_i2c_clr_pend_irq() 253 i2c->regs + HSI2C_INT_STATUS); in exynos5_i2c_clr_pend_irq() 266 static int exynos5_i2c_set_timing(struct exynos5_i2c *i2c, bool hs_timings) in exynos5_i2c_set_timing() argument 278 unsigned int clkin = clk_get_rate(i2c->clk); in exynos5_i2c_set_timing() 279 unsigned int op_clk = hs_timings ? i2c->op_clock : in exynos5_i2c_set_timing() 280 (i2c->op_clock >= I2C_MAX_FAST_MODE_PLUS_FREQ) ? I2C_MAX_STANDARD_MODE_FREQ : in exynos5_i2c_set_timing() 281 i2c->op_clock; in exynos5_i2c_set_timing() 299 t_ftl_cycle = (readl(i2c->regs + HSI2C_CONF) >> 16) & 0x7; in exynos5_i2c_set_timing() 301 if (i2c->variant->hw != I2C_TYPE_EXYNOS7) in exynos5_i2c_set_timing() [all …]
|
D | i2c-mpc.c | 111 void (*setup)(struct device_node *node, struct mpc_i2c *i2c, u32 clock); 114 static inline void writeccr(struct mpc_i2c *i2c, u32 x) in writeccr() argument 116 writeb(x, i2c->base + MPC_I2C_CR); in writeccr() 124 static void mpc_i2c_fixup(struct mpc_i2c *i2c) in mpc_i2c_fixup() argument 130 writeccr(i2c, 0); in mpc_i2c_fixup() 131 writeb(0, i2c->base + MPC_I2C_SR); /* clear any status bits */ in mpc_i2c_fixup() 132 writeccr(i2c, CCR_MEN | CCR_MSTA); /* START */ in mpc_i2c_fixup() 133 readb(i2c->base + MPC_I2C_DR); /* init xfer */ in mpc_i2c_fixup() 136 writeccr(i2c, CCR_MEN | CCR_MSTA | CCR_RSTA); /* delay SDA */ in mpc_i2c_fixup() 137 readb(i2c->base + MPC_I2C_DR); in mpc_i2c_fixup() [all …]
|
D | i2c-meson.c | 109 static void meson_i2c_set_mask(struct meson_i2c *i2c, int reg, u32 mask, in meson_i2c_set_mask() argument 114 data = readl(i2c->regs + reg); in meson_i2c_set_mask() 117 writel(data, i2c->regs + reg); in meson_i2c_set_mask() 120 static void meson_i2c_reset_tokens(struct meson_i2c *i2c) in meson_i2c_reset_tokens() argument 122 i2c->tokens[0] = 0; in meson_i2c_reset_tokens() 123 i2c->tokens[1] = 0; in meson_i2c_reset_tokens() 124 i2c->num_tokens = 0; in meson_i2c_reset_tokens() 127 static void meson_i2c_add_token(struct meson_i2c *i2c, int token) in meson_i2c_add_token() argument 129 if (i2c->num_tokens < 8) in meson_i2c_add_token() 130 i2c->tokens[0] |= (token & 0xf) << (i2c->num_tokens * 4); in meson_i2c_add_token() [all …]
|
D | i2c-lpc2k.c | 84 static void i2c_lpc2k_reset(struct lpc2k_i2c *i2c) in i2c_lpc2k_reset() argument 87 writel(LPC24XX_CLEAR_ALL, i2c->base + LPC24XX_I2CONCLR); in i2c_lpc2k_reset() 88 writel(0, i2c->base + LPC24XX_I2ADDR); in i2c_lpc2k_reset() 89 writel(LPC24XX_I2EN, i2c->base + LPC24XX_I2CONSET); in i2c_lpc2k_reset() 92 static int i2c_lpc2k_clear_arb(struct lpc2k_i2c *i2c) in i2c_lpc2k_clear_arb() argument 100 writel(LPC24XX_STO, i2c->base + LPC24XX_I2CONSET); in i2c_lpc2k_clear_arb() 103 while (readl(i2c->base + LPC24XX_I2STAT) != M_I2C_IDLE) { in i2c_lpc2k_clear_arb() 106 i2c_lpc2k_reset(i2c); in i2c_lpc2k_clear_arb() 116 static void i2c_lpc2k_pump_msg(struct lpc2k_i2c *i2c) in i2c_lpc2k_pump_msg() argument 125 status = readl(i2c->base + LPC24XX_I2STAT); in i2c_lpc2k_pump_msg() [all …]
|
D | i2c-octeon-core.c | 26 struct octeon_i2c *i2c = dev_id; in octeon_i2c_isr() local 28 i2c->int_disable(i2c); in octeon_i2c_isr() 29 wake_up(&i2c->queue); in octeon_i2c_isr() 34 static bool octeon_i2c_test_iflg(struct octeon_i2c *i2c) in octeon_i2c_test_iflg() argument 36 return (octeon_i2c_ctl_read(i2c) & TWSI_CTL_IFLG); in octeon_i2c_test_iflg() 45 static int octeon_i2c_wait(struct octeon_i2c *i2c) in octeon_i2c_wait() argument 53 if (i2c->broken_irq_mode) { in octeon_i2c_wait() 54 u64 end = get_jiffies_64() + i2c->adap.timeout; in octeon_i2c_wait() 56 while (!octeon_i2c_test_iflg(i2c) && in octeon_i2c_wait() 60 return octeon_i2c_test_iflg(i2c) ? 0 : -ETIMEDOUT; in octeon_i2c_wait() [all …]
|
D | i2c-mt65xx.c | 421 static u16 mtk_i2c_readw(struct mtk_i2c *i2c, enum I2C_REGS_OFFSET reg) in mtk_i2c_readw() argument 423 return readw(i2c->base + i2c->dev_comp->regs[reg]); in mtk_i2c_readw() 426 static void mtk_i2c_writew(struct mtk_i2c *i2c, u16 val, in mtk_i2c_writew() argument 429 writew(val, i2c->base + i2c->dev_comp->regs[reg]); in mtk_i2c_writew() 432 static int mtk_i2c_clock_enable(struct mtk_i2c *i2c) in mtk_i2c_clock_enable() argument 436 ret = clk_prepare_enable(i2c->clk_dma); in mtk_i2c_clock_enable() 440 ret = clk_prepare_enable(i2c->clk_main); in mtk_i2c_clock_enable() 444 if (i2c->have_pmic) { in mtk_i2c_clock_enable() 445 ret = clk_prepare_enable(i2c->clk_pmic); in mtk_i2c_clock_enable() 450 if (i2c->clk_arb) { in mtk_i2c_clock_enable() [all …]
|
D | i2c-mxs.c | 70 #define MXS_I2C_DATA(i2c) ((i2c->dev_type == MXS_I2C_V1) ? 0x60 : 0xa0) argument 72 #define MXS_I2C_DEBUG0_CLR(i2c) ((i2c->dev_type == MXS_I2C_V1) ? 0x78 : 0xb8) argument 133 static int mxs_i2c_reset(struct mxs_i2c_dev *i2c) in mxs_i2c_reset() argument 135 int ret = stmp_reset_block(i2c->regs); in mxs_i2c_reset() 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() 150 writel(MXS_I2C_IRQ_MASK << 8, i2c->regs + MXS_I2C_CTRL1_SET); in mxs_i2c_reset() 155 static void mxs_i2c_dma_finish(struct mxs_i2c_dev *i2c) in mxs_i2c_dma_finish() argument 157 if (i2c->dma_read) { in mxs_i2c_dma_finish() [all …]
|
D | i2c-rk3x.c | 226 static inline void i2c_writel(struct rk3x_i2c *i2c, u32 value, in i2c_writel() argument 229 writel(value, i2c->regs + offset); in i2c_writel() 232 static inline u32 i2c_readl(struct rk3x_i2c *i2c, unsigned int offset) in i2c_readl() argument 234 return readl(i2c->regs + offset); in i2c_readl() 238 static inline void rk3x_i2c_clean_ipd(struct rk3x_i2c *i2c) in rk3x_i2c_clean_ipd() argument 240 i2c_writel(i2c, REG_INT_ALL, REG_IPD); in rk3x_i2c_clean_ipd() 247 static void rk3x_i2c_start(struct rk3x_i2c *i2c) in rk3x_i2c_start() argument 249 u32 val = i2c_readl(i2c, REG_CON) & REG_CON_TUNING_MASK; in rk3x_i2c_start() 251 i2c_writel(i2c, REG_INT_START, REG_IEN); in rk3x_i2c_start() 254 val |= REG_CON_EN | REG_CON_MOD(i2c->mode) | REG_CON_START; in rk3x_i2c_start() [all …]
|
D | i2c-octeon-platdrv.c | 38 static void octeon_i2c_int_enable(struct octeon_i2c *i2c) in octeon_i2c_int_enable() argument 40 octeon_i2c_write_int(i2c, TWSI_INT_CORE_EN); in octeon_i2c_int_enable() 44 static void octeon_i2c_int_disable(struct octeon_i2c *i2c) in octeon_i2c_int_disable() argument 47 octeon_i2c_write_int(i2c, 0); in octeon_i2c_int_disable() 57 static void octeon_i2c_int_enable78(struct octeon_i2c *i2c) in octeon_i2c_int_enable78() argument 59 atomic_inc_return(&i2c->int_enable_cnt); in octeon_i2c_int_enable78() 60 enable_irq(i2c->irq); in octeon_i2c_int_enable78() 78 static void octeon_i2c_int_disable78(struct octeon_i2c *i2c) in octeon_i2c_int_disable78() argument 80 __octeon_i2c_irq_disable(&i2c->int_enable_cnt, i2c->irq); in octeon_i2c_int_disable78() 90 static void octeon_i2c_hlc_int_enable78(struct octeon_i2c *i2c) in octeon_i2c_hlc_int_enable78() argument [all …]
|
D | i2c-thunderx-pcidrv.c | 40 static void thunder_i2c_int_enable(struct octeon_i2c *i2c) in thunder_i2c_int_enable() argument 43 i2c->twsi_base + TWSI_INT_ENA_W1S); in thunder_i2c_int_enable() 49 static void thunder_i2c_int_disable(struct octeon_i2c *i2c) in thunder_i2c_int_disable() argument 52 i2c->twsi_base + TWSI_INT_ENA_W1C); in thunder_i2c_int_disable() 55 static void thunder_i2c_hlc_int_enable(struct octeon_i2c *i2c) in thunder_i2c_hlc_int_enable() argument 58 i2c->twsi_base + TWSI_INT_ENA_W1S); in thunder_i2c_hlc_int_enable() 61 static void thunder_i2c_hlc_int_disable(struct octeon_i2c *i2c) in thunder_i2c_hlc_int_disable() argument 64 i2c->twsi_base + TWSI_INT_ENA_W1C); in thunder_i2c_hlc_int_disable() 84 static void thunder_i2c_clock_enable(struct device *dev, struct octeon_i2c *i2c) in thunder_i2c_clock_enable() argument 90 i2c->clk = clk_get(dev, NULL); in thunder_i2c_clock_enable() [all …]
|
D | i2c-pca-platform.c | 42 struct i2c_pca_pf_data *i2c = pd; in i2c_pca_pf_readbyte8() local 43 return ioread8(i2c->reg_base + reg); in i2c_pca_pf_readbyte8() 48 struct i2c_pca_pf_data *i2c = pd; in i2c_pca_pf_readbyte16() local 49 return ioread8(i2c->reg_base + reg * 2); in i2c_pca_pf_readbyte16() 54 struct i2c_pca_pf_data *i2c = pd; in i2c_pca_pf_readbyte32() local 55 return ioread8(i2c->reg_base + reg * 4); in i2c_pca_pf_readbyte32() 60 struct i2c_pca_pf_data *i2c = pd; in i2c_pca_pf_writebyte8() local 61 iowrite8(val, i2c->reg_base + reg); in i2c_pca_pf_writebyte8() 66 struct i2c_pca_pf_data *i2c = pd; in i2c_pca_pf_writebyte16() local 67 iowrite8(val, i2c->reg_base + reg * 2); in i2c_pca_pf_writebyte16() [all …]
|
D | i2c-mt7621.c | 69 static int mtk_i2c_wait_idle(struct mtk_i2c *i2c) in mtk_i2c_wait_idle() argument 74 ret = readl_relaxed_poll_timeout(i2c->base + REG_SM0CTL1_REG, in mtk_i2c_wait_idle() 78 dev_dbg(i2c->dev, "idle err(%d)\n", ret); in mtk_i2c_wait_idle() 83 static void mtk_i2c_reset(struct mtk_i2c *i2c) in mtk_i2c_reset() argument 87 ret = device_reset(i2c->adap.dev.parent); in mtk_i2c_reset() 89 dev_err(i2c->dev, "I2C reset failed!\n"); in mtk_i2c_reset() 95 iowrite32(((i2c->clk_div << 16) & SM0CTL0_CLK_DIV_MASK) | SM0CTL0_EN | in mtk_i2c_reset() 96 SM0CTL0_SCL_STRETCH, i2c->base + REG_SM0CTL0_REG); in mtk_i2c_reset() 97 iowrite32(0, i2c->base + REG_SM0CFG2_REG); in mtk_i2c_reset() 100 static void mtk_i2c_dump_reg(struct mtk_i2c *i2c) in mtk_i2c_dump_reg() argument [all …]
|
D | i2c-kempld.c | 82 static int kempld_i2c_process(struct kempld_i2c_data *i2c) in kempld_i2c_process() argument 84 struct kempld_device_data *pld = i2c->pld; in kempld_i2c_process() 86 struct i2c_msg *msg = i2c->msg; in kempld_i2c_process() 93 if (i2c->state == STATE_DONE || i2c->state == STATE_ERROR) { in kempld_i2c_process() 96 if (i2c->state == STATE_ERROR) in kempld_i2c_process() 103 i2c->state = STATE_ERROR; in kempld_i2c_process() 108 if (i2c->state == STATE_INIT) { in kempld_i2c_process() 112 i2c->state = STATE_ADDR; in kempld_i2c_process() 115 if (i2c->state == STATE_ADDR) { in kempld_i2c_process() 117 if (i2c->msg->flags & I2C_M_TEN) { in kempld_i2c_process() [all …]
|
/drivers/media/pci/netup_unidvb/ |
D | netup_unidvb_i2c.c | 65 irqreturn_t netup_i2c_interrupt(struct netup_i2c *i2c) in netup_i2c_interrupt() argument 71 spin_lock_irqsave(&i2c->lock, flags); in netup_i2c_interrupt() 72 reg = readw(&i2c->regs->twi_ctrl0_stat); in netup_i2c_interrupt() 73 writew(reg & ~TWI_IRQEN, &i2c->regs->twi_ctrl0_stat); in netup_i2c_interrupt() 74 dev_dbg(i2c->adap.dev.parent, in netup_i2c_interrupt() 77 dev_dbg(i2c->adap.dev.parent, in netup_i2c_interrupt() 79 i2c->state = STATE_DONE; in netup_i2c_interrupt() 83 dev_dbg(i2c->adap.dev.parent, in netup_i2c_interrupt() 85 i2c->state = STATE_ERROR; in netup_i2c_interrupt() 89 dev_dbg(i2c->adap.dev.parent, in netup_i2c_interrupt() [all …]
|
/drivers/media/pci/ddbridge/ |
D | ddbridge-i2c.c | 40 static int ddb_i2c_cmd(struct ddb_i2c *i2c, u32 adr, u32 cmd) in ddb_i2c_cmd() argument 42 struct ddb *dev = i2c->dev; in ddb_i2c_cmd() 46 ddbwritel(dev, (adr << 9) | cmd, i2c->regs + I2C_COMMAND); in ddb_i2c_cmd() 47 stat = wait_for_completion_timeout(&i2c->completion, HZ); in ddb_i2c_cmd() 48 val = ddbreadl(dev, i2c->regs + I2C_COMMAND); in ddb_i2c_cmd() 51 dev->nr, i2c->nr, i2c->link); in ddb_i2c_cmd() 56 if (i2c->link) { in ddb_i2c_cmd() 58 DDB_LINK_TAG(i2c->link) | in ddb_i2c_cmd() 62 i2c->link, listat); in ddb_i2c_cmd() 68 i2c->regs + I2C_MONITOR); in ddb_i2c_cmd() [all …]
|
/drivers/gpu/drm/mgag200/ |
D | mgag200_i2c.c | 63 struct mga_i2c_chan *i2c = data; in mga_gpio_setsda() local 64 struct mga_device *mdev = to_mga_device(i2c->dev); in mga_gpio_setsda() 65 mga_i2c_set(mdev, i2c->data, state); in mga_gpio_setsda() 70 struct mga_i2c_chan *i2c = data; in mga_gpio_setscl() local 71 struct mga_device *mdev = to_mga_device(i2c->dev); in mga_gpio_setscl() 72 mga_i2c_set(mdev, i2c->clock, state); in mga_gpio_setscl() 77 struct mga_i2c_chan *i2c = data; in mga_gpio_getsda() local 78 struct mga_device *mdev = to_mga_device(i2c->dev); in mga_gpio_getsda() 79 return (mga_i2c_read_gpio(mdev) & i2c->data) ? 1 : 0; in mga_gpio_getsda() 84 struct mga_i2c_chan *i2c = data; in mga_gpio_getscl() local [all …]
|