From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1C1B926A1AA; Tue, 8 Apr 2025 12:33:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744115581; cv=none; b=tx4VMbOC9kiCBCHPnxbt2WkJ9+k5HMLLOzsavbxvkNXKzbkbJILx7rgp1EB/pfAVfEdHs4xiPLFp+SfLmlpo3YljDXx7zCWD70UUEFJVVEg75xR6RyHrhRwoQ+yhBv0IoR7moQnmOUuwwEskE9HPAs4t8AD8XZuPhG7Itw3mxzQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744115581; c=relaxed/simple; bh=6eVjMYje5CyB+yk3G3yDzGgChHTIE4Qb7WxnszJzWVQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XojDD+Z7QVbMCL2unHs58NfLiGqlNVnG1Xit16yF2yKYmpcgjvSjuuayj0YT4Sw4D67ZwfZ/yEPG2IewgVuqadreuiSrnLhYIU8IlkwGn0lezsvrO7mhUf++QEVRq0P3tSz3Ut/GmZQokx0+Hbq/uYVXbSKvJ39oVgKKY+s/i/M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sWZly0XJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sWZly0XJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F75AC4CEE7; Tue, 8 Apr 2025 12:33:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744115581; bh=6eVjMYje5CyB+yk3G3yDzGgChHTIE4Qb7WxnszJzWVQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sWZly0XJOL3Niocs4iVL2WJyNJsI6QTGdQJJtDAifc6tXTPMWFqQMeTBfYQ+xsiLb ZAqoVnlNQEBn7FSrzHPdlW4YA4I9VzkrVjH0iQym9KsvKmT2mhlVIZHpoI61lnii71 Akstzf/wZk9JE5TS9UIj1juC/qjMZa6wGTd8MyrM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Geert Uytterhoeven , Douglas Anderson , Sasha Levin Subject: [PATCH 6.1 027/204] drm/bridge: ti-sn65dsi86: Fix multiple instances Date: Tue, 8 Apr 2025 12:49:17 +0200 Message-ID: <20250408104821.121308534@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104820.266892317@linuxfoundation.org> References: <20250408104820.266892317@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Geert Uytterhoeven [ Upstream commit 574f5ee2c85a00a579549d50e9fc9c6c072ee4c4 ] Each bridge instance creates up to four auxiliary devices with different names. However, their IDs are always zero, causing duplicate filename errors when a system has multiple bridges: sysfs: cannot create duplicate filename '/bus/auxiliary/devices/ti_sn65dsi86.gpio.0' Fix this by using a unique instance ID per bridge instance. The instance ID is derived from the I2C adapter number and the bridge's I2C address, to support multiple instances on the same bus. Fixes: bf73537f411b ("drm/bridge: ti-sn65dsi86: Break GPIO and MIPI-to-eDP bridge into sub-drivers") Signed-off-by: Geert Uytterhoeven Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/7a68a0e3f927e26edca6040067fb653eb06efb79.1733840089.git.geert+renesas@glider.be Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index ff4d0564122a3..3c8e33f416e70 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -480,6 +480,7 @@ static int ti_sn65dsi86_add_aux_device(struct ti_sn65dsi86 *pdata, const char *name) { struct device *dev = pdata->dev; + const struct i2c_client *client = to_i2c_client(dev); struct auxiliary_device *aux; int ret; @@ -488,6 +489,7 @@ static int ti_sn65dsi86_add_aux_device(struct ti_sn65dsi86 *pdata, return -ENOMEM; aux->name = name; + aux->id = (client->adapter->nr << 10) | client->addr; aux->dev.parent = dev; aux->dev.release = ti_sn65dsi86_aux_device_release; device_set_of_node_from_dev(&aux->dev, dev); -- 2.39.5