diff options
author | Przemyslaw Gaj <pgaj@cadence.com> | 2019-06-22 23:54:59 +0300 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@collabora.com> | 2019-08-11 11:48:28 +0300 |
commit | b1ac3a4b9aa2f68d498824f1235788e67b51b486 (patch) | |
tree | 2c2642336eaf927456d1fc0582c3cf35f94d8b30 /drivers/i3c/master/dw-i3c-master.c | |
parent | fd3f8f3118c66c492c5fe05568569d26db258fbd (diff) | |
download | linux-b1ac3a4b9aa2f68d498824f1235788e67b51b486.tar.xz |
i3c: add addr and lvr to i2c_dev_desc structure
I need to store address and lvr value for I2C devices without static definition
in DT. This allows secondary master to transmit DEFSLVS command properly.
Main changes between v4 and v5:
- Change in defslvs to use addr and lvr from i2c_dev_desc structure
- Change in CDNS and DW drivers to use addr and lvr from i2c_dev_desc structure
Signed-off-by: Przemyslaw Gaj <pgaj@cadence.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Diffstat (limited to 'drivers/i3c/master/dw-i3c-master.c')
-rw-r--r-- | drivers/i3c/master/dw-i3c-master.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c index 09912d75c6d5..b0ff0e12d84c 100644 --- a/drivers/i3c/master/dw-i3c-master.c +++ b/drivers/i3c/master/dw-i3c-master.c @@ -1033,12 +1033,12 @@ static int dw_i3c_master_attach_i2c_dev(struct i2c_dev_desc *dev) return -ENOMEM; data->index = pos; - master->addrs[pos] = dev->boardinfo->base.addr; + master->addrs[pos] = dev->addr; master->free_pos &= ~BIT(pos); i2c_dev_set_master_data(dev, data); writel(DEV_ADDR_TABLE_LEGACY_I2C_DEV | - DEV_ADDR_TABLE_STATIC_ADDR(dev->boardinfo->base.addr), + DEV_ADDR_TABLE_STATIC_ADDR(dev->addr), master->regs + DEV_ADDR_TABLE_LOC(master->datstartaddr, data->index)); |