[PATCH v2 0/4] mfd: intel_soc_pmic_bxtwc: Fix IRQ domain usage

Andy Shevchenko posted 4 patches 1 month, 3 weeks ago
drivers/mfd/intel_soc_pmic_bxtwc.c     | 144 ++++++++++++++++---------
drivers/platform/x86/intel/bxtwc_tmu.c |  22 ++--
drivers/usb/typec/tcpm/wcove.c         |   4 -
3 files changed, 97 insertions(+), 73 deletions(-)
[PATCH v2 0/4] mfd: intel_soc_pmic_bxtwc: Fix IRQ domain usage
Posted by Andy Shevchenko 1 month, 3 weeks ago
It appears that the driver has been developed without proper thinking
of what the difference between HW IRQ and Linux IRQ (also known as vIRQ).
This misunderstanding led to the 0 being used as vIRQ which is no-no and
platform APIs unveil this after the commit a85a6c86c25b ("driver core:
platform: Clarify that IRQ 0 is invalid"). With this the Intel Broxton
Whiskey Cove PMIC driver has to be fixed all over the places.

In this series two immediate fixes as reported recently and we have
drivers for (patches 1 & 2) followed by the patch that prepares the
same fix for the devices that have no in-tree drivers yet. At the end
it is a fix for IRQ domain debugging (when enabled), but it requires
quite recent patches in IRQ domain and regmap IRQ subsystems, which is
reflected in the Depends-on tag (I can't use Fixes, as this doesn't
fix anything related to that).

The series touches a couple of subsystems as the respective drivers
has to be fixed simultaneously. The idea is to proceed the series via
MFD tree to where the main driver belongs.

I have tested this on Intel Joule SoM (Apollo Lake SoC).

In v2:
- added tags (Hans, Zhang)
- fixed typo in the commit messages

Andy Shevchenko (4):
  mfd: intel_soc_pmic_bxtwc: Use IRQ domain for USB Type-C device
  mfd: intel_soc_pmic_bxtwc: Use IRQ domain for TMU device
  mfd: intel_soc_pmic_bxtwc: Use IRQ domain for PMIC devices
  mfd: intel_soc_pmic_bxtwc: Fix IRQ domain names duplication

 drivers/mfd/intel_soc_pmic_bxtwc.c     | 144 ++++++++++++++++---------
 drivers/platform/x86/intel/bxtwc_tmu.c |  22 ++--
 drivers/usb/typec/tcpm/wcove.c         |   4 -
 3 files changed, 97 insertions(+), 73 deletions(-)

-- 
2.43.0.rc1.1336.g36b5255a03ac
Re: [PATCH v2 0/4] mfd: intel_soc_pmic_bxtwc: Fix IRQ domain usage
Posted by Lee Jones 1 month, 2 weeks ago
On Sat, 05 Oct 2024 22:27:03 +0300, Andy Shevchenko wrote:
> It appears that the driver has been developed without proper thinking
> of what the difference between HW IRQ and Linux IRQ (also known as vIRQ).
> This misunderstanding led to the 0 being used as vIRQ which is no-no and
> platform APIs unveil this after the commit a85a6c86c25b ("driver core:
> platform: Clarify that IRQ 0 is invalid"). With this the Intel Broxton
> Whiskey Cove PMIC driver has to be fixed all over the places.
> 
> [...]

Applied, thanks!

[1/4] mfd: intel_soc_pmic_bxtwc: Use IRQ domain for USB Type-C device
      commit: 59703271a86fee0fb2087d3a9990068fa0f147fb
[2/4] mfd: intel_soc_pmic_bxtwc: Use IRQ domain for TMU device
      commit: e005ef9f90c045dc284589ece4d6d14af3462a32
[3/4] mfd: intel_soc_pmic_bxtwc: Use IRQ domain for PMIC devices
      commit: 8db3d3e5439808cd899d14fb80e0b01beb9f6379
[4/4] mfd: intel_soc_pmic_bxtwc: Fix IRQ domain names duplication
      commit: 673f0f9a8db71c94e1eb880d1a88204c334710c9

--
Lee Jones [李琼斯]

Re: [PATCH v2 0/4] mfd: intel_soc_pmic_bxtwc: Fix IRQ domain usage
Posted by Andy Shevchenko 1 month, 2 weeks ago
On Thu, Oct 10, 2024 at 05:19:09PM +0100, Lee Jones wrote:
> On Sat, 05 Oct 2024 22:27:03 +0300, Andy Shevchenko wrote:
> > It appears that the driver has been developed without proper thinking
> > of what the difference between HW IRQ and Linux IRQ (also known as vIRQ).
> > This misunderstanding led to the 0 being used as vIRQ which is no-no and
> > platform APIs unveil this after the commit a85a6c86c25b ("driver core:
> > platform: Clarify that IRQ 0 is invalid"). With this the Intel Broxton
> > Whiskey Cove PMIC driver has to be fixed all over the places.

[...]

> Applied, thanks!

Thank you!

-- 
With Best Regards,
Andy Shevchenko