From: Heiner Kallweit <hkallweit1@gmail.com>
To: Jean Delvare <jdelvare@suse.com>,
Andi Shyti <andi.shyti@kernel.org>, Peter Rosin <peda@axentia.se>,
Wolfram Sang <wsa@the-dreams.de>,
Peter Korsgaard <peter.korsgaard@barco.com>
Cc: "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: [PATCH 3/4] i2c: mux: gpio: Allow to call i2c_register_spd on a muxed segment
Date: Wed, 10 Jan 2024 21:15:20 +0100 [thread overview]
Message-ID: <8dadb1d5-bbdb-4e5c-b302-b9be112a3f1b@gmail.com> (raw)
In-Reply-To: <fc057deb-49f9-49cf-9549-13b2538ed92b@gmail.com>
Allow the gpio-based multiplexer to call i2c_register_spd on
muxed segments. First user will be i801.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/i2c/muxes/i2c-mux-gpio.c | 1 +
include/linux/platform_data/i2c-mux-gpio.h | 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index 6b979a0a6..c841407c7 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -161,6 +161,7 @@ static int i2c_mux_gpio_probe(struct platform_device *pdev)
}
mux->gpios = muxc->priv;
muxc->priv = mux;
+ muxc->register_spd = mux->data.register_spd;
platform_set_drvdata(pdev, muxc);
diff --git a/include/linux/platform_data/i2c-mux-gpio.h b/include/linux/platform_data/i2c-mux-gpio.h
index 5e4c2c272..cbeb74f92 100644
--- a/include/linux/platform_data/i2c-mux-gpio.h
+++ b/include/linux/platform_data/i2c-mux-gpio.h
@@ -20,6 +20,7 @@
* @n_values: Number of multiplexer positions (busses to instantiate)
* @classes: Optional I2C auto-detection classes
* @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used
+ * @register_spd: call i2c_register_spd for the child adapters on muxed segments
*/
struct i2c_mux_gpio_platform_data {
int parent;
@@ -28,6 +29,7 @@ struct i2c_mux_gpio_platform_data {
int n_values;
const unsigned *classes;
unsigned idle;
+ unsigned int register_spd:1;
};
#endif /* _LINUX_I2C_MUX_GPIO_H */
--
2.43.0
next prev parent reply other threads:[~2024-01-10 20:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 20:13 [PATCH 0/4] i2c: Support i2c_register_spd() on multiplexed bus segments Heiner Kallweit
2024-01-10 20:13 ` [PATCH 1/4] i2c: smbus: Prepare i2c_register_spd for usage on muxed segments Heiner Kallweit
2024-01-10 23:00 ` Peter Rosin
2024-01-11 6:49 ` Heiner Kallweit
2024-01-10 20:14 ` [PATCH 2/4] i2c: mux: add basic support for calling i2c_register_spd on muxed bus segments Heiner Kallweit
2024-01-11 15:53 ` kernel test robot
2024-01-13 8:38 ` kernel test robot
2024-01-10 20:15 ` Heiner Kallweit [this message]
2024-01-10 20:16 ` [PATCH 4/4] i2c: i801: Call i2c_register_spd() " Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8dadb1d5-bbdb-4e5c-b302-b9be112a3f1b@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andi.shyti@kernel.org \
--cc=jdelvare@suse.com \
--cc=linux-i2c@vger.kernel.org \
--cc=peda@axentia.se \
--cc=peter.korsgaard@barco.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.