realtek: Refresh kernel patches
authorHauke Mehrtens <[email protected]>
Fri, 3 Oct 2025 12:15:40 +0000 (14:15 +0200)
committerHauke Mehrtens <[email protected]>
Fri, 3 Oct 2025 12:17:14 +0000 (14:17 +0200)
I just ran: make target/{clean,refresh} V=99

Fixes: 272a392fe19e ("realtek: rtl93xx: replace pending I2C patches with upstreamed patches")
Signed-off-by: Hauke Mehrtens <[email protected]>
18 files changed:
target/linux/realtek/patches-6.12/005-01-v6.17-i2c-rtl9300-Fix-out-of-bounds-bug-in-rtl9300_i2c_smb.patch
target/linux/realtek/patches-6.12/005-02-v6.17-i2c-rtl9300-Fix-multi-byte-I2C-write.patch
target/linux/realtek/patches-6.12/005-03-v6.17-i2c-rtl9300-Increase-timeout-for-transfer-polling.patch
target/linux/realtek/patches-6.12/005-04-v6.17-i2c-rtl9300-Add-missing-count-byte-for-SMBus-Block-O.patch
target/linux/realtek/patches-6.12/006-01-v6.17-i2c-rtl9300-fix-channel-number-bound-check.patch
target/linux/realtek/patches-6.12/006-02-v6.17-i2c-rtl9300-ensure-data-length-is-within-supported-r.patch
target/linux/realtek/patches-6.12/006-03-v6.17-i2c-rtl9300-remove-broken-SMBus-Quick-operation-supp.patch
target/linux/realtek/patches-6.12/007-01-v6.17-i2c-rtl9300-Drop-unsupported-I2C_FUNC_SMBUS_I2C_BLOC.patch
target/linux/realtek/patches-6.12/007-02-v6.18-i2c-rtl9300-Implement-I2C-block-read-and-write.patch
target/linux/realtek/patches-6.12/008-01-v6.18-i2c-rtl9300-use-regmap-fields-and-API-for-registers.patch
target/linux/realtek/patches-6.12/008-02-v6.18-dt-bindings-i2c-realtek-rtl9301-i2c-fix-wording-and-.patch
target/linux/realtek/patches-6.12/008-03-v6.18-i2c-rtl9300-rename-internal-sda_pin-to-sda_num.patch
target/linux/realtek/patches-6.12/008-04-v6.18-i2c-rtl9300-move-setting-SCL-frequency-to-config_io.patch
target/linux/realtek/patches-6.12/008-05-v6.18-i2c-rtl9300-do-not-set-read-mode-on-every-transfer.patch
target/linux/realtek/patches-6.12/008-06-v6.18-i2c-rtl9300-separate-xfer-configuration-and-executio.patch
target/linux/realtek/patches-6.12/008-07-v6.18-i2c-rtl9300-use-scoped-guard-instead-of-explicit-loc.patch
target/linux/realtek/patches-6.12/008-08-v6.18-dt-bindings-i2c-realtek-rtl9301-i2c-extend-for-RTL93.patch
target/linux/realtek/patches-6.12/008-09-v6.18-i2c-rtl9300-add-support-for-RTL9310-I2C-controller.patch

