Loading drivers/i2c/busses/i2c-msm-geni.c +14 −1 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ struct geni_i2c_dev { bool gpi_reset; bool disable_dma_mode; bool prev_cancel_pending; //Halt cancel till IOS in good state bool is_i2c_rtl_based; /* doing pending cancel only for rtl based SE's */ }; static struct geni_i2c_dev *gi2c_dev_dbg[MAX_SE]; Loading Loading @@ -247,6 +248,10 @@ static int do_pending_cancel(struct geni_i2c_dev *gi2c) int timeout = 0; u32 geni_ios = 0; /* doing pending cancel only rtl based SE's */ if (!gi2c->is_i2c_rtl_based) return 0; geni_ios = geni_read_reg_nolog(gi2c->base, SE_GENI_IOS); if ((geni_ios & 0x3) != 0x3) { /* Try to restore IOS with FORCE_DEFAULT */ Loading Loading @@ -1060,9 +1065,12 @@ static int geni_i2c_xfer(struct i2c_adapter *adap, // WAR : Complete previous pending cancel cmd if (gi2c->prev_cancel_pending) { ret = do_pending_cancel(gi2c); if (ret) if (ret) { pm_runtime_mark_last_busy(gi2c->dev); pm_runtime_put_autosuspend(gi2c->dev); return ret; //Don't perform xfer is cancel failed } } GENI_SE_DBG(gi2c->ipcl, false, gi2c->dev, "n:%d addr:0x%x\n", num, msgs[0].addr); Loading Loading @@ -1324,6 +1332,11 @@ static int geni_i2c_probe(struct platform_device *pdev) if (of_property_read_bool(pdev->dev.of_node, "qcom,leica-used-i2c")) gi2c->i2c_rsc.skip_bw_vote = true; if (of_property_read_bool(pdev->dev.of_node, "qcom,rtl_se")) { gi2c->is_i2c_rtl_based = true; dev_info(&pdev->dev, "%s: RTL based SE\n", __func__); } gi2c->i2c_rsc.wrapper_dev = &wrapper_pdev->dev; gi2c->i2c_rsc.ctrl_dev = gi2c->dev; Loading Loading
drivers/i2c/busses/i2c-msm-geni.c +14 −1 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ struct geni_i2c_dev { bool gpi_reset; bool disable_dma_mode; bool prev_cancel_pending; //Halt cancel till IOS in good state bool is_i2c_rtl_based; /* doing pending cancel only for rtl based SE's */ }; static struct geni_i2c_dev *gi2c_dev_dbg[MAX_SE]; Loading Loading @@ -247,6 +248,10 @@ static int do_pending_cancel(struct geni_i2c_dev *gi2c) int timeout = 0; u32 geni_ios = 0; /* doing pending cancel only rtl based SE's */ if (!gi2c->is_i2c_rtl_based) return 0; geni_ios = geni_read_reg_nolog(gi2c->base, SE_GENI_IOS); if ((geni_ios & 0x3) != 0x3) { /* Try to restore IOS with FORCE_DEFAULT */ Loading Loading @@ -1060,9 +1065,12 @@ static int geni_i2c_xfer(struct i2c_adapter *adap, // WAR : Complete previous pending cancel cmd if (gi2c->prev_cancel_pending) { ret = do_pending_cancel(gi2c); if (ret) if (ret) { pm_runtime_mark_last_busy(gi2c->dev); pm_runtime_put_autosuspend(gi2c->dev); return ret; //Don't perform xfer is cancel failed } } GENI_SE_DBG(gi2c->ipcl, false, gi2c->dev, "n:%d addr:0x%x\n", num, msgs[0].addr); Loading Loading @@ -1324,6 +1332,11 @@ static int geni_i2c_probe(struct platform_device *pdev) if (of_property_read_bool(pdev->dev.of_node, "qcom,leica-used-i2c")) gi2c->i2c_rsc.skip_bw_vote = true; if (of_property_read_bool(pdev->dev.of_node, "qcom,rtl_se")) { gi2c->is_i2c_rtl_based = true; dev_info(&pdev->dev, "%s: RTL based SE\n", __func__); } gi2c->i2c_rsc.wrapper_dev = &wrapper_pdev->dev; gi2c->i2c_rsc.ctrl_dev = gi2c->dev; Loading