Lines Matching +full:gpi +full:- +full:config

1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
7 #include <linux/dma-mapping.h>
8 #include <linux/dma/qcom-gpi-dma.h>
17 #include <linux/qcom-geni-se.h>
109 [GP_IRQ0] = {-EIO, "Unknown I2C err GP_IRQ0"},
110 [NACK] = {-ENXIO, "NACK: slv unresponsive, check its power/reset-ln"},
111 [GP_IRQ2] = {-EIO, "Unknown I2C err GP IRQ2"},
112 [BUS_PROTO] = {-EPROTO, "Bus proto err, noisy/unexpected start/stop"},
113 [ARB_LOST] = {-EAGAIN, "Bus arbitration lost, clock line undriveable"},
114 [GP_IRQ5] = {-EIO, "Unknown I2C err GP IRQ5"},
115 [GENI_OVERRUN] = {-EIO, "Cmd overrun, check GENI cmd-state machine"},
116 [GENI_ILLEGAL_CMD] = {-EIO, "Illegal cmd, check GENI cmd-state machine"},
117 [GENI_ABORT_DONE] = {-ETIMEDOUT, "Abort after timeout successful"},
118 [GENI_TIMEOUT] = {-ETIMEDOUT, "I2C TXN timed out"},
153 if (itr->clk_freq_out == gi2c->clk_freq_out) { in geni_i2c_clk_map_idx()
154 gi2c->clk_fld = itr; in geni_i2c_clk_map_idx()
158 return -EINVAL; in geni_i2c_clk_map_idx()
163 const struct geni_i2c_clk_fld *itr = gi2c->clk_fld; in qcom_geni_i2c_conf()
166 writel_relaxed(0, gi2c->se.base + SE_GENI_CLK_SEL); in qcom_geni_i2c_conf()
168 val = (itr->clk_div << CLK_DIV_SHFT) | SER_CLK_EN; in qcom_geni_i2c_conf()
169 writel_relaxed(val, gi2c->se.base + GENI_SER_M_CLK_CFG); in qcom_geni_i2c_conf()
171 val = itr->t_high_cnt << HIGH_COUNTER_SHFT; in qcom_geni_i2c_conf()
172 val |= itr->t_low_cnt << LOW_COUNTER_SHFT; in qcom_geni_i2c_conf()
173 val |= itr->t_cycle_cnt; in qcom_geni_i2c_conf()
174 writel_relaxed(val, gi2c->se.base + SE_I2C_SCL_COUNTERS); in qcom_geni_i2c_conf()
179 u32 m_cmd = readl_relaxed(gi2c->se.base + SE_GENI_M_CMD0); in geni_i2c_err_misc()
180 u32 m_stat = readl_relaxed(gi2c->se.base + SE_GENI_M_IRQ_STATUS); in geni_i2c_err_misc()
181 u32 geni_s = readl_relaxed(gi2c->se.base + SE_GENI_STATUS); in geni_i2c_err_misc()
182 u32 geni_ios = readl_relaxed(gi2c->se.base + SE_GENI_IOS); in geni_i2c_err_misc()
183 u32 dma = readl_relaxed(gi2c->se.base + SE_GENI_DMA_MODE_EN); in geni_i2c_err_misc()
187 rx_st = readl_relaxed(gi2c->se.base + SE_DMA_RX_IRQ_STAT); in geni_i2c_err_misc()
188 tx_st = readl_relaxed(gi2c->se.base + SE_DMA_TX_IRQ_STAT); in geni_i2c_err_misc()
190 rx_st = readl_relaxed(gi2c->se.base + SE_GENI_RX_FIFO_STATUS); in geni_i2c_err_misc()
191 tx_st = readl_relaxed(gi2c->se.base + SE_GENI_TX_FIFO_STATUS); in geni_i2c_err_misc()
193 dev_dbg(gi2c->se.dev, "DMA:%d tx_stat:0x%x, rx_stat:0x%x, irq-stat:0x%x\n", in geni_i2c_err_misc()
195 dev_dbg(gi2c->se.dev, "m_cmd:0x%x, geni_status:0x%x, geni_ios:0x%x\n", in geni_i2c_err_misc()
201 if (!gi2c->err) in geni_i2c_err()
202 gi2c->err = gi2c_log[err].err; in geni_i2c_err()
203 if (gi2c->cur) in geni_i2c_err()
204 dev_dbg(gi2c->se.dev, "len:%d, slv-addr:0x%x, RD/WR:%d\n", in geni_i2c_err()
205 gi2c->cur->len, gi2c->cur->addr, gi2c->cur->flags); in geni_i2c_err()
209 gi2c->abort_done = true; in geni_i2c_err()
213 dev_dbg(gi2c->se.dev, "%s\n", gi2c_log[err].msg); in geni_i2c_err()
216 dev_err(gi2c->se.dev, "%s\n", gi2c_log[err].msg); in geni_i2c_err()
225 void __iomem *base = gi2c->se.base; in geni_i2c_irq()
235 spin_lock(&gi2c->lock); in geni_i2c_irq()
241 cur = gi2c->cur; in geni_i2c_irq()
265 dev_dbg(gi2c->se.dev, "i2c dma tx:0x%x, dma rx:0x%x\n", in geni_i2c_irq()
267 } else if (cur->flags & I2C_M_RD && in geni_i2c_irq()
274 while (gi2c->cur_rd < cur->len && p < sizeof(val)) { in geni_i2c_irq()
275 cur->buf[gi2c->cur_rd++] = val & 0xff; in geni_i2c_irq()
279 if (gi2c->cur_rd == cur->len) in geni_i2c_irq()
282 } else if (!(cur->flags & I2C_M_RD) && in geni_i2c_irq()
284 for (j = 0; j < gi2c->tx_wm; j++) { in geni_i2c_irq()
289 while (gi2c->cur_wr < cur->len && p < sizeof(val)) { in geni_i2c_irq()
290 temp = cur->buf[gi2c->cur_wr++]; in geni_i2c_irq()
296 if (gi2c->cur_wr == cur->len) { in geni_i2c_irq()
311 /* if this is err with done-bit not set, handle that through timeout. */ in geni_i2c_irq()
315 complete(&gi2c->done); in geni_i2c_irq()
317 spin_unlock(&gi2c->lock); in geni_i2c_irq()
327 spin_lock_irqsave(&gi2c->lock, flags); in geni_i2c_abort_xfer()
329 gi2c->cur = NULL; in geni_i2c_abort_xfer()
330 gi2c->abort_done = false; in geni_i2c_abort_xfer()
331 geni_se_abort_m_cmd(&gi2c->se); in geni_i2c_abort_xfer()
332 spin_unlock_irqrestore(&gi2c->lock, flags); in geni_i2c_abort_xfer()
335 time_left = wait_for_completion_timeout(&gi2c->done, time_left); in geni_i2c_abort_xfer()
336 } while (!gi2c->abort_done && time_left); in geni_i2c_abort_xfer()
339 dev_err(gi2c->se.dev, "Timeout abort_m_cmd\n"); in geni_i2c_abort_xfer()
347 writel_relaxed(1, gi2c->se.base + SE_DMA_RX_FSM_RST); in geni_i2c_rx_fsm_rst()
349 time_left = wait_for_completion_timeout(&gi2c->done, time_left); in geni_i2c_rx_fsm_rst()
350 val = readl_relaxed(gi2c->se.base + SE_DMA_RX_IRQ_STAT); in geni_i2c_rx_fsm_rst()
354 dev_err(gi2c->se.dev, "Timeout resetting RX_FSM\n"); in geni_i2c_rx_fsm_rst()
362 writel_relaxed(1, gi2c->se.base + SE_DMA_TX_FSM_RST); in geni_i2c_tx_fsm_rst()
364 time_left = wait_for_completion_timeout(&gi2c->done, time_left); in geni_i2c_tx_fsm_rst()
365 val = readl_relaxed(gi2c->se.base + SE_DMA_TX_IRQ_STAT); in geni_i2c_tx_fsm_rst()
369 dev_err(gi2c->se.dev, "Timeout resetting TX_FSM\n"); in geni_i2c_tx_fsm_rst()
375 gi2c->cur_rd = 0; in geni_i2c_rx_msg_cleanup()
376 if (gi2c->dma_buf) { in geni_i2c_rx_msg_cleanup()
377 if (gi2c->err) in geni_i2c_rx_msg_cleanup()
379 geni_se_rx_dma_unprep(&gi2c->se, gi2c->dma_addr, gi2c->xfer_len); in geni_i2c_rx_msg_cleanup()
380 i2c_put_dma_safe_msg_buf(gi2c->dma_buf, cur, !gi2c->err); in geni_i2c_rx_msg_cleanup()
387 gi2c->cur_wr = 0; in geni_i2c_tx_msg_cleanup()
388 if (gi2c->dma_buf) { in geni_i2c_tx_msg_cleanup()
389 if (gi2c->err) in geni_i2c_tx_msg_cleanup()
391 geni_se_tx_dma_unprep(&gi2c->se, gi2c->dma_addr, gi2c->xfer_len); in geni_i2c_tx_msg_cleanup()
392 i2c_put_dma_safe_msg_buf(gi2c->dma_buf, cur, !gi2c->err); in geni_i2c_tx_msg_cleanup()
402 struct geni_se *se = &gi2c->se; in geni_i2c_rx_one_msg()
403 size_t len = msg->len; in geni_i2c_rx_one_msg()
412 writel_relaxed(len, se->base + SE_I2C_RX_TRANS_LEN); in geni_i2c_rx_one_msg()
420 gi2c->xfer_len = len; in geni_i2c_rx_one_msg()
421 gi2c->dma_addr = rx_dma; in geni_i2c_rx_one_msg()
422 gi2c->dma_buf = dma_buf; in geni_i2c_rx_one_msg()
425 cur = gi2c->cur; in geni_i2c_rx_one_msg()
426 time_left = wait_for_completion_timeout(&gi2c->done, XFER_TIMEOUT); in geni_i2c_rx_one_msg()
432 return gi2c->err; in geni_i2c_rx_one_msg()
441 struct geni_se *se = &gi2c->se; in geni_i2c_tx_one_msg()
442 size_t len = msg->len; in geni_i2c_tx_one_msg()
451 writel_relaxed(len, se->base + SE_I2C_TX_TRANS_LEN); in geni_i2c_tx_one_msg()
459 gi2c->xfer_len = len; in geni_i2c_tx_one_msg()
460 gi2c->dma_addr = tx_dma; in geni_i2c_tx_one_msg()
461 gi2c->dma_buf = dma_buf; in geni_i2c_tx_one_msg()
465 writel_relaxed(1, se->base + SE_GENI_TX_WATERMARK_REG); in geni_i2c_tx_one_msg()
467 cur = gi2c->cur; in geni_i2c_tx_one_msg()
468 time_left = wait_for_completion_timeout(&gi2c->done, XFER_TIMEOUT); in geni_i2c_tx_one_msg()
474 return gi2c->err; in geni_i2c_tx_one_msg()
481 if (result->result != DMA_TRANS_NOERROR) { in i2c_gpi_cb_result()
482 dev_err(gi2c->se.dev, "DMA txn failed:%d\n", result->result); in i2c_gpi_cb_result()
483 gi2c->err = -EIO; in i2c_gpi_cb_result()
484 } else if (result->residue) { in i2c_gpi_cb_result()
485 dev_dbg(gi2c->se.dev, "DMA xfer has pending: %d\n", result->residue); in i2c_gpi_cb_result()
488 complete(&gi2c->done); in i2c_gpi_cb_result()
496 dma_unmap_single(gi2c->se.dev->parent, tx_addr, msg->len, DMA_TO_DEVICE); in geni_i2c_gpi_unmap()
497 i2c_put_dma_safe_msg_buf(tx_buf, msg, !gi2c->err); in geni_i2c_gpi_unmap()
501 dma_unmap_single(gi2c->se.dev->parent, rx_addr, msg->len, DMA_FROM_DEVICE); in geni_i2c_gpi_unmap()
502 i2c_put_dma_safe_msg_buf(rx_buf, msg, !gi2c->err); in geni_i2c_gpi_unmap()
507 struct dma_slave_config *config, dma_addr_t *dma_addr_p, in geni_i2c_gpi() argument
519 peripheral = config->peripheral_config; in geni_i2c_gpi()
523 return -ENOMEM; in geni_i2c_gpi()
530 addr = dma_map_single(gi2c->se.dev->parent, dma_buf, msg->len, map_dirn); in geni_i2c_gpi()
531 if (dma_mapping_error(gi2c->se.dev->parent, addr)) { in geni_i2c_gpi()
533 return -ENOMEM; in geni_i2c_gpi()
537 peripheral->rx_len = msg->len; in geni_i2c_gpi()
538 peripheral->op = op; in geni_i2c_gpi()
540 ret = dmaengine_slave_config(dma_chan, config); in geni_i2c_gpi()
542 dev_err(gi2c->se.dev, "dma config error: %d for op:%d\n", ret, op); in geni_i2c_gpi()
546 peripheral->set_config = 0; in geni_i2c_gpi()
547 peripheral->multi_msg = true; in geni_i2c_gpi()
555 desc = dmaengine_prep_slave_single(dma_chan, addr, msg->len, dma_dirn, flags); in geni_i2c_gpi()
557 dev_err(gi2c->se.dev, "prep_slave_sg failed\n"); in geni_i2c_gpi()
558 ret = -EIO; in geni_i2c_gpi()
562 desc->callback_result = i2c_gpi_cb_result; in geni_i2c_gpi()
563 desc->callback_param = gi2c; in geni_i2c_gpi()
572 dma_unmap_single(gi2c->se.dev->parent, addr, msg->len, map_dirn); in geni_i2c_gpi()
579 struct dma_slave_config config = {}; in geni_i2c_gpi_xfer() local
584 const struct geni_i2c_clk_fld *itr = gi2c->clk_fld; in geni_i2c_gpi_xfer()
586 config.peripheral_config = &peripheral; in geni_i2c_gpi_xfer()
587 config.peripheral_size = sizeof(peripheral); in geni_i2c_gpi_xfer()
590 peripheral.cycle_count = itr->t_cycle_cnt; in geni_i2c_gpi_xfer()
591 peripheral.high_count = itr->t_high_cnt; in geni_i2c_gpi_xfer()
592 peripheral.low_count = itr->t_low_cnt; in geni_i2c_gpi_xfer()
593 peripheral.clk_div = itr->clk_div; in geni_i2c_gpi_xfer()
598 gi2c->cur = &msgs[i]; in geni_i2c_gpi_xfer()
599 gi2c->err = 0; in geni_i2c_gpi_xfer()
600 dev_dbg(gi2c->se.dev, "msg[%d].len:%d\n", i, gi2c->cur->len); in geni_i2c_gpi_xfer()
603 if (i < num - 1) in geni_i2c_gpi_xfer()
609 ret = geni_i2c_gpi(gi2c, &msgs[i], &config, in geni_i2c_gpi_xfer()
610 &rx_addr, &rx_buf, I2C_READ, gi2c->rx_c); in geni_i2c_gpi_xfer()
615 ret = geni_i2c_gpi(gi2c, &msgs[i], &config, in geni_i2c_gpi_xfer()
616 &tx_addr, &tx_buf, I2C_WRITE, gi2c->tx_c); in geni_i2c_gpi_xfer()
621 dma_async_issue_pending(gi2c->rx_c); in geni_i2c_gpi_xfer()
622 dma_async_issue_pending(gi2c->tx_c); in geni_i2c_gpi_xfer()
624 timeout = wait_for_completion_timeout(&gi2c->done, XFER_TIMEOUT); in geni_i2c_gpi_xfer()
626 dev_err(gi2c->se.dev, "I2C timeout gpi flags:%d addr:0x%x\n", in geni_i2c_gpi_xfer()
627 gi2c->cur->flags, gi2c->cur->addr); in geni_i2c_gpi_xfer()
628 gi2c->err = -ETIMEDOUT; in geni_i2c_gpi_xfer()
631 if (gi2c->err) { in geni_i2c_gpi_xfer()
632 ret = gi2c->err; in geni_i2c_gpi_xfer()
642 dev_err(gi2c->se.dev, "GPI transfer failed: %d\n", ret); in geni_i2c_gpi_xfer()
643 dmaengine_terminate_sync(gi2c->rx_c); in geni_i2c_gpi_xfer()
644 dmaengine_terminate_sync(gi2c->tx_c); in geni_i2c_gpi_xfer()
655 u32 m_param = i < (num - 1) ? STOP_STRETCH : 0; in geni_i2c_fifo_xfer()
659 gi2c->cur = &msgs[i]; in geni_i2c_fifo_xfer()
679 gi2c->err = 0; in geni_i2c_xfer()
680 reinit_completion(&gi2c->done); in geni_i2c_xfer()
681 ret = pm_runtime_get_sync(gi2c->se.dev); in geni_i2c_xfer()
683 dev_err(gi2c->se.dev, "error turning SE resources:%d\n", ret); in geni_i2c_xfer()
684 pm_runtime_put_noidle(gi2c->se.dev); in geni_i2c_xfer()
686 pm_runtime_set_suspended(gi2c->se.dev); in geni_i2c_xfer()
692 if (gi2c->gpi_mode) in geni_i2c_xfer()
697 pm_runtime_mark_last_busy(gi2c->se.dev); in geni_i2c_xfer()
698 pm_runtime_put_autosuspend(gi2c->se.dev); in geni_i2c_xfer()
699 gi2c->cur = NULL; in geni_i2c_xfer()
700 gi2c->err = 0; in geni_i2c_xfer()
724 if (gi2c->rx_c) in release_gpi_dma()
725 dma_release_channel(gi2c->rx_c); in release_gpi_dma()
727 if (gi2c->tx_c) in release_gpi_dma()
728 dma_release_channel(gi2c->tx_c); in release_gpi_dma()
735 geni_se_select_mode(&gi2c->se, GENI_GPI_DMA); in setup_gpi_dma()
736 gi2c->tx_c = dma_request_chan(gi2c->se.dev, "tx"); in setup_gpi_dma()
737 if (IS_ERR(gi2c->tx_c)) { in setup_gpi_dma()
738 ret = dev_err_probe(gi2c->se.dev, PTR_ERR(gi2c->tx_c), in setup_gpi_dma()
743 gi2c->rx_c = dma_request_chan(gi2c->se.dev, "rx"); in setup_gpi_dma()
744 if (IS_ERR(gi2c->rx_c)) { in setup_gpi_dma()
745 ret = dev_err_probe(gi2c->se.dev, PTR_ERR(gi2c->rx_c), in setup_gpi_dma()
750 dev_dbg(gi2c->se.dev, "Grabbed GPI dma channels\n"); in setup_gpi_dma()
754 dma_release_channel(gi2c->tx_c); in setup_gpi_dma()
765 struct device *dev = &pdev->dev; in geni_i2c_probe()
769 return -ENOMEM; in geni_i2c_probe()
771 gi2c->se.dev = dev; in geni_i2c_probe()
772 gi2c->se.wrapper = dev_get_drvdata(dev->parent); in geni_i2c_probe()
774 gi2c->se.base = devm_ioremap_resource(dev, res); in geni_i2c_probe()
775 if (IS_ERR(gi2c->se.base)) in geni_i2c_probe()
776 return PTR_ERR(gi2c->se.base); in geni_i2c_probe()
778 gi2c->se.clk = devm_clk_get(dev, "se"); in geni_i2c_probe()
779 if (IS_ERR(gi2c->se.clk) && !has_acpi_companion(dev)) in geni_i2c_probe()
780 return PTR_ERR(gi2c->se.clk); in geni_i2c_probe()
782 ret = device_property_read_u32(dev, "clock-frequency", in geni_i2c_probe()
783 &gi2c->clk_freq_out); in geni_i2c_probe()
786 gi2c->clk_freq_out = KHZ(100); in geni_i2c_probe()
790 ACPI_COMPANION_SET(&gi2c->adap.dev, ACPI_COMPANION(dev)); in geni_i2c_probe()
792 gi2c->irq = platform_get_irq(pdev, 0); in geni_i2c_probe()
793 if (gi2c->irq < 0) in geni_i2c_probe()
794 return gi2c->irq; in geni_i2c_probe()
799 gi2c->clk_freq_out, ret); in geni_i2c_probe()
803 gi2c->adap.algo = &geni_i2c_algo; in geni_i2c_probe()
804 init_completion(&gi2c->done); in geni_i2c_probe()
805 spin_lock_init(&gi2c->lock); in geni_i2c_probe()
807 ret = devm_request_irq(dev, gi2c->irq, geni_i2c_irq, 0, in geni_i2c_probe()
811 gi2c->irq, ret); in geni_i2c_probe()
814 /* Disable the interrupt so that the system can enter low-power mode */ in geni_i2c_probe()
815 disable_irq(gi2c->irq); in geni_i2c_probe()
816 i2c_set_adapdata(&gi2c->adap, gi2c); in geni_i2c_probe()
817 gi2c->adap.dev.parent = dev; in geni_i2c_probe()
818 gi2c->adap.dev.of_node = dev->of_node; in geni_i2c_probe()
819 strscpy(gi2c->adap.name, "Geni-I2C", sizeof(gi2c->adap.name)); in geni_i2c_probe()
821 ret = geni_icc_get(&gi2c->se, "qup-memory"); in geni_i2c_probe()
829 gi2c->se.icc_paths[GENI_TO_CORE].avg_bw = GENI_DEFAULT_BW; in geni_i2c_probe()
830 gi2c->se.icc_paths[CPU_TO_GENI].avg_bw = GENI_DEFAULT_BW; in geni_i2c_probe()
831 gi2c->se.icc_paths[GENI_TO_DDR].avg_bw = Bps_to_icc(gi2c->clk_freq_out); in geni_i2c_probe()
833 ret = geni_icc_set_bw(&gi2c->se); in geni_i2c_probe()
837 ret = geni_se_resources_on(&gi2c->se); in geni_i2c_probe()
842 proto = geni_se_read_proto(&gi2c->se); in geni_i2c_probe()
845 geni_se_resources_off(&gi2c->se); in geni_i2c_probe()
846 return -ENXIO; in geni_i2c_probe()
849 fifo_disable = readl_relaxed(gi2c->se.base + GENI_IF_DISABLE_RO) & FIFO_IF_DISABLE; in geni_i2c_probe()
851 /* FIFO is disabled, so we can only use GPI DMA */ in geni_i2c_probe()
852 gi2c->gpi_mode = true; in geni_i2c_probe()
855 return dev_err_probe(dev, ret, "Failed to setup GPI DMA mode\n"); in geni_i2c_probe()
857 dev_dbg(dev, "Using GPI DMA mode for I2C\n"); in geni_i2c_probe()
859 gi2c->gpi_mode = false; in geni_i2c_probe()
860 tx_depth = geni_se_get_tx_fifo_depth(&gi2c->se); in geni_i2c_probe()
861 gi2c->tx_wm = tx_depth - 1; in geni_i2c_probe()
862 geni_se_init(&gi2c->se, gi2c->tx_wm, tx_depth); in geni_i2c_probe()
863 geni_se_config_packing(&gi2c->se, BITS_PER_BYTE, in geni_i2c_probe()
866 dev_dbg(dev, "i2c fifo/se-dma mode. fifo depth:%d\n", tx_depth); in geni_i2c_probe()
869 ret = geni_se_resources_off(&gi2c->se); in geni_i2c_probe()
875 ret = geni_icc_disable(&gi2c->se); in geni_i2c_probe()
879 gi2c->suspended = 1; in geni_i2c_probe()
880 pm_runtime_set_suspended(gi2c->se.dev); in geni_i2c_probe()
881 pm_runtime_set_autosuspend_delay(gi2c->se.dev, I2C_AUTO_SUSPEND_DELAY); in geni_i2c_probe()
882 pm_runtime_use_autosuspend(gi2c->se.dev); in geni_i2c_probe()
883 pm_runtime_enable(gi2c->se.dev); in geni_i2c_probe()
885 ret = i2c_add_adapter(&gi2c->adap); in geni_i2c_probe()
888 pm_runtime_disable(gi2c->se.dev); in geni_i2c_probe()
892 dev_dbg(dev, "Geni-I2C adaptor successfully added\n"); in geni_i2c_probe()
905 i2c_del_adapter(&gi2c->adap); in geni_i2c_remove()
907 pm_runtime_disable(gi2c->se.dev); in geni_i2c_remove()
916 i2c_mark_adapter_suspended(&gi2c->adap); in geni_i2c_shutdown()
924 disable_irq(gi2c->irq); in geni_i2c_runtime_suspend()
925 ret = geni_se_resources_off(&gi2c->se); in geni_i2c_runtime_suspend()
927 enable_irq(gi2c->irq); in geni_i2c_runtime_suspend()
931 gi2c->suspended = 1; in geni_i2c_runtime_suspend()
934 return geni_icc_disable(&gi2c->se); in geni_i2c_runtime_suspend()
942 ret = geni_icc_enable(&gi2c->se); in geni_i2c_runtime_resume()
946 ret = geni_se_resources_on(&gi2c->se); in geni_i2c_runtime_resume()
950 enable_irq(gi2c->irq); in geni_i2c_runtime_resume()
951 gi2c->suspended = 0; in geni_i2c_runtime_resume()
959 i2c_mark_adapter_suspended(&gi2c->adap); in geni_i2c_suspend_noirq()
961 if (!gi2c->suspended) { in geni_i2c_suspend_noirq()
974 i2c_mark_adapter_resumed(&gi2c->adap); in geni_i2c_resume_noirq()
985 { .compatible = "qcom,geni-i2c" },