linux-i3c.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i3c: transfer pid from boardinfo to device info
@ 2023-01-05 21:29 Jack Chen
  2023-01-10 13:43 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Jack Chen @ 2023-01-05 21:29 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: linux-i3c, linux-kernel, Jesus Sanchez-Palencia, Mark Slevinsky,
	Jack Chen

I3C device PID could be defined in device tree and stored in
i3c_dev_boardinfo. It should be passed to i3c_device_info when
allocating a i3c_dev_desc.
Rational behind this change is: when users decide to use SETDASA to
assign a dynamic address with exactly the original static address, in
step of i3c_master_reattach_i3c_dev, this address is checked to be
taken. Then device information retrieving step is skipped. As a result,
though the i3c device is registered correctly, its device driver could
not be probed.

Tested: Tested with a I3C device. If assigned-address is set to be the
device's static address, without this change, its device driver could
not probed. And with this change, its driver is probed successfully.

Signed-off-by: Jack Chen <zenghuchen@google.com>
---
 drivers/i3c/master.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index d7e6f6c99aea..4dad80338831 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1438,6 +1438,7 @@ static int i3c_master_early_i3c_dev_add(struct i3c_master_controller *master,
 {
 	struct i3c_device_info info = {
 		.static_addr = boardinfo->static_addr,
+		.pid = boardinfo->pid,
 	};
 	struct i3c_dev_desc *i3cdev;
 	int ret;
-- 
2.39.0.314.g84b9a713c41-goog


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i3c: transfer pid from boardinfo to device info
  2023-01-05 21:29 [PATCH] i3c: transfer pid from boardinfo to device info Jack Chen
@ 2023-01-10 13:43 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2023-01-10 13:43 UTC (permalink / raw)
  To: Jack Chen; +Cc: linux-i3c, linux-kernel, Jesus Sanchez-Palencia, Mark Slevinsky


On Thu, 05 Jan 2023 16:29:52 -0500, Jack Chen wrote:
> I3C device PID could be defined in device tree and stored in
> i3c_dev_boardinfo. It should be passed to i3c_device_info when
> allocating a i3c_dev_desc.
> Rational behind this change is: when users decide to use SETDASA to
> assign a dynamic address with exactly the original static address, in
> step of i3c_master_reattach_i3c_dev, this address is checked to be
> taken. Then device information retrieving step is skipped. As a result,
> though the i3c device is registered correctly, its device driver could
> not be probed.
> 
> [...]

Applied, thanks!

[1/1] i3c: transfer pid from boardinfo to device info
      commit: e826acc18bc7bdf4278bf8928caa3a0cd4065432

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-10 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-05 21:29 [PATCH] i3c: transfer pid from boardinfo to device info Jack Chen
2023-01-10 13:43 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).