From nobody Sat Nov 23 12:20:08 2024 Received: from TWMBX01.aspeed.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 783B2170854 for ; Wed, 13 Nov 2024 03:58:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731470318; cv=none; b=lCUXhIuYHPawD+N+d0htEqbFU1jgEilymUpBoyLYdH/peAw0E39vkOhyyI166m9Rxwau3QdHuqudN06g+QmmrHj6GOYQ910TYx0NDcyGE+paSwg2fLEMNDyAe/OmaCtdvjJaMHlqGg5exRmX3i/gLg/PlhzdfMOO+F0fKuyk0Hs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731470318; c=relaxed/simple; bh=C4rxnlPvtJDGB5C7TCC2Q2vCQE5HPAaYwgzWEEJhh80=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=bYNwgLICJh+U5N+ZhQgzTLewHbwx640/GX3DFXKjPsmPYP9cdX9qdTIXmPtMqa2AUnbyx22IZtbkt957CAETrm449SKnh9/X+/4Nuc1Wex9I9GdMn3Smezean6qTrdUPEOUSuRg6cawNLGpezGlLcpHkbQjw/ar2nWVnb1lA9ps= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Wed, 13 Nov 2024 11:58:26 +0800 Received: from mail.aspeedtech.com (192.168.10.10) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1258.12 via Frontend Transport; Wed, 13 Nov 2024 11:58:26 +0800 From: Billy Tsai To: , , , , , , , Subject: [PATCH v1] i3c: mipi-i3c-hci: Support SETDASA CCC Date: Wed, 13 Nov 2024 11:58:26 +0800 Message-ID: <20241113035826.923918-1-billy_tsai@aspeedtech.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When the I3C subsystem wants to assign a dynamic address using the SETDASA CCC, it needs to attach the I3C device with device info that includes only the static address. In the HCI, if the driver want to send this SETDASA CCC, a DAT entry is required to temporarily fill the device's static address into the dynamic address field. Afterward, the reattach API will be executed to update the DAT with the correct dynamic addrees value. Signed-off-by: Billy Tsai Reviewed-by: Jarkko Nikula --- drivers/i3c/master/mipi-i3c-hci/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mi= pi-i3c-hci/core.c index a82c47c9986d..6655e8396a35 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -438,7 +438,8 @@ static int i3c_hci_attach_i3c_dev(struct i3c_dev_desc *= dev) kfree(dev_data); return ret; } - mipi_i3c_hci_dat_v1.set_dynamic_addr(hci, ret, dev->info.dyn_addr); + mipi_i3c_hci_dat_v1.set_dynamic_addr(hci, ret, + dev->info.dyn_addr ?: dev->info.static_addr); dev_data->dat_idx =3D ret; } i3c_dev_set_master_data(dev, dev_data); --=20 2.25.1