All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] i2c: i2c-mux: Fix channel parent node assignment
@ 2017-05-30  8:54 Jacopo Mondi
  2017-05-30 11:04 ` Peter Rosin
  0 siblings, 1 reply; 6+ messages in thread
From: Jacopo Mondi @ 2017-05-30  8:54 UTC (permalink / raw)
  To: peda, laurent.pinchart, wsa; +Cc: linux-i2c, linux-renesas-soc

I2c-mux channels are created as mux siblings while they should be
children of the mux itself. Fix it.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---

Hello,
   while inspecting child nodes of an i2c adapter it has been noted that
child devices of an i2c-mux are listed as children of the i2c adapter itself,
and not of the i2c-mux.

The hierarchy of devices looked like

-- i2c-04
--- eeprom@57
--- video_receiver@70
--- video_receiver@34
--- gmsl-deserializer@0		<-- MUX
--- gmsl-deserializer@0/i2c@0	<-- MUX CHANNEL

It now looks like

-- i2c-04
--- eeprom@57
--- video_receiver@70
--- video_receiver@34
--- gmsl-deserializer@0
---- gmsl-deserializer@0/i2c@0

v1 -> v2:
- change commit message as suggested by Geert

 drivers/i2c/i2c-mux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c
index 83768e8..37b7804 100644
--- a/drivers/i2c/i2c-mux.c
+++ b/drivers/i2c/i2c-mux.c
@@ -324,7 +324,7 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
 	priv->adap.owner = THIS_MODULE;
 	priv->adap.algo = &priv->algo;
 	priv->adap.algo_data = priv;
-	priv->adap.dev.parent = &parent->dev;
+	priv->adap.dev.parent = muxc->dev;
 	priv->adap.retries = parent->retries;
 	priv->adap.timeout = parent->timeout;
 	priv->adap.quirks = parent->quirks;
--
2.7.4

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

end of thread, other threads:[~2017-06-01 18:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-30  8:54 [PATCH v2] i2c: i2c-mux: Fix channel parent node assignment Jacopo Mondi
2017-05-30 11:04 ` Peter Rosin
2017-05-31  7:51   ` jmondi
2017-05-31  8:19     ` Peter Rosin
2017-06-01  2:19       ` jmondi
2017-06-01 18:58         ` Peter Rosin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.