index 98196db1206e344b6dfd0ab01bbb8c9eab78cf0c..2ffb6596430be2af4a97875dc952da78b4c3e0f0 100644 (file)
@@ -23,11 +23,9 @@ Signed-off-by: Sven Eckelmann <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index e064e8a4a1f0..568495720810 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
-@@ -281,6 +281,10 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
+@@ -281,6 +281,10 @@ static int rtl9300_i2c_smbus_xfer(struct
                ret = rtl9300_i2c_reg_addr_set(i2c, command, 1);
                if (ret)
                        goto out_unlock;
@@ -38,6 +36,3 @@ index e064e8a4a1f0..568495720810 100644
                ret = rtl9300_i2c_config_xfer(i2c, chan, addr, data->block[0]);
                if (ret)
                        goto out_unlock;
--- 
-2.48.1
-
index 7e60da6012ece2dd4e817fc3851c59f24e702576..ac6bb52603b945809fa9d4cbb6e5e008ca232588 100644 (file)
@@ -56,11 +56,9 @@ Tested-by: Chris Packham <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index 568495720810..4a538b266080 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
-@@ -143,10 +143,10 @@ static int rtl9300_i2c_write(struct rtl9300_i2c *i2c, u8 *buf, int len)
+@@ -143,10 +143,10 @@ static int rtl9300_i2c_write(struct rtl9
                return -EIO;
  
        for (i = 0; i < len; i++) {
@@ -75,6 +73,3 @@ index 568495720810..4a538b266080 100644
        }
  
        return regmap_bulk_write(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0,
--- 
-2.48.1
-
index 5bf9c8c22820916ec584a4837ae9b345ed5e4685..bfb4f4875d8bce7a6b37711328f9a8be263eb4bd 100644 (file)
@@ -24,11 +24,9 @@ Tested-by: Chris Packham <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index 4a538b266080..4a282d57e2c1 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
-@@ -175,7 +175,7 @@ static int rtl9300_i2c_execute_xfer(struct rtl9300_i2c *i2c, char read_write,
+@@ -175,7 +175,7 @@ static int rtl9300_i2c_execute_xfer(stru
                return ret;
  
        ret = regmap_read_poll_timeout(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL1,
@@ -37,6 +35,3 @@ index 4a538b266080..4a282d57e2c1 100644
        if (ret)
                return ret;
  
--- 
-2.48.1
-
index c56fbb93c538557abbde6dc80f4696597e78a7a9..b5314b258a4d15d0f8cafd587ac8404a636e098c 100644 (file)
@@ -30,11 +30,9 @@ Tested-by: Chris Packham <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index 4a282d57e2c1..cfafe089102a 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
-@@ -285,15 +285,15 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
+@@ -285,15 +285,15 @@ static int rtl9300_i2c_smbus_xfer(struct
                        ret = -EINVAL;
                        goto out_unlock;
                }
@@ -53,6 +51,3 @@ index 4a282d57e2c1..cfafe089102a 100644
                break;
  
        default:
--- 
-2.48.1
-
index 662af6c141b22b92886e928f7b195bc518a9d4a9..2076a0ad68e4d8a88dffaf59f8ffbc5ef324d9b8 100644 (file)
@@ -27,11 +27,9 @@ Tested-by: Markus Stockhausen <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index cfafe089102a..1a63790f1957 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
-@@ -353,7 +353,7 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)
+@@ -353,7 +353,7 @@ static int rtl9300_i2c_probe(struct plat
  
        platform_set_drvdata(pdev, i2c);
  
@@ -40,6 +38,3 @@ index cfafe089102a..1a63790f1957 100644
                return dev_err_probe(dev, -EINVAL, "Too many channels\n");
  
        device_for_each_child_node(dev, child) {
--- 
-2.48.1
-
index f83f5de279899391ac976f636c6958c49cdb8ccb..382c47a882beb0a36ea0795d211c2d62319bc579 100644 (file)
@@ -38,11 +38,9 @@ Tested-by: Markus Stockhausen <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index 1a63790f1957..2b3e80aa1bdf 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
-@@ -99,6 +99,9 @@ static int rtl9300_i2c_config_xfer(struct rtl9300_i2c *i2c, struct rtl9300_i2c_c
+@@ -99,6 +99,9 @@ static int rtl9300_i2c_config_xfer(struc
  {
        u32 val, mask;
  
@@ -52,7 +50,7 @@ index 1a63790f1957..2b3e80aa1bdf 100644
        val = chan->bus_freq << RTL9300_I2C_MST_CTRL2_SCL_FREQ_OFS;
        mask = RTL9300_I2C_MST_CTRL2_SCL_FREQ_MASK;
  
-@@ -323,7 +326,7 @@ static const struct i2c_algorithm rtl9300_i2c_algo = {
+@@ -323,7 +326,7 @@ static const struct i2c_algorithm rtl930
  };
  
  static struct i2c_adapter_quirks rtl9300_i2c_quirks = {
@@ -61,6 +59,3 @@ index 1a63790f1957..2b3e80aa1bdf 100644
        .max_read_len   = 16,
        .max_write_len  = 16,
  };
--- 
-2.48.1
-
index dc5360e63d0b830642b3590faca7e77a3e4ced5a..6de11af54f63aaf052b8673a2898387105345bee 100644 (file)
@@ -44,11 +44,9 @@ Tested-by: Markus Stockhausen <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index 2b3e80aa1bdf..9e1f71fed0fe 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
-@@ -225,15 +225,6 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
+@@ -225,15 +225,6 @@ static int rtl9300_i2c_smbus_xfer(struct
        }
  
        switch (size) {
@@ -64,7 +62,7 @@ index 2b3e80aa1bdf..9e1f71fed0fe 100644
        case I2C_SMBUS_BYTE:
                if (read_write == I2C_SMBUS_WRITE) {
                        ret = rtl9300_i2c_config_xfer(i2c, chan, addr, 0);
-@@ -315,9 +306,9 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
+@@ -315,9 +306,9 @@ out_unlock:
  
  static u32 rtl9300_i2c_func(struct i2c_adapter *a)
  {
@@ -77,6 +75,3 @@ index 2b3e80aa1bdf..9e1f71fed0fe 100644
  }
  
  static const struct i2c_algorithm rtl9300_i2c_algo = {
--- 
-2.48.1
-
index 5c7043057315f056351610c1636dc6094068b95f..901c48abdc55dbdcab1d43659d2a963c15039c5b 100644 (file)
@@ -12,11 +12,9 @@ Fixes: ede965fd555a ("i2c: rtl9300: remove broken SMBus Quick operation support"
 Signed-off-by: Sven Eckelmann <[email protected]>
 Signed-off-by: Wolfram Sang <[email protected]>
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index 9e1f71fed0fe..af991b28e4f8 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
-@@ -307,8 +307,7 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
+@@ -307,8 +307,7 @@ out_unlock:
  static u32 rtl9300_i2c_func(struct i2c_adapter *a)
  {
        return I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA |
@@ -26,6 +24,3 @@ index 9e1f71fed0fe..af991b28e4f8 100644
  }
  
  static const struct i2c_algorithm rtl9300_i2c_algo = {
--- 
-2.48.1
-
index 490f5df795ce5b7fe923f1c78155c9795ed5cf63..d97b76993bc67b09667952d626d86e861ae10260 100644 (file)
@@ -43,11 +43,9 @@ Tested-by: Chris Packham <[email protected]>
 Reviewed-by: Jonas Jelonek <[email protected]>
 Tested-by: Jonas Jelonek <[email protected]>
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index af991b28e4f8..9e6232075137 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
-@@ -186,22 +186,32 @@ static int rtl9300_i2c_execute_xfer(struct rtl9300_i2c *i2c, char read_write,
+@@ -186,22 +186,32 @@ static int rtl9300_i2c_execute_xfer(stru
                return -EIO;
  
        if (read_write == I2C_SMBUS_READ) {
@@ -83,7 +81,7 @@ index af991b28e4f8..9e6232075137 100644
                }
        }
  
-@@ -290,6 +300,25 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
+@@ -290,6 +300,25 @@ static int rtl9300_i2c_smbus_xfer(struct
                len = data->block[0] + 1;
                break;
  
@@ -109,7 +107,7 @@ index af991b28e4f8..9e6232075137 100644
        default:
                dev_err(&adap->dev, "Unsupported transaction %d\n", size);
                ret = -EOPNOTSUPP;
-@@ -307,7 +336,8 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
+@@ -307,7 +336,8 @@ out_unlock:
  static u32 rtl9300_i2c_func(struct i2c_adapter *a)
  {
        return I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA |
@@ -119,6 +117,3 @@ index af991b28e4f8..9e6232075137 100644
  }
  
  static const struct i2c_algorithm rtl9300_i2c_algo = {
--- 
-2.48.1
-
index 92292d7d63f0f530aeca53625ea7f83be002ded8..30bd16ee694af1a56392ae1c1a5afb9a9d0cc149 100644 (file)
@@ -26,8 +26,6 @@ Tested-by: Markus Stockhausen <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index 9e6232075137..8483bab72146 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
 @@ -23,97 +23,117 @@ struct rtl9300_i2c_chan {
@@ -190,7 +188,7 @@ index 9e6232075137..8483bab72146 100644
  }
  
  static int rtl9300_i2c_read(struct rtl9300_i2c *i2c, u8 *buf, int len)
-@@ -124,8 +144,7 @@ static int rtl9300_i2c_read(struct rtl9300_i2c *i2c, u8 *buf, int len)
+@@ -124,8 +144,7 @@ static int rtl9300_i2c_read(struct rtl93
        if (len > 16)
                return -EIO;
  
@@ -200,7 +198,7 @@ index 9e6232075137..8483bab72146 100644
        if (ret)
                return ret;
  
-@@ -152,52 +171,49 @@ static int rtl9300_i2c_write(struct rtl9300_i2c *i2c, u8 *buf, int len)
+@@ -152,52 +171,49 @@ static int rtl9300_i2c_write(struct rtl9
                vals[reg] |= buf[i] << shift;
        }
  
@@ -267,7 +265,7 @@ index 9e6232075137..8483bab72146 100644
                        if (ret)
                                return ret;
                        data->word = val & 0xffff;
-@@ -355,9 +371,11 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)
+@@ -355,9 +371,11 @@ static int rtl9300_i2c_probe(struct plat
  {
        struct device *dev = &pdev->dev;
        struct rtl9300_i2c *i2c;
@@ -280,7 +278,7 @@ index 9e6232075137..8483bab72146 100644
  
        i2c = devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL);
        if (!i2c)
-@@ -376,9 +394,22 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)
+@@ -376,9 +394,22 @@ static int rtl9300_i2c_probe(struct plat
  
        platform_set_drvdata(pdev, i2c);
  
@@ -304,7 +302,7 @@ index 9e6232075137..8483bab72146 100644
        device_for_each_child_node(dev, child) {
                struct rtl9300_i2c_chan *chan = &i2c->chans[i];
                struct i2c_adapter *adap = &chan->adap;
-@@ -395,7 +426,6 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)
+@@ -395,7 +426,6 @@ static int rtl9300_i2c_probe(struct plat
                case I2C_MAX_STANDARD_MODE_FREQ:
                        chan->bus_freq = RTL9300_I2C_STD_FREQ;
                        break;
@@ -312,7 +310,7 @@ index 9e6232075137..8483bab72146 100644
                case I2C_MAX_FAST_MODE_FREQ:
                        chan->bus_freq = RTL9300_I2C_FAST_FREQ;
                        break;
-@@ -427,11 +457,37 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)
+@@ -427,11 +457,37 @@ static int rtl9300_i2c_probe(struct plat
        return 0;
  }
  
@@ -354,6 +352,3 @@ index 9e6232075137..8483bab72146 100644
        {}
  };
  MODULE_DEVICE_TABLE(of, i2c_rtl9300_dt_ids);
--- 
-2.48.1
-
index a94c02e3efb7da3e834ca8698a175525c376270d..1eefe48af0cec083d477a71221783c83c7e3c58b 100644 (file)
@@ -20,8 +20,6 @@ Tested-by: Markus Stockhausen <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml b/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
-index 69ac5db8b914..274e2ab8b612 100644
 --- a/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
 +++ b/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
 @@ -10,7 +10,7 @@ maintainers:
@@ -51,6 +49,3 @@ index 69ac5db8b914..274e2ab8b612 100644
          maxItems: 1
  
      required:
--- 
-2.48.1
-
index 0983b358b20f25951224ab8c8bbe689c2ec43d8b..37f09766ff0f81b8a06625ba1675641772f0468e 100644 (file)
@@ -19,8 +19,6 @@ Tested-by: Markus Stockhausen <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index 8483bab72146..f9b5ac7670c2 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
 @@ -20,7 +20,7 @@ struct rtl9300_i2c_chan {
@@ -41,7 +39,7 @@ index 8483bab72146..f9b5ac7670c2 100644
        struct mutex lock;
  };
  
-@@ -102,11 +102,11 @@ static int rtl9300_i2c_config_io(struct rtl9300_i2c *i2c, u8 sda_pin)
+@@ -102,11 +102,11 @@ static int rtl9300_i2c_config_io(struct
  
        drv_data = (struct rtl9300_i2c_drv_data *)device_get_match_data(i2c->dev);
  
@@ -55,7 +53,7 @@ index 8483bab72146..f9b5ac7670c2 100644
        if (ret)
                return ret;
  
-@@ -243,11 +243,11 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
+@@ -243,11 +243,11 @@ static int rtl9300_i2c_smbus_xfer(struct
        int len = 0, ret;
  
        mutex_lock(&i2c->lock);
@@ -69,7 +67,7 @@ index 8483bab72146..f9b5ac7670c2 100644
        }
  
        switch (size) {
-@@ -374,7 +374,7 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)
+@@ -374,7 +374,7 @@ static int rtl9300_i2c_probe(struct plat
        struct fwnode_handle *child;
        struct rtl9300_i2c_drv_data *drv_data;
        struct reg_field fields[F_NUM_FIELDS];
@@ -78,7 +76,7 @@ index 8483bab72146..f9b5ac7670c2 100644
        int ret, i = 0;
  
        i2c = devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL);
-@@ -414,7 +414,7 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)
+@@ -414,7 +414,7 @@ static int rtl9300_i2c_probe(struct plat
                struct rtl9300_i2c_chan *chan = &i2c->chans[i];
                struct i2c_adapter *adap = &chan->adap;
  
@@ -87,7 +85,7 @@ index 8483bab72146..f9b5ac7670c2 100644
                if (ret)
                        return ret;
  
-@@ -431,11 +431,11 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)
+@@ -431,11 +431,11 @@ static int rtl9300_i2c_probe(struct plat
                        break;
                default:
                        dev_warn(i2c->dev, "SDA%d clock-frequency %d not supported using default\n",
@@ -101,7 +99,7 @@ index 8483bab72146..f9b5ac7670c2 100644
                chan->i2c = i2c;
                adap = &i2c->chans[i].adap;
                adap->owner = THIS_MODULE;
-@@ -445,14 +445,14 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)
+@@ -445,14 +445,14 @@ static int rtl9300_i2c_probe(struct plat
                adap->dev.parent = dev;
                i2c_set_adapdata(adap, chan);
                adap->dev.of_node = to_of_node(child);
@@ -118,6 +116,3 @@ index 8483bab72146..f9b5ac7670c2 100644
  
        return 0;
  }
--- 
-2.48.1
-
index 4403d99d9f32b27bab9d7282fa3d395e7722d9d9..8620ce9fe04958a7d776373274eafb4b1e1e35e6 100644 (file)
@@ -16,11 +16,9 @@ Tested-by: Markus Stockhausen <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index f9b5ac7670c2..4177cfb77094 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
-@@ -95,18 +95,23 @@ static int rtl9300_i2c_select_scl(struct rtl9300_i2c *i2c, u8 scl)
+@@ -95,18 +95,23 @@ static int rtl9300_i2c_select_scl(struct
        return regmap_field_write(i2c->fields[F_SCL_SEL], 1);
  }
  
@@ -47,7 +45,7 @@ index f9b5ac7670c2..4177cfb77094 100644
        if (ret)
                return ret;
  
-@@ -121,10 +126,6 @@ static int rtl9300_i2c_config_xfer(struct rtl9300_i2c *i2c, struct rtl9300_i2c_c
+@@ -121,10 +126,6 @@ static int rtl9300_i2c_config_xfer(struc
        if (len < 1 || len > 16)
                return -EINVAL;
  
@@ -58,7 +56,7 @@ index f9b5ac7670c2..4177cfb77094 100644
        ret = regmap_field_write(i2c->fields[F_DEV_ADDR], addr);
        if (ret)
                return ret;
-@@ -244,7 +245,7 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
+@@ -244,7 +245,7 @@ static int rtl9300_i2c_smbus_xfer(struct
  
        mutex_lock(&i2c->lock);
        if (chan->sda_num != i2c->sda_num) {
@@ -67,6 +65,3 @@ index f9b5ac7670c2..4177cfb77094 100644
                if (ret)
                        goto out_unlock;
                i2c->sda_num = chan->sda_num;
--- 
-2.48.1
-
index 3cc90210f27ce890105ee8f5db3cb0e33d19cc7f..5dc6878e5b077a94087cc2dd0c698fbc755b4c62 100644 (file)
@@ -20,11 +20,9 @@ Tested-by: Markus Stockhausen <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index 4177cfb77094..9e3517b09b3d 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
-@@ -130,11 +130,7 @@ static int rtl9300_i2c_config_xfer(struct rtl9300_i2c *i2c, struct rtl9300_i2c_c
+@@ -130,11 +130,7 @@ static int rtl9300_i2c_config_xfer(struc
        if (ret)
                return ret;
  
@@ -37,7 +35,7 @@ index 4177cfb77094..9e3517b09b3d 100644
  }
  
  static int rtl9300_i2c_read(struct rtl9300_i2c *i2c, u8 *buf, int len)
-@@ -455,6 +451,11 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)
+@@ -455,6 +451,11 @@ static int rtl9300_i2c_probe(struct plat
        }
        i2c->sda_num = 0xff;
  
@@ -49,6 +47,3 @@ index 4177cfb77094..9e3517b09b3d 100644
        return 0;
  }
  
--- 
-2.48.1
-
index c7b4ea58dcb94ffc0fba23aa22b4b1cfb447ff56..2d329fdb4cab883d1807bf734272e34124de0fc1 100644 (file)
@@ -41,8 +41,6 @@ Tested-by: Markus Stockhausen <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index 9e3517b09b3d..fb3ebbd46a18 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
 @@ -8,6 +8,7 @@
@@ -76,7 +74,7 @@ index 9e3517b09b3d..fb3ebbd46a18 100644
  #define RTL9300_I2C_MST_CTRL1                         0x0
  #define RTL9300_I2C_MST_CTRL2                         0x4
  #define RTL9300_I2C_MST_DATA_WORD0                    0x8
-@@ -95,45 +112,37 @@ static int rtl9300_i2c_select_scl(struct rtl9300_i2c *i2c, u8 scl)
+@@ -95,45 +112,37 @@ static int rtl9300_i2c_select_scl(struct
        return regmap_field_write(i2c->fields[F_SCL_SEL], 1);
  }
  
@@ -134,7 +132,7 @@ index 9e3517b09b3d..fb3ebbd46a18 100644
  {
        u32 vals[4] = {};
        int i, ret;
-@@ -153,7 +162,7 @@ static int rtl9300_i2c_read(struct rtl9300_i2c *i2c, u8 *buf, int len)
+@@ -153,7 +162,7 @@ static int rtl9300_i2c_read(struct rtl93
        return 0;
  }
  
@@ -143,7 +141,7 @@ index 9e3517b09b3d..fb3ebbd46a18 100644
  {
        u32 vals[4] = {};
        int i;
-@@ -176,16 +185,51 @@ static int rtl9300_i2c_writel(struct rtl9300_i2c *i2c, u32 data)
+@@ -176,16 +185,51 @@ static int rtl9300_i2c_writel(struct rtl
        return regmap_write(i2c->regmap, i2c->data_reg, data);
  }
  
@@ -159,9 +157,9 @@ index 9e3517b09b3d..fb3ebbd46a18 100644
 +              return -EINVAL;
 +
 +      ret = regmap_field_write(i2c->fields[F_DEV_ADDR], xfer->dev_addr);
-+      if (ret)
-+              return ret;
-+
+       if (ret)
+               return ret;
 +      ret = rtl9300_i2c_reg_addr_set(i2c, xfer->reg_addr, xfer->reg_addr_len);
 +      if (ret)
 +              return ret;
@@ -171,9 +169,9 @@ index 9e3517b09b3d..fb3ebbd46a18 100644
 +              return ret;
 +
 +      ret = regmap_field_write(i2c->fields[F_DATA_WIDTH], (xfer->data_len - 1) & 0xf);
-       if (ret)
-               return ret;
++      if (ret)
++              return ret;
++
 +      if (xfer->write) {
 +              switch (xfer->type) {
 +              case RTL9300_I2C_XFER_BYTE:
@@ -199,7 +197,7 @@ index 9e3517b09b3d..fb3ebbd46a18 100644
        ret = regmap_field_write(i2c->fields[F_I2C_TRIG], 1);
        if (ret)
                return ret;
-@@ -200,28 +244,24 @@ static int rtl9300_i2c_execute_xfer(struct rtl9300_i2c *i2c, char read_write,
+@@ -200,28 +244,24 @@ static int rtl9300_i2c_execute_xfer(stru
        if (val)
                return -EIO;
  
@@ -237,7 +235,7 @@ index 9e3517b09b3d..fb3ebbd46a18 100644
                        if (ret)
                                return ret;
                        break;
-@@ -237,108 +277,62 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
+@@ -237,108 +277,62 @@ static int rtl9300_i2c_smbus_xfer(struct
  {
        struct rtl9300_i2c_chan *chan = i2c_get_adapdata(adap);
        struct rtl9300_i2c *i2c = chan->i2c;
@@ -382,6 +380,3 @@ index 9e3517b09b3d..fb3ebbd46a18 100644
  
  out_unlock:
        mutex_unlock(&i2c->lock);
--- 
-2.48.1
-
index fddf24c83ece7100acf25d64583b55a55fb61321..58552ca210645f01eff7661b5da25d56062be06e 100644 (file)
@@ -17,8 +17,6 @@ Tested-by: Markus Stockhausen <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index fb3ebbd46a18..c67463228604 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
 @@ -72,6 +72,8 @@ struct rtl9300_i2c {
@@ -30,7 +28,7 @@ index fb3ebbd46a18..c67463228604 100644
  enum rtl9300_i2c_xfer_type {
        RTL9300_I2C_XFER_BYTE,
        RTL9300_I2C_XFER_WORD,
-@@ -283,11 +285,11 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
+@@ -283,11 +285,11 @@ static int rtl9300_i2c_smbus_xfer(struct
        if (addr > 0x7f)
                return -EINVAL;
  
@@ -44,7 +42,7 @@ index fb3ebbd46a18..c67463228604 100644
  
        xfer.dev_addr = addr & 0x7f;
        xfer.write = (read_write == I2C_SMBUS_WRITE);
-@@ -324,20 +326,14 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
+@@ -324,20 +326,14 @@ static int rtl9300_i2c_smbus_xfer(struct
                break;
        default:
                dev_err(&adap->dev, "Unsupported transaction %d\n", size);
@@ -68,6 +66,3 @@ index fb3ebbd46a18..c67463228604 100644
  }
  
  static u32 rtl9300_i2c_func(struct i2c_adapter *a)
--- 
-2.48.1
-
index 7035005efc7cb58d74b6fd6f7479e6bb7f8496d5..9bc6851e704571ab76776b0dd51ee07144c31f9b 100644 (file)
@@ -22,8 +22,6 @@ Tested-by: Markus Stockhausen <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml b/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
-index 274e2ab8b612..17ce39c19ab1 100644
 --- a/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
 +++ b/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
 @@ -13,6 +13,8 @@ description:
@@ -94,6 +92,3 @@ index 274e2ab8b612..17ce39c19ab1 100644
  required:
    - compatible
    - reg
--- 
-2.48.1
-
index 9a3a32e8c712819211ecae11cc01bb2e26419331..6d5a23c0e81cc5914436c1a0b0a8708af059ad9d 100644 (file)
@@ -21,8 +21,6 @@ Tested-by: Markus Stockhausen <[email protected]>
 Signed-off-by: Andi Shyti <[email protected]>
 Link: https://lore.kernel.org/r/[email protected]
 
-diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
-index c67463228604..4723e48cfe18 100644
 --- a/drivers/i2c/busses/i2c-rtl9300.c
 +++ b/drivers/i2c/busses/i2c-rtl9300.c
 @@ -60,14 +60,16 @@ struct rtl9300_i2c_drv_data {
@@ -56,7 +54,7 @@ index c67463228604..4723e48cfe18 100644
  static int rtl9300_i2c_reg_addr_set(struct rtl9300_i2c *i2c, u32 reg, u16 len)
  {
        int ret;
-@@ -114,6 +122,11 @@ static int rtl9300_i2c_select_scl(struct rtl9300_i2c *i2c, u8 scl)
+@@ -114,6 +122,11 @@ static int rtl9300_i2c_select_scl(struct
        return regmap_field_write(i2c->fields[F_SCL_SEL], 1);
  }
  
@@ -68,7 +66,7 @@ index c67463228604..4723e48cfe18 100644
  static int rtl9300_i2c_config_chan(struct rtl9300_i2c *i2c, struct rtl9300_i2c_chan *chan)
  {
        struct rtl9300_i2c_drv_data *drv_data;
-@@ -127,7 +140,7 @@ static int rtl9300_i2c_config_chan(struct rtl9300_i2c *i2c, struct rtl9300_i2c_c
+@@ -127,7 +140,7 @@ static int rtl9300_i2c_config_chan(struc
                return ret;
  
        drv_data = (struct rtl9300_i2c_drv_data *)device_get_match_data(i2c->dev);
@@ -77,7 +75,7 @@ index c67463228604..4723e48cfe18 100644
        if (ret)
                return ret;
  
-@@ -361,7 +374,7 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)
+@@ -361,7 +374,7 @@ static int rtl9300_i2c_probe(struct plat
        struct fwnode_handle *child;
        struct rtl9300_i2c_drv_data *drv_data;
        struct reg_field fields[F_NUM_FIELDS];
@@ -86,7 +84,7 @@ index c67463228604..4723e48cfe18 100644
        int ret, i = 0;
  
        i2c = devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL);
-@@ -379,6 +392,11 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)
+@@ -379,6 +392,11 @@ static int rtl9300_i2c_probe(struct plat
        if (ret)
                return ret;
  
@@ -98,7 +96,7 @@ index c67463228604..4723e48cfe18 100644
        platform_set_drvdata(pdev, i2c);
  
        drv_data = (struct rtl9300_i2c_drv_data *)device_get_match_data(i2c->dev);
-@@ -474,12 +492,35 @@ static const struct rtl9300_i2c_drv_data rtl9300_i2c_drv_data = {
+@@ -474,12 +492,35 @@ static const struct rtl9300_i2c_drv_data
        .max_nchan = RTL9300_I2C_MUX_NCHAN,
  };
  
@@ -134,6 +132,3 @@ index c67463228604..4723e48cfe18 100644
        {}
  };
  MODULE_DEVICE_TABLE(of, i2c_rtl9300_dt_ids);
--- 
-2.48.1
-