public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Andi Shyti <andi.shyti@kernel.org>,
	linux-i2c@vger.kernel.org,
	Peter Korsgaard <peter.korsgaard@barco.com>,
	Peter Rosin <peda@axentia.se>
Subject: Re: [PATCH] i2c: i801: Use I2C_CLASS_HWMON for i2c mux children
Date: Fri, 10 Nov 2023 12:08:22 +0100	[thread overview]
Message-ID: <20231110120822.7a81421e@endymion.delvare> (raw)
In-Reply-To: <4fdf5873-b366-4601-a9cd-58814eed321d@gmail.com>

Hi Heiner,

On Thu, 9 Nov 2023 17:34:15 +0100, Heiner Kallweit wrote:
> On 09.11.2023 14:52, Jean Delvare wrote:
> > For example, if DMI data says the system is using DDR4 and we were able
> > to detect and instantiate an ee1004 SPD device at I2C address 0x50 then
> > we should probe for a JC42.4-compliant temperature sensor device at I2C
> > address 0x18. An SPD EEPROM at 0x51 would correspond to a possible
> > JC42.4-compliant device at 0x19, and so on.
>
> Nice idea. How about our ASUS use case in i801? i2c_register_spd() isn't
> called in case of muxing, neither for the parent nor for the mux children.

When I introduced i2c_register_spd(), I wanted to go one step at a
time, as I didn't know what to expect due to the wide variety of
systems affected. For this reason, systems where the SMBus is
multiplexed were originally excluded. There's also a limitation in the
function itself, on the number of memory slots, which is 4 for now, but
could be lifted to 8 (maximum number of memory slots connected to a
single SMBus segment).

The Asus boards we are talking about may have more than 8 memory slots,
so they would fail the test. If we want to be able to use
i2c_register_spd() on these boards, some adjustments will be needed.
For example, we could add a parameter to bypass the memory slot
counting, so that the function could be called on children segments
(only a subset of the memory slots will be connected to that segment,
so the total slot count it irrelevant). We would ignore the DMI data
and hard-code dimm_count to 8 in that case, to probe all possible
addresses.

Another approach would be to add a parameter (probably a bit field)
describing which addresses should be probed, instead of guessing that
from the dimm_count collected from DMI data. For the Asus boards in
question, the information is known, and this would speed things up a
bit by not probing addresses which can't possibly correspond to a
memory module on a given board. That's only a minor optimization
though, so not necessarily worth it. OTOH having that possibility would
give more control on the probing, which may be useful for specific
boards.

-- 
Jean Delvare
SUSE L3 Support


  reply	other threads:[~2023-11-10 17:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31 20:30 [PATCH] i2c: i801: Use I2C_CLASS_HWMON for i2c mux children Heiner Kallweit
2023-11-06 14:50 ` Jean Delvare
2023-11-07  8:04   ` Heiner Kallweit
2023-11-09 13:52     ` Jean Delvare
2023-11-09 16:34       ` Heiner Kallweit
2023-11-10 11:08         ` Jean Delvare [this message]
2023-12-20 21:07           ` 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=20231110120822.7a81421e@endymion.delvare \
    --to=jdelvare@suse.de \
    --cc=andi.shyti@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=peter.korsgaard@barco.com \
    /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