From: Guenter Roeck <linux@roeck-us.net>
To: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Cc: Alexandru Tachici <alexandru.tachici@analog.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 5/5] hwmon: (pmbus/adm1266) include adapter number in GPIO line label
Date: Thu, 14 May 2026 18:45:21 -0700 [thread overview]
Message-ID: <0f2be441-34ea-497d-8b2d-5883d0ea82c4@roeck-us.net> (raw)
In-Reply-To: <20260512-adm1266-v3-5-a81a479b0bb0@nexthop.ai>
On Tue, May 12, 2026 at 11:56:28AM -0700, Abdurrahman Hussain wrote:
> Platforms that fit more than one ADM1266 on different I2C buses at
> the same 7-bit slave address (a common shelf-management pattern,
> e.g. one device per power domain) end up with duplicate GPIO line
> labels because the existing format only includes the slave address.
> Including the adapter number disambiguates them.
>
> The adapter number is formatted as decimal to match the i2c-N
> convention used elsewhere in Linux (sysfs paths, dev nodes); the
> slave address keeps its conventional hexadecimal form.
>
> The label is purely informational (visible via gpioinfo and the
> gpiochip /sys/class/gpio name); no DT or ABI consumer parses it.
>
> Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/pmbus/adm1266.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwmon/pmbus/adm1266.c b/drivers/hwmon/pmbus/adm1266.c
> index 05b31bb08f38..12cdf6de341a 100644
> --- a/drivers/hwmon/pmbus/adm1266.c
> +++ b/drivers/hwmon/pmbus/adm1266.c
> @@ -292,8 +292,9 @@ static int adm1266_config_gpio(struct adm1266_data *data)
> int i;
>
> for (i = 0; i < ARRAY_SIZE(data->gpio_names); i++) {
> - gpio_name = devm_kasprintf(&data->client->dev, GFP_KERNEL, "adm1266-%x-%s",
> - data->client->addr, adm1266_names[i]);
> + gpio_name = devm_kasprintf(&data->client->dev, GFP_KERNEL, "adm1266-%d-%x-%s",
> + data->client->adapter->nr, data->client->addr,
> + adm1266_names[i]);
> if (!gpio_name)
> return -ENOMEM;
>
prev parent reply other threads:[~2026-05-15 1:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 18:56 [PATCH v3 0/5] hwmon: (pmbus/adm1266) blackbox, FW rev, rtc_class, GPIO label Abdurrahman Hussain
2026-05-12 18:56 ` [PATCH v3 1/5] hwmon: (pmbus/adm1266) add firmware_revision debugfs entry Abdurrahman Hussain
2026-05-15 1:42 ` Guenter Roeck
2026-05-15 3:35 ` Abdurrahman Hussain
2026-05-15 4:48 ` Guenter Roeck
2026-05-12 18:56 ` [PATCH v3 2/5] hwmon: (pmbus/adm1266) add clear_blackbox " Abdurrahman Hussain
2026-05-14 0:47 ` sashiko-bot
2026-05-14 4:58 ` Abdurrahman Hussain
2026-05-12 18:56 ` [PATCH v3 3/5] hwmon: (pmbus/adm1266) add powerup_counter " Abdurrahman Hussain
2026-05-14 1:17 ` sashiko-bot
2026-05-12 18:56 ` [PATCH v3 4/5] hwmon: (pmbus/adm1266) replace probe-time RTC seed with rtc_class device Abdurrahman Hussain
2026-05-14 1:57 ` sashiko-bot
2026-05-14 2:14 ` Guenter Roeck
2026-05-14 2:14 ` Guenter Roeck
2026-05-14 4:25 ` Abdurrahman Hussain
2026-05-12 18:56 ` [PATCH v3 5/5] hwmon: (pmbus/adm1266) include adapter number in GPIO line label Abdurrahman Hussain
2026-05-15 1:45 ` Guenter Roeck [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=0f2be441-34ea-497d-8b2d-5883d0ea82c4@roeck-us.net \
--to=linux@roeck-us.net \
--cc=abdurrahman@nexthop.ai \
--cc=alexandru.tachici@analog.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.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 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.