Lines Matching +full:rcar +full:- +full:gen2 +full:- +full:i2c
1 // SPDX-License-Identifier: GPL-2.0
3 * Driver for the Renesas R-Car I2C unit
5 * Copyright (C) 2014-19 Wolfram Sang <wsa@sang-engineering.com>
6 * Copyright (C) 2011-2019 Renesas Electronics Corporation
8 * Copyright (C) 2012-14 Renesas Solutions Corp.
11 * This file is based on the drivers/i2c/busses/i2c-sh7760.c
12 * (c) 2005-2008 MSC Vertriebsges.m.b.H, Manuel Lauss <mlau@msc-ge.com>
18 #include <linux/dma-mapping.h>
23 #include <linux/i2c.h>
24 #include <linux/i2c-smbus.h>
58 #define MDBS BIT(7) /* non-fifo mode switch */
102 /* SCL low/high ratio 5:4 to meet all I2C timing specs (incl safety margin) */
174 #define rcar_i2c_priv_to_dev(p) ((p)->adap.dev.parent)
175 #define rcar_i2c_is_recv(p) ((p)->msg->flags & I2C_M_RD)
179 writel(val, priv->io + reg); in rcar_i2c_write()
184 return readl(priv->io + reg); in rcar_i2c_read()
189 writel(~val & 0x7f, priv->io + ICMSR); in rcar_i2c_clear_irq()
204 priv->recovery_icmcr |= FSCL; in rcar_i2c_set_scl()
206 priv->recovery_icmcr &= ~FSCL; in rcar_i2c_set_scl()
208 rcar_i2c_write(priv, ICMCR, priv->recovery_icmcr); in rcar_i2c_set_scl()
216 priv->recovery_icmcr |= FSDA; in rcar_i2c_set_sda()
218 priv->recovery_icmcr &= ~FSDA; in rcar_i2c_set_sda()
220 rcar_i2c_write(priv, ICMCR, priv->recovery_icmcr); in rcar_i2c_set_sda()
245 if (priv->devtype < I2C_RCAR_GEN3) { in rcar_i2c_init()
246 rcar_i2c_write(priv, ICCCR, priv->icccr); in rcar_i2c_init()
250 if (priv->flags & ID_P_FMPLUS) in rcar_i2c_init()
254 rcar_i2c_write(priv, ICCCR, priv->icccr); in rcar_i2c_init()
255 rcar_i2c_write(priv, ICMPR, priv->smd); in rcar_i2c_init()
256 rcar_i2c_write(priv, ICHPR, priv->schd); in rcar_i2c_init()
257 rcar_i2c_write(priv, ICLPR, priv->scld); in rcar_i2c_init()
267 rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */ in rcar_i2c_reset_slave()
275 ret = readl_poll_timeout(priv->io + ICMCR, val, !(val & FSDA), 10, in rcar_i2c_bus_barrier()
276 priv->adap.timeout); in rcar_i2c_bus_barrier()
279 priv->recovery_icmcr = MDBS | OBPC | FSDA | FSCL; in rcar_i2c_bus_barrier()
280 ret = i2c_recover_bus(&priv->adap); in rcar_i2c_bus_barrier()
300 priv->smd = RCAR_DEFAULT_SMD; in rcar_i2c_clock_calculate()
313 * ick : I2C internal clock < 20 MHz in rcar_i2c_clock_calculate()
314 * ticf : I2C SCL falling time in rcar_i2c_clock_calculate()
315 * tr : I2C SCL rising time in rcar_i2c_clock_calculate()
318 * F[] : integer up-valuation in rcar_i2c_clock_calculate()
320 rate = clk_get_rate(priv->clk); in rcar_i2c_clock_calculate()
322 cdf_width = (priv->devtype == I2C_RCAR_GEN1) ? 2 : 3; in rcar_i2c_clock_calculate()
326 if (t.bus_freq_hz > I2C_MAX_FAST_MODE_FREQ && priv->devtype >= I2C_RCAR_GEN4) in rcar_i2c_clock_calculate()
327 priv->flags |= ID_P_FMPLUS; in rcar_i2c_clock_calculate()
329 priv->flags &= ~ID_P_FMPLUS; in rcar_i2c_clock_calculate()
332 ick = rate / (priv->devtype < I2C_RCAR_GEN3 ? (cdf + 1) : 1); in rcar_i2c_clock_calculate()
345 if (priv->devtype < I2C_RCAR_GEN3) { in rcar_i2c_clock_calculate()
350 * SCGD = ((ick / SCL) - 20 - F[...]) / 8 in rcar_i2c_clock_calculate()
354 scgd = DIV_ROUND_UP(scgd - 20 - round, 8); in rcar_i2c_clock_calculate()
363 priv->icccr = scgd << cdf_width | cdf; in rcar_i2c_clock_calculate()
379 * x = ((clkp / SCL) - 8 - 2 * smd - F[...]) / sum_ratio in rcar_i2c_clock_calculate()
382 x = DIV_ROUND_UP(x - 8 - 2 * priv->smd - round, sum_ratio); in rcar_i2c_clock_calculate()
383 scl = rate / (8 + 2 * priv->smd + sum_ratio * x + round); in rcar_i2c_clock_calculate()
388 priv->icccr = cdf; in rcar_i2c_clock_calculate()
389 priv->schd = RCAR_SCHD_RATIO * x; in rcar_i2c_clock_calculate()
390 priv->scld = RCAR_SCLD_RATIO * x; in rcar_i2c_clock_calculate()
391 if (priv->smd >= priv->schd) in rcar_i2c_clock_calculate()
392 priv->smd = priv->schd - 1; in rcar_i2c_clock_calculate()
395 scl, t.bus_freq_hz, rate, round, cdf, priv->schd, priv->scld, priv->smd); in rcar_i2c_clock_calculate()
402 return -EINVAL; in rcar_i2c_clock_calculate()
414 bool rep_start = !(priv->flags & ID_REP_AFTER_RD); in rcar_i2c_prepare_msg()
416 priv->pos = 0; in rcar_i2c_prepare_msg()
417 priv->flags &= ID_P_MASK; in rcar_i2c_prepare_msg()
419 if (priv->msgs_left == 1) in rcar_i2c_prepare_msg()
420 priv->flags |= ID_LAST_MSG; in rcar_i2c_prepare_msg()
422 rcar_i2c_write(priv, ICMAR, i2c_8bit_addr_from_msg(priv->msg)); in rcar_i2c_prepare_msg()
423 if (priv->flags & ID_P_NOT_ATOMIC) in rcar_i2c_prepare_msg()
433 priv->msg = msgs; in rcar_i2c_first_msg()
434 priv->msgs_left = num; in rcar_i2c_first_msg()
441 priv->msg++; in rcar_i2c_next_msg()
442 priv->msgs_left--; in rcar_i2c_next_msg()
449 struct dma_chan *chan = priv->dma_direction == DMA_FROM_DEVICE in rcar_i2c_cleanup_dma()
450 ? priv->dma_rx : priv->dma_tx; in rcar_i2c_cleanup_dma()
456 dma_unmap_single(chan->device->dev, sg_dma_address(&priv->sg), in rcar_i2c_cleanup_dma()
457 sg_dma_len(&priv->sg), priv->dma_direction); in rcar_i2c_cleanup_dma()
460 if (priv->devtype >= I2C_RCAR_GEN3 && in rcar_i2c_cleanup_dma()
461 priv->dma_direction == DMA_FROM_DEVICE) in rcar_i2c_cleanup_dma()
462 priv->flags |= ID_P_NO_RXDMA; in rcar_i2c_cleanup_dma()
464 priv->dma_direction = DMA_NONE; in rcar_i2c_cleanup_dma()
474 priv->pos += sg_dma_len(&priv->sg); in rcar_i2c_dma_callback()
482 struct i2c_msg *msg = priv->msg; in rcar_i2c_dma()
483 bool read = msg->flags & I2C_M_RD; in rcar_i2c_dma()
485 struct dma_chan *chan = read ? priv->dma_rx : priv->dma_tx; in rcar_i2c_dma()
493 if (!(priv->flags & ID_P_NOT_ATOMIC) || IS_ERR(chan) || msg->len < RCAR_MIN_DMA_LEN || in rcar_i2c_dma()
494 !(msg->flags & I2C_M_DMA_SAFE) || (read && priv->flags & ID_P_NO_RXDMA)) in rcar_i2c_dma()
502 buf = priv->msg->buf; in rcar_i2c_dma()
503 len = priv->msg->len - 2; in rcar_i2c_dma()
508 buf = priv->msg->buf + 1; in rcar_i2c_dma()
509 len = priv->msg->len - 1; in rcar_i2c_dma()
512 dma_addr = dma_map_single(chan->device->dev, buf, len, dir); in rcar_i2c_dma()
513 if (dma_mapping_error(chan->device->dev, dma_addr)) { in rcar_i2c_dma()
518 sg_dma_len(&priv->sg) = len; in rcar_i2c_dma()
519 sg_dma_address(&priv->sg) = dma_addr; in rcar_i2c_dma()
521 priv->dma_direction = dir; in rcar_i2c_dma()
523 txdesc = dmaengine_prep_slave_sg(chan, &priv->sg, 1, in rcar_i2c_dma()
532 txdesc->callback = rcar_i2c_dma_callback; in rcar_i2c_dma()
533 txdesc->callback_param = priv; in rcar_i2c_dma()
554 struct i2c_msg *msg = priv->msg; in rcar_i2c_irq_send()
565 if (priv->pos == 1 && rcar_i2c_dma(priv)) in rcar_i2c_irq_send()
568 if (priv->pos < msg->len) { in rcar_i2c_irq_send()
574 * [ICRXTX] -> [SHIFT] -> [I2C bus] in rcar_i2c_irq_send()
576 rcar_i2c_write(priv, ICRXTX, msg->buf[priv->pos]); in rcar_i2c_irq_send()
577 priv->pos++; in rcar_i2c_irq_send()
581 * It is on _SHIFT_ register, and will sent to I2C bus. in rcar_i2c_irq_send()
584 * [ICRXTX] -> [SHIFT] -> [I2C bus] in rcar_i2c_irq_send()
587 if (priv->flags & ID_LAST_MSG) in rcar_i2c_irq_send()
603 struct i2c_msg *msg = priv->msg; in rcar_i2c_irq_recv()
604 bool recv_len_init = priv->pos == 0 && msg->flags & I2C_M_RECV_LEN; in rcar_i2c_irq_recv()
618 } else if (priv->pos < msg->len) { in rcar_i2c_irq_recv()
622 msg->buf[priv->pos] = data; in rcar_i2c_irq_recv()
625 priv->flags |= ID_DONE | ID_EPROTO; in rcar_i2c_irq_recv()
628 msg->len += msg->buf[0]; in rcar_i2c_irq_recv()
635 priv->pos++; in rcar_i2c_irq_recv()
642 if (priv->pos + 1 == msg->len && !recv_len_init) { in rcar_i2c_irq_recv()
643 if (priv->flags & ID_LAST_MSG) { in rcar_i2c_irq_recv()
647 priv->flags |= ID_REP_AFTER_RD; in rcar_i2c_irq_recv()
651 if (priv->pos == msg->len && !(priv->flags & ID_LAST_MSG)) in rcar_i2c_irq_recv()
673 i2c_slave_event(priv->slave, I2C_SLAVE_READ_REQUESTED, &value); in rcar_i2c_slave_irq()
677 ret = i2c_slave_event(priv->slave, I2C_SLAVE_WRITE_REQUESTED, &value); in rcar_i2c_slave_irq()
679 priv->slave_flags |= ID_SLAVE_NACK; in rcar_i2c_slave_irq()
691 i2c_slave_event(priv->slave, I2C_SLAVE_STOP, &value); in rcar_i2c_slave_irq()
693 priv->slave_flags &= ~ID_SLAVE_NACK; in rcar_i2c_slave_irq()
701 ret = i2c_slave_event(priv->slave, I2C_SLAVE_WRITE_RECEIVED, &value); in rcar_i2c_slave_irq()
703 priv->slave_flags |= ID_SLAVE_NACK; in rcar_i2c_slave_irq()
707 (priv->slave_flags & ID_SLAVE_NACK ? FNA : 0)); in rcar_i2c_slave_irq()
713 i2c_slave_event(priv->slave, I2C_SLAVE_READ_PROCESSED, &value); in rcar_i2c_slave_irq()
722 * This driver has a lock-free design because there are IP cores (at least
723 * R-Car Gen2) which have an inherent race condition in their hardware design.
729 * R-Car Gen3 seems to have this fixed but earlier versions than R-Car Gen2 are
743 priv->flags |= ID_DONE | ID_ARBLOST; in rcar_i2c_irq()
750 if (priv->flags & ID_P_NOT_ATOMIC) in rcar_i2c_irq()
752 priv->flags |= ID_NACK; in rcar_i2c_irq()
758 priv->msgs_left--; /* The last message also made it */ in rcar_i2c_irq()
759 priv->flags |= ID_DONE; in rcar_i2c_irq()
769 if (priv->flags & ID_DONE) { in rcar_i2c_irq()
772 if (priv->flags & ID_P_NOT_ATOMIC) in rcar_i2c_irq()
773 wake_up(&priv->wait); in rcar_i2c_irq()
785 if (likely(!(priv->flags & ID_REP_AFTER_RD))) in rcar_i2c_gen2_irq()
790 if (priv->flags & ID_P_NOT_ATOMIC) in rcar_i2c_gen2_irq()
803 if (priv->flags & ID_P_NOT_ATOMIC) in rcar_i2c_gen3_irq()
810 if (likely(!(priv->flags & ID_REP_AFTER_RD) && msr)) in rcar_i2c_gen3_irq()
862 read = msg->flags & I2C_M_RD; in rcar_i2c_request_dma()
864 chan = read ? priv->dma_rx : priv->dma_tx; in rcar_i2c_request_dma()
865 if (PTR_ERR(chan) != -EPROBE_DEFER) in rcar_i2c_request_dma()
869 chan = rcar_i2c_request_dma_chan(dev, dir, priv->res->start + ICRXTX); in rcar_i2c_request_dma()
872 priv->dma_rx = chan; in rcar_i2c_request_dma()
874 priv->dma_tx = chan; in rcar_i2c_request_dma()
879 if (!IS_ERR(priv->dma_tx)) { in rcar_i2c_release_dma()
880 dma_release_channel(priv->dma_tx); in rcar_i2c_release_dma()
881 priv->dma_tx = ERR_PTR(-EPROBE_DEFER); in rcar_i2c_release_dma()
884 if (!IS_ERR(priv->dma_rx)) { in rcar_i2c_release_dma()
885 dma_release_channel(priv->dma_rx); in rcar_i2c_release_dma()
886 priv->dma_rx = ERR_PTR(-EPROBE_DEFER); in rcar_i2c_release_dma()
890 /* I2C is a special case, we need to poll the status of a reset */
896 if (priv->slave) in rcar_i2c_do_reset()
897 return -EISCONN; in rcar_i2c_do_reset()
899 ret = reset_control_reset(priv->rstc); in rcar_i2c_do_reset()
904 100, false, priv->rstc); in rcar_i2c_do_reset()
916 priv->flags |= ID_P_NOT_ATOMIC; in rcar_i2c_master_xfer()
926 if (priv->devtype >= I2C_RCAR_GEN3) { in rcar_i2c_master_xfer()
930 priv->flags &= ~ID_P_NO_RXDMA; in rcar_i2c_master_xfer()
940 time_left = wait_event_timeout(priv->wait, priv->flags & ID_DONE, in rcar_i2c_master_xfer()
941 num * adap->timeout); in rcar_i2c_master_xfer()
944 if (priv->dma_direction != DMA_NONE) in rcar_i2c_master_xfer()
949 ret = -ETIMEDOUT; in rcar_i2c_master_xfer()
950 } else if (priv->flags & ID_NACK) { in rcar_i2c_master_xfer()
951 ret = -ENXIO; in rcar_i2c_master_xfer()
952 } else if (priv->flags & ID_ARBLOST) { in rcar_i2c_master_xfer()
953 ret = -EAGAIN; in rcar_i2c_master_xfer()
954 } else if (priv->flags & ID_EPROTO) { in rcar_i2c_master_xfer()
955 ret = -EPROTO; in rcar_i2c_master_xfer()
957 ret = num - priv->msgs_left; /* The number of transfer */ in rcar_i2c_master_xfer()
962 if (ret < 0 && ret != -ENXIO) in rcar_i2c_master_xfer()
963 dev_err(dev, "error %d : %x\n", ret, priv->flags); in rcar_i2c_master_xfer()
978 priv->flags &= ~ID_P_NOT_ATOMIC; in rcar_i2c_master_xfer_atomic()
990 j = jiffies + num * adap->timeout; in rcar_i2c_master_xfer_atomic()
997 if (priv->devtype < I2C_RCAR_GEN3) in rcar_i2c_master_xfer_atomic()
1004 } while (!(priv->flags & ID_DONE) && time_left); in rcar_i2c_master_xfer_atomic()
1008 ret = -ETIMEDOUT; in rcar_i2c_master_xfer_atomic()
1009 } else if (priv->flags & ID_NACK) { in rcar_i2c_master_xfer_atomic()
1010 ret = -ENXIO; in rcar_i2c_master_xfer_atomic()
1011 } else if (priv->flags & ID_ARBLOST) { in rcar_i2c_master_xfer_atomic()
1012 ret = -EAGAIN; in rcar_i2c_master_xfer_atomic()
1013 } else if (priv->flags & ID_EPROTO) { in rcar_i2c_master_xfer_atomic()
1014 ret = -EPROTO; in rcar_i2c_master_xfer_atomic()
1016 ret = num - priv->msgs_left; /* The number of transfer */ in rcar_i2c_master_xfer_atomic()
1021 if (ret < 0 && ret != -ENXIO) in rcar_i2c_master_xfer_atomic()
1022 dev_err(dev, "error %d : %x\n", ret, priv->flags); in rcar_i2c_master_xfer_atomic()
1029 struct rcar_i2c_priv *priv = i2c_get_adapdata(slave->adapter); in rcar_reg_slave()
1031 if (priv->slave) in rcar_reg_slave()
1032 return -EBUSY; in rcar_reg_slave()
1034 if (slave->flags & I2C_CLIENT_TEN) in rcar_reg_slave()
1035 return -EAFNOSUPPORT; in rcar_reg_slave()
1040 priv->slave = slave; in rcar_reg_slave()
1041 rcar_i2c_write(priv, ICSAR, slave->addr); in rcar_reg_slave()
1051 struct rcar_i2c_priv *priv = i2c_get_adapdata(slave->adapter); in rcar_unreg_slave()
1053 WARN_ON(!priv->slave); in rcar_unreg_slave()
1056 disable_irq(priv->irq); in rcar_unreg_slave()
1058 enable_irq(priv->irq); in rcar_unreg_slave()
1060 priv->slave = NULL; in rcar_unreg_slave()
1080 if (priv->flags & ID_P_HOST_NOTIFY) in rcar_i2c_func()
1099 { .compatible = "renesas,i2c-r8a7778", .data = (void *)I2C_RCAR_GEN1 },
1100 { .compatible = "renesas,i2c-r8a7779", .data = (void *)I2C_RCAR_GEN1 },
1101 { .compatible = "renesas,i2c-r8a7790", .data = (void *)I2C_RCAR_GEN2 },
1102 { .compatible = "renesas,i2c-r8a7791", .data = (void *)I2C_RCAR_GEN2 },
1103 { .compatible = "renesas,i2c-r8a7792", .data = (void *)I2C_RCAR_GEN2 },
1104 { .compatible = "renesas,i2c-r8a7793", .data = (void *)I2C_RCAR_GEN2 },
1105 { .compatible = "renesas,i2c-r8a7794", .data = (void *)I2C_RCAR_GEN2 },
1106 { .compatible = "renesas,i2c-r8a7795", .data = (void *)I2C_RCAR_GEN3 },
1107 { .compatible = "renesas,i2c-r8a7796", .data = (void *)I2C_RCAR_GEN3 },
1109 { .compatible = "renesas,i2c-r8a779f0", .data = (void *)I2C_RCAR_GEN3 },
1110 { .compatible = "renesas,rcar-gen1-i2c", .data = (void *)I2C_RCAR_GEN1 },
1111 { .compatible = "renesas,rcar-gen2-i2c", .data = (void *)I2C_RCAR_GEN2 },
1112 { .compatible = "renesas,rcar-gen3-i2c", .data = (void *)I2C_RCAR_GEN3 },
1113 { .compatible = "renesas,rcar-gen4-i2c", .data = (void *)I2C_RCAR_GEN4 },
1122 struct device *dev = &pdev->dev; in rcar_i2c_probe()
1132 return -ENOMEM; in rcar_i2c_probe()
1134 priv->clk = devm_clk_get(dev, NULL); in rcar_i2c_probe()
1135 if (IS_ERR(priv->clk)) { in rcar_i2c_probe()
1137 return PTR_ERR(priv->clk); in rcar_i2c_probe()
1140 priv->io = devm_platform_get_and_ioremap_resource(pdev, 0, &priv->res); in rcar_i2c_probe()
1141 if (IS_ERR(priv->io)) in rcar_i2c_probe()
1142 return PTR_ERR(priv->io); in rcar_i2c_probe()
1144 priv->devtype = (enum rcar_i2c_type)of_device_get_match_data(dev); in rcar_i2c_probe()
1145 init_waitqueue_head(&priv->wait); in rcar_i2c_probe()
1147 adap = &priv->adap; in rcar_i2c_probe()
1148 adap->nr = pdev->id; in rcar_i2c_probe()
1149 adap->algo = &rcar_i2c_algo; in rcar_i2c_probe()
1150 adap->class = I2C_CLASS_DEPRECATED; in rcar_i2c_probe()
1151 adap->retries = 3; in rcar_i2c_probe()
1152 adap->dev.parent = dev; in rcar_i2c_probe()
1153 adap->dev.of_node = dev->of_node; in rcar_i2c_probe()
1154 adap->bus_recovery_info = &rcar_i2c_bri; in rcar_i2c_probe()
1155 adap->quirks = &rcar_i2c_quirks; in rcar_i2c_probe()
1157 strscpy(adap->name, pdev->name, sizeof(adap->name)); in rcar_i2c_probe()
1160 sg_init_table(&priv->sg, 1); in rcar_i2c_probe()
1161 priv->dma_direction = DMA_NONE; in rcar_i2c_probe()
1162 priv->dma_rx = priv->dma_tx = ERR_PTR(-EPROBE_DEFER); in rcar_i2c_probe()
1177 /* Stay always active when multi-master to keep arbitration working */ in rcar_i2c_probe()
1178 if (of_property_read_bool(dev->of_node, "multi-master")) in rcar_i2c_probe()
1179 priv->flags |= ID_P_PM_BLOCKED; in rcar_i2c_probe()
1183 if (of_property_read_bool(dev->of_node, "smbus")) in rcar_i2c_probe()
1184 priv->flags |= ID_P_HOST_NOTIFY; in rcar_i2c_probe()
1186 if (priv->devtype < I2C_RCAR_GEN3) { in rcar_i2c_probe()
1190 /* R-Car Gen3+ needs a reset before every transfer */ in rcar_i2c_probe()
1191 priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); in rcar_i2c_probe()
1192 if (IS_ERR(priv->rstc)) { in rcar_i2c_probe()
1193 ret = PTR_ERR(priv->rstc); in rcar_i2c_probe()
1197 ret = reset_control_status(priv->rstc); in rcar_i2c_probe()
1202 priv->flags &= ~ID_P_HOST_NOTIFY; in rcar_i2c_probe()
1208 priv->irq = ret; in rcar_i2c_probe()
1209 ret = devm_request_irq(dev, priv->irq, irqhandler, irqflags, dev_name(dev), priv); in rcar_i2c_probe()
1211 dev_err(dev, "cannot get irq %d\n", priv->irq); in rcar_i2c_probe()
1221 if (priv->flags & ID_P_HOST_NOTIFY) { in rcar_i2c_probe()
1222 priv->host_notify_client = i2c_new_slave_host_notify_device(adap); in rcar_i2c_probe()
1223 if (IS_ERR(priv->host_notify_client)) { in rcar_i2c_probe()
1224 ret = PTR_ERR(priv->host_notify_client); in rcar_i2c_probe()
1234 i2c_del_adapter(&priv->adap); in rcar_i2c_probe()
1236 if (priv->flags & ID_P_PM_BLOCKED) in rcar_i2c_probe()
1246 struct device *dev = &pdev->dev; in rcar_i2c_remove()
1248 if (priv->host_notify_client) in rcar_i2c_remove()
1249 i2c_free_slave_host_notify_device(priv->host_notify_client); in rcar_i2c_remove()
1250 i2c_del_adapter(&priv->adap); in rcar_i2c_remove()
1252 if (priv->flags & ID_P_PM_BLOCKED) in rcar_i2c_remove()
1261 i2c_mark_adapter_suspended(&priv->adap); in rcar_i2c_suspend()
1269 i2c_mark_adapter_resumed(&priv->adap); in rcar_i2c_resume()
1279 .name = "i2c-rcar",
1290 MODULE_DESCRIPTION("Renesas R-Car I2C bus driver");