From: Hans de Goede <hdegoede@redhat.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Andy Shevchenko <andy@infradead.org>
Cc: Darren Hart <dvhart@infradead.org>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] platform/x86: i2c-multi-instantiate: Derive the device name from parent
Date: Fri, 20 Sep 2019 12:32:22 +0200 [thread overview]
Message-ID: <cde45562-af19-77e9-b3c9-7b3eb7dcd459@redhat.com> (raw)
In-Reply-To: <20190920100233.12829-1-heikki.krogerus@linux.intel.com>
Hi,
On 9/20/19 12:02 PM, Heikki Krogerus wrote:
> When naming the new devices, instead of using the ACPI ID in
> the name as base, using the parent device's name. That makes
> it possible to support multiple multi-instance i2c devices
> of the same type in the same system.
>
> This fixes an issue seen on some Intel Kaby Lake based
> boards:
>
> sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-INT3515-tps6598x.0'
>
> Fixes: 2336dfadfb1e ("platform/x86: i2c-multi-instantiate: Allow to have same slaves")
> Cc: stable@vger.kernel.org
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/platform/x86/i2c-multi-instantiate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/i2c-multi-instantiate.c b/drivers/platform/x86/i2c-multi-instantiate.c
> index 61fe341a85aa..ea68f6ed66ae 100644
> --- a/drivers/platform/x86/i2c-multi-instantiate.c
> +++ b/drivers/platform/x86/i2c-multi-instantiate.c
> @@ -90,7 +90,7 @@ static int i2c_multi_inst_probe(struct platform_device *pdev)
> for (i = 0; i < multi->num_clients && inst_data[i].type; i++) {
> memset(&board_info, 0, sizeof(board_info));
> strlcpy(board_info.type, inst_data[i].type, I2C_NAME_SIZE);
> - snprintf(name, sizeof(name), "%s-%s.%d", match->id,
> + snprintf(name, sizeof(name), "%s-%s.%d", dev_name(dev),
> inst_data[i].type, i);
> board_info.dev_name = name;
> switch (inst_data[i].flags & IRQ_RESOURCE_TYPE) {
>
prev parent reply other threads:[~2019-09-20 10:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-20 10:02 Heikki Krogerus
2019-09-20 10:32 ` Hans de Goede [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=cde45562-af19-77e9-b3c9-7b3eb7dcd459@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@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 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®