From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: "Filippo Muscherà" <filippo.muschera@gmail.com>
Cc: jdelvare@suse.com, andi.shyti@kernel.org,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: amd8111: Switch to pcim_enable_device() and pcim_request_region()
Date: Tue, 24 Feb 2026 12:38:13 +0200 [thread overview]
Message-ID: <aZ1_lZLd37VyREHY@smile.fi.intel.com> (raw)
In-Reply-To: <20260224102216.17606-1-filippo.muschera@gmail.com>
On Tue, Feb 24, 2026 at 11:22:16AM +0100, Filippo Muscherà wrote:
> Following the conversion to managed devm_* APIs, update the driver to use
> the PCI-specific managed APIs.
>
> Use pcim_enable_device() to properly enable the PCI device and
> pcim_request_region() to manage the I/O port region.
>
> Switching to pcim_enable_device() also addresses the fact that
> pci_disable_device() was missing in the driver lifecycle, as the
> managed API now automatically handles the disablement when the driver
> unbinds.
Looking at the code now I see the difference this patch may bring.
I was under impression that there is pci_enable_device() already in
the code. But it is not the case, which makes quite a different
enumeration flow (it will write CMD register and touch some bits
that might be sensitive). While the code looks okay and I can even
Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com>
the change needs to be tested on real hardware before going in.
...
> if (!(pci_resource_flags(dev, 0) & IORESOURCE_IO))
> return -ENODEV;
While it seems now being unneeded, I would leave this check in place until
somebody who knows the platform better can come up with a clear justification
for its removal. It also sounds aligned with the above remark. It might be
we can not do this patch at all.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-02-24 10:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 13:13 [PATCH 1/2] i2c: amd8111: Remove spaces in MODULE_* macros Filippo Muscherà
2026-02-02 13:13 ` [PATCH 2/2] i2c: amd8111: switch to devm_ functions Filippo Muscherà
2026-02-05 11:03 ` Andi Shyti
2026-02-05 12:57 ` Filippo Muscherà
2026-02-23 16:25 ` Andy Shevchenko
2026-02-24 10:22 ` [PATCH] i2c: amd8111: Switch to pcim_enable_device() and pcim_request_region() Filippo Muscherà
2026-02-24 10:38 ` Andy Shevchenko [this message]
2026-02-24 14:42 ` Filippo Muscherà
2026-04-14 23:13 ` Andi Shyti
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=aZ1_lZLd37VyREHY@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=andi.shyti@kernel.org \
--cc=filippo.muschera@gmail.com \
--cc=jdelvare@suse.com \
--cc=linux-i2c@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.