[lkml]   [2019]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v3 0/5] i3c: detach/free device fail pre_assign_dyn_addr()
As for today, the I3C framework is keeping in memory and master->bus.devs
list the devices that fail during pre_assign_dyn_addr() and send them on
DEFSLVS command.

According to MIPI I3C Bus spec the DEFSLVS command is used to inform any
Secondary Master about the Dynamic Addresses that were assigned to I3C
devices and the I2C devices present on the bus.

This issue could be fixed by changing i3c_master_defslvs_locked() to
ignore unaddressed i3c devices but the i3c_dev_desc would be allocated and
attached to HC unnecessarily. This can cause that some HC aren't able to
do DAA for HJ capable devices due of lack of space.

This patch-series propose to detach/free devices that are failing during
pre_assign_dyn_addr() and to propagate i3c_boardinfo, if available, to
i3c_dev_desc during i3c_master_add_i3c_dev_locked(). Besides the fix for
the problem mention above, this change will permit to describe devices
with a preferable dynamic address (important due to priority reason) but
without a static address in DT.

In addition, I'm improving the management of the Data Address Table in
DW I3C Master by keeping the free slots consecutive.

Change in v3:
- Change cover letter
- Change commit message for patch 1
- Add Rob rb-tags

Change in v2:
- Move out detach/free the i3c_dev_desc from pre_assign_dyn_addr()
- Change i3c_master_search_i3c_boardinfo(newdev) to
- Add fixes, stable tags on patch 2
- Add a note for no guarantee of 'assigned-address' use

Vitor Soares (5):
i3c: master: detach and free device if pre_assign_dyn_addr() fails
i3c: master: make sure ->boardinfo is initialized in
dt-bindings: i3c: Make 'assigned-address' valid if static address == 0
dt-bindings: i3c: add a note for no guarantee of 'assigned-address'
i3c: master: dw: reattach device on first available location of
address table

Documentation/devicetree/bindings/i3c/i3c.txt | 15 ++++++--
drivers/i3c/master.c | 49 ++++++++++++++++++++++-----
drivers/i3c/master/dw-i3c-master.c | 16 +++++++++
3 files changed, 68 insertions(+), 12 deletions(-)


 \ /
  Last update: 2019-09-05 12:01    [W:0.124 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site