From: "Abdurrahman Hussain" <abdurrahman@nexthop.ai>
To: "Rob Herring" <robh@kernel.org>
Cc: "Saravana Kannan" <saravanak@kernel.org>,
"Frank Rowand" <frowand.list@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Shawn Guo" <shawnguo@kernel.org>,
"Grant Likely" <grant.likely@secretlab.ca>,
"Grant Likely" <grant.likely@linaro.org>,
"Pantelis Antoniou" <pantelis.antoniou@konsulko.com>,
"David Daney" <david.daney@cavium.com>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 0/6] of: teach overlay code to keep /aliases in sync
Date: Thu, 12 Nov 2026 17:23:22 -0800 [thread overview]
Message-ID: <DMTOUWAKBIER.19DO7XAP7Z2R3@nexthop.ai> (raw)
In-Reply-To: <20261112221205.GA1425386-robh@kernel.org>
On Thu, Nov 12, 2026 at 04:12:05PM -0600, Rob Herring wrote:
> Stable bus numbers is a solution to your problem. What's the problem you
> are trying to solve?
Labeling hwmon channels on an embedded Linux system.
The board has an x86 host with ACPI firmware and a PCIe FPGA that
provides a dozen or so I2C masters, with muxes behind them leading to
PSUs, fan controllers, voltage regulators and temperature sensors. The
FPGA driver applies an overlay at probe time that describes all of this.
Userspace labels the hwmon channels with libsensors, and sensors.conf
picks a chip by its bus and address, e.g. "pmbus-i2c-12-40".
The same parts sit at the same address behind different mux channels
(PSU1 and PSU2 are both at 0x58, for example). Their hwmon "name" and
their address are identical, so the bus is the only thing that tells
them apart.
libsensors has a "bus" statement that maps a bus number in the config
to an adapter name, which would avoid relying on numbers. It doesn't
work here, because the adapter names aren't stable either. Mux channels
are named "i2c-%d-mux (chan_id %d)" after the parent's dynamic number,
and the xiic masters are named after their platform device, which comes
from the MMIO address the PCI BAR ended up at. A udev by-path symlink
for /dev/i2c-N wouldn't help, since libsensors doesn't use /dev/i2c-N
at all. It reads /sys/class/hwmon, where the bus number is part of the
parent device name ("12-0058").
> How aliases interact with an ACPI system is another aspect I have yet to
> consider...
On these systems the base DT is drivers/of/empty_root.dts, which has no
/aliases node. So no alias is honored from the base DT, every bus is
numbered dynamically starting at 0, and the overlay is the only place
an alias could come from.
> Right, but there is no fallback for some cases. Having that is the only
> way this could work.
Can you spell out what that would take? Does every subsystem that
hands out ids from aliases need its own fallback, i.e. the i2c, i3c,
spi and mmc cores, plus mtd and the serial drivers, before overlay
aliases could go in? And if so, would you want each of those as a
separate series through its own tree, landing ahead of the OF patches,
or all together in one series?
Thanks,
Abdurrahman
prev parent reply other threads:[~2026-11-13 1:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 23:17 Abdurrahman Hussain
2026-10-14 23:17 ` [PATCH v8 1/6] of/overlay: look up absolute target-paths absolutely Abdurrahman Hussain
2026-10-14 23:17 ` [PATCH v8 2/6] of/overlay: return ERR_PTR from dup_and_fixup_symbol_prop() Abdurrahman Hussain
2026-10-14 23:17 ` [PATCH v8 3/6] of: hold a reference on of_aliases during alias path resolution Abdurrahman Hussain
2026-10-14 23:17 ` [PATCH v8 4/6] of: update /aliases lookup on reconfig notifications Abdurrahman Hussain
2026-10-14 23:17 ` [PATCH v8 5/6] of/overlay: rewrite /aliases path values to live-tree paths Abdurrahman Hussain
2026-10-14 23:17 ` [PATCH v8 6/6] of: unittest: cover /aliases updates from overlay apply/revert Abdurrahman Hussain
2026-11-05 0:09 ` [PATCH v8 0/6] of: teach overlay code to keep /aliases in sync Abdurrahman Hussain
2026-11-05 12:40 ` Rob Herring
2026-11-06 2:11 ` Abdurrahman Hussain
2026-11-06 13:24 ` Rob Herring
2026-11-06 19:51 ` Abdurrahman Hussain
2026-11-12 22:12 ` Rob Herring
2026-11-13 1:23 ` Abdurrahman Hussain [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=DMTOUWAKBIER.19DO7XAP7Z2R3@nexthop.ai \
--to=abdurrahman@nexthop.ai \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=david.daney@cavium.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=grant.likely@linaro.org \
--cc=grant.likely@secretlab.ca \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pantelis.antoniou@konsulko.com \
--cc=robh@kernel.org \
--cc=saravanak@kernel.org \
--cc=shawnguo@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
all inboxes | Powered by JetHome®