Skip to content

Commit 574f5ee

Browse files
geertudianders
authored andcommitted
drm/bridge: ti-sn65dsi86: Fix multiple instances
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: bf73537 ("drm/bridge: ti-sn65dsi86: Break GPIO and MIPI-to-eDP bridge into sub-drivers") Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/7a68a0e3f927e26edca6040067fb653eb06efb79.1733840089.git.geert+renesas@glider.be
1 parent a735831 commit 574f5ee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/bridge/ti-sn65dsi86.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ static int ti_sn65dsi86_add_aux_device(struct ti_sn65dsi86 *pdata,
480480
const char *name)
481481
{
482482
struct device *dev = pdata->dev;
483+
const struct i2c_client *client = to_i2c_client(dev);
483484
struct auxiliary_device *aux;
484485
int ret;
485486

@@ -488,6 +489,7 @@ static int ti_sn65dsi86_add_aux_device(struct ti_sn65dsi86 *pdata,
488489
return -ENOMEM;
489490

490491
aux->name = name;
492+
aux->id = (client->adapter->nr << 10) | client->addr;
491493
aux->dev.parent = dev;
492494
aux->dev.release = ti_sn65dsi86_aux_device_release;
493495
device_set_of_node_from_dev(&aux->dev, dev);

0 commit comments

Comments
 (0)