]> Git Repo - J-linux.git/commitdiff
Merge tag 'i2c-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
authorLinus Torvalds <[email protected]>
Tue, 31 May 2022 21:34:00 +0000 (14:34 -0700)
committerLinus Torvalds <[email protected]>
Tue, 31 May 2022 21:34:00 +0000 (14:34 -0700)
Pull i2c updates from Wolfram Sang:
 "Only driver updates for 5.19.

  Bigger changes are for Meson, NPCM, and R-Car, but there are also
  changes all over the place"

* tag 'i2c-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (34 commits)
  i2c: meson: fix typo in comment
  i2c: rcar: use flags instead of atomic_xfer
  i2c: rcar: REP_AFTER_RD is not a persistent flag
  i2c: rcar: use BIT macro consistently
  i2c: qcom-geni: remove unnecessary conditions
  i2c: mt7621: Use devm_platform_get_and_ioremap_resource()
  i2c: rcar: refactor handling of first message
  i2c: rcar: avoid race condition with SMIs
  i2c: xiic: Correct the datatype for rx_watermark
  i2c: rcar: fix PM ref counts in probe error paths
  i2c: npcm: Handle spurious interrupts
  i2c: npcm: Correct register access width
  i2c: npcm: Add tx complete counter
  i2c: npcm: Fix timeout calculation
  i2c: npcm: Remove unused variable clk_regmap
  i2c: npcm: Change the way of getting GCR regmap
  i2c: xiic: Fix Tx Interrupt path for grouped messages
  i2c: xiic: Fix coding style issues
  i2c: xiic: return value of xiic_reinit
  i2c: cadence: Increase timeout per message if necessary
  ...

1  2 
drivers/i2c/busses/i2c-mt7621.c
drivers/i2c/busses/i2c-qcom-geni.c

index 901f0fb04fee4ba3d09f2ce9650d93f45f75d98f,0c003c76b5c9748110f727319e178db9ad55e255..cfe6de8175dde8abde94a900622bd3f29f59333e
@@@ -270,18 -270,15 +270,15 @@@ static void mtk_i2c_init(struct mtk_i2
  
  static int mtk_i2c_probe(struct platform_device *pdev)
  {
-       struct resource *res;
        struct mtk_i2c *i2c;
        struct i2c_adapter *adap;
        int ret;
  
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        i2c = devm_kzalloc(&pdev->dev, sizeof(struct mtk_i2c), GFP_KERNEL);
        if (!i2c)
                return -ENOMEM;
  
-       i2c->base = devm_ioremap_resource(&pdev->dev, res);
+       i2c->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
        if (IS_ERR(i2c->base))
                return PTR_ERR(i2c->base);
  
  
        if (i2c->bus_freq == 0) {
                dev_warn(i2c->dev, "clock-frequency 0 not supported\n");
 -              return -EINVAL;
 +              ret = -EINVAL;
 +              goto err_disable_clk;
        }
  
        adap = &i2c->adap;
  
        ret = i2c_add_adapter(adap);
        if (ret < 0)
 -              return ret;
 +              goto err_disable_clk;
  
        dev_info(&pdev->dev, "clock %u kHz\n", i2c->bus_freq / 1000);
  
 +      return 0;
 +
 +err_disable_clk:
 +      clk_disable_unprepare(i2c->clk);
 +
        return ret;
  }
  
index 5b920f0fc7dd79c5033d3182cbbc27f46e0bdb64,17915c98c2c430d5eaf48a3e7449065910eac0ae..6ac402ea58fbe1b351fc681ee358479d5310ca5a
@@@ -727,16 -727,14 +727,14 @@@ static int setup_gpi_dma(struct geni_i2
        if (IS_ERR(gi2c->tx_c)) {
                ret = dev_err_probe(gi2c->se.dev, PTR_ERR(gi2c->tx_c),
                                    "Failed to get tx DMA ch\n");
-               if (ret < 0)
-                       goto err_tx;
+               goto err_tx;
        }
  
        gi2c->rx_c = dma_request_chan(gi2c->se.dev, "rx");
        if (IS_ERR(gi2c->rx_c)) {
                ret = dev_err_probe(gi2c->se.dev, PTR_ERR(gi2c->rx_c),
                                    "Failed to get rx DMA ch\n");
-               if (ret < 0)
-                       goto err_rx;
+               goto err_rx;
        }
  
        dev_dbg(gi2c->se.dev, "Grabbed GPI dma channels\n");
@@@ -843,8 -841,10 +841,8 @@@ static int geni_i2c_probe(struct platfo
                /* FIFO is disabled, so we can only use GPI DMA */
                gi2c->gpi_mode = true;
                ret = setup_gpi_dma(gi2c);
 -              if (ret) {
 -                      dev_err(dev, "Failed to setup GPI DMA mode:%d ret\n", ret);
 -                      return ret;
 -              }
 +              if (ret)
 +                      return dev_err_probe(dev, ret, "Failed to setup GPI DMA mode\n");
  
                dev_dbg(dev, "Using GPI DMA mode for I2C\n");
        } else {
This page took 0.064308 seconds and 4 git commands to generate.