public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Wolfram Sang <wsa@kernel.org>, Jean Delvare <jdelvare@suse.com>,
	Andi Shyti <andi.shyti@kernel.org>, Peter Rosin <peda@axentia.se>,
	Peter Korsgaard <peter.korsgaard@barco.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH v2 0/4] i2c: Support i2c_register_spd() on multiplexed bus segments
Date: Thu, 22 Feb 2024 23:05:12 +0100	[thread overview]
Message-ID: <be84acb9-88af-44e0-9581-62fcefb6374e@gmail.com> (raw)
In-Reply-To: <ZdYwuELMH0r8EFU7@shikoro>

On 21.02.2024 18:19, Wolfram Sang wrote:
> Hi Heiner,
> 
>> Note: i801 creates the mux platform device, loading and probing of the
>> mux driver may be asynchronous. Therefore we can't call i2c_register_spd()
>> for the muxed segments from i801. Instead we have to add a flag to the
>> platform data, so that the mux driver knows it's supposed to call
>> i2c_register_spd().
> 
> Has it been considered to use a bus_notifier and check for
> BUS_NOTIFY_BOUND_DRIVER?
> 
I checked, and it looks like this:
Best would be to check for binding gpio mux driver to platform device
"i2c-mux-gpio" has completed. But the bus notification doesn't work for
platform devices.
Instead we can check for the BUS_NOTIFY_ADD_DEVICE event for the
child i2c adapters. This *should* work.
I tested that the events are properly recognized. However I don't have
hw with a muxed SMBUS, so I can't test the actual functionality.
I'll submit a RFC patch.

> I'd really like to keep it inside i801 if possible. First, all these
> flags in mux drivers only for this corner case are relatively intrusive.
> Second, selecting SMBUS for I2C_MUX is also a tad too much for my taste.
> 
> I understand that removing CLASS_SPD is a worthy goal. So, if all fails
> we could still try this. But I'd think with bus_notifiers it should be
> possible to keep it all in i801.
> 
> Do you think this could work?
> 
> Happy hacking,
> 
>    Wolfram
> 
Heiner


      parent reply	other threads:[~2024-02-22 22:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-13 11:23 [PATCH v2 0/4] i2c: Support i2c_register_spd() on multiplexed bus segments Heiner Kallweit
2024-01-13 11:25 ` [PATCH v2 1/4] i2c: smbus: Prepare i2c_register_spd for usage on muxed segments Heiner Kallweit
2024-01-13 11:27 ` [PATCH v2 2/4] i2c: mux: add basic support for calling i2c_register_spd on muxed bus segments Heiner Kallweit
2024-01-13 11:28 ` [PATCH v2 3/4] i2c: mux: gpio: Allow to call i2c_register_spd on a muxed segment Heiner Kallweit
2024-01-13 11:28 ` [PATCH v2 4/4] i2c: i801: Call i2c_register_spd() on muxed bus segments Heiner Kallweit
2024-01-26 21:15 ` [PATCH v2 0/4] i2c: Support i2c_register_spd() on multiplexed " Heiner Kallweit
2024-02-21 17:19 ` Wolfram Sang
2024-02-21 19:46   ` Heiner Kallweit
2024-02-22 22:05   ` Heiner Kallweit [this message]

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=be84acb9-88af-44e0-9581-62fcefb6374e@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@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox