All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] PCI: Add pci_power_t helper functions
@ 2026-11-21 12:59 Habil Eren Türker
  2026-11-21 12:59 ` [PATCH v3 1/4] " Habil Eren Türker
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Habil Eren Türker @ 2026-11-21 12:59 UTC (permalink / raw)
  To: Bjorn Helgaas, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, x86@kernel.org
  Cc: H . Peter Anvin, andriy.shevchenko@intel.com,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Habil Eren Türker

This series introduces helper functions for accessing PCI power
states in the Power Management Control/Status register and
converts existing PMCSR accesses to use these helpers.

The helpers provide typed access to the PCI power state field,
including extraction, setting, and comparison operations.
The series also updates the Apple Airport reset quirk to use
the new comparison helper.

This follows the discussion with Andy Shevchenko and
Bjorn Helgaas in response to "x86/quirks: Cast PCI_D0
to u16 in apple_airport_reset()" [1].

Changes in v2:
- Add helpers for comparing PCI power states.
- Convert PCI core and quirk code to use the new helpers.
- Address review feedback.

Changes in v3:
- Move helpers' positions to upper lines of the pci.h with
  header include.
- Fix indentation in pci.c.
- Rename function `pci_power_eq()` to `pci_power_t_eq()` for
  API name consistency.
- Rewrite pci_power_t_eq() parameters for comparison of
  two `pci_power_t` type variables.
- Modify `pci_power_t_set` to use `u16 *csr` instead of
  u32.
- Use `FIELD_MODIFY()` in `pci_power_t_set()`.
- Remove `pci_power_gt` and `pci_power_lt`.
- Add resolved Sparse warnings to commit messages.
- Link to v2: https://lore.kernel.org/lkml/cover.1795097970.git.habilerenturker@hotmail.com/

Link: https://lore.kernel.org/lkml/20261118161559.63617-1-habilerenturker@hotmail.com/ [1]

Note: LLM assistance was used for editing the cover letter and
commit descriptions. ALl changes were reviewed by the submitter.

Habil Eren Türker (4):
  PCI: Add pci_power_t helper functions
  PCI: Convert pci.c to pci_power_t helpers
  PCI: Convert quirks.c to pci_power_t helpers
  x86/quirks: Use pci_power_t_eq() in apple_airport_reset()

 arch/x86/kernel/early-quirks.c |  6 +++---
 drivers/pci/pci.c              | 28 ++++++++++++----------------
 drivers/pci/quirks.c           |  2 +-
 include/linux/pci.h            | 17 +++++++++++++++++
 4 files changed, 33 insertions(+), 20 deletions(-)

-- 
2.47.3


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-21 17:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-21 12:59 [PATCH v3 0/4] PCI: Add pci_power_t helper functions Habil Eren Türker
2026-11-21 12:59 ` [PATCH v3 1/4] " Habil Eren Türker
2026-11-21 12:59 ` [PATCH] PCI: Convert pci.c to pci_power_t helpers Habil Eren Türker
2026-11-21 13:06   ` sashiko-bot
2026-11-21 17:56   ` kernel test robot
2026-11-21 12:59 ` [PATCH v3 3/4] PCI: Convert quirks.c " Habil Eren Türker
2026-11-21 12:59 ` [PATCH v3 4/4] x86/quirks: Use pci_power_t_eq() in apple_airport_reset() Habil Eren Türker

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.