Commit graph

7546 commits

Author SHA1 Message Date
Linus Torvalds
0cdee263bc [GIT PULL for v6.17] media updates
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmiLgnwACgkQCF8+vY7k
 4RULug/9Hro6lyA8ZtKjPd0nAhML5XC4Cdds4CUE8C0jkdUs5UEXdZMkvq+FA8iT
 O0lMZpo3ssCyqTEPCUyDxu9X9Z+meGCzFg2imPWMgcGRGtkNH+WxBfWBECrWJIbA
 jnBgvYM+EDP+GRacW4yLVK/O4l9+8E1mDhYdouf7T3uy1leEM6GFGjZTtYkEM74+
 7mJh+4+fXfRrBvoZZ2HYQa8OCn18zs7YYpVdTBHBncd6qvhRm7/g3xHhkpyh/iR4
 M2BEM1FEeVPj7SGKR4ojKrltz5EYAhtdI5p9hJ/SCCXyk9H55jpdSfwEMw1UaHdm
 HdC5G4Cen4aI7aVHU9CdwW2fRsLfU1b7Lhb8IMGaBGvUoJlg94q5qNt9KS2SFnpk
 U/IwoMOxQVDNIGjr/cZ81QHLnjR2Tcb1RQ4vJKDxLu2flCNO8pDG8TGEbcSq0UKb
 TFEsmykP5s6LEMCKO3htpq4lx+MTCF/pUS99TkgM//WOFcuM505scIbBio1tutpk
 CXVn5KoT5ecNgt3xSGaWN6KtBWr12mnuY5oqVBRfoFKrAvl0xbexbToBvE3uSCWc
 tcUJ+3bMlZZvZsYdF2HvHQTXfx4glrWAP9tfusjstvKie+z8JfixVktNGSLCMU+4
 qvidvLM99t/9bw+Bt0O4BbvryRnGi2+RA1Afo6zGRnRpxYMkagY=
 =oX7n
 -----END PGP SIGNATURE-----

Merge tag 'media/v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - v4l2 core:
     - sub-device framework routing improvements
     - NV12M tiled variants added to v4l2_format_info
     - some fixes at control handler freeing logic
     - fixed H264 SEPARATE_COLOUR_PLANE check

 - new staging driver: Intel IPU7 PCI

 - Rockchip video decoder driver got promoted from staging

 - iris: added HEVC/VP9 encoder/decoder support

 - vsp1: driver has gained Renesas VSPX support

 - uvc:
     - switched to vb2 ioctl helpers
     - added MSXU 1.5 metadata support

 - atomisp: GC0310 sensor driver cleanups in preparation for moving it
   out of staging

 - Lots of cleanup, fixes and improvements

* tag 'media/v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (310 commits)
  media: rkvdec: Unstage the driver
  media: rkvdec: Remove TODO file
  media: dt-bindings: rockchip: Add RK3576 Video Decoder bindings
  media: dt-bindings: rockchip: Document RK3588 Video Decoder bindings
  media: amphion: Support dmabuf and v4l2 buffer without binding
  media: verisilicon: postproc: 4K support
  media: v4l2: Add support for NV12M tiled variants to v4l2_format_info()
  media: uvcvideo: Use a count variable for meta_formats instead of 0 terminating
  media: uvcvideo: Auto-set UVC_QUIRK_MSXU_META
  media: uvcvideo: Introduce V4L2_META_FMT_UVC_MSXU_1_5
  media: uvcvideo: Introduce dev->meta_formats
  media: Documentation: Add note about UVCH length field
  media: uvcvideo: Do not mark valid metadata as invalid
  media: uvcvideo: uvc_v4l2_unlocked_ioctl: Invert PM logic
  media: core: export v4l2_translate_cmd
  media: uvcvideo: Turn on the camera if V4L2_EVENT_SUB_FL_SEND_INITIAL
  media: uvcvideo: Remove stream->is_streaming field
  media: uvcvideo: Split uvc_stop_streaming()
  media: uvcvideo: Handle locks in uvc_queue_return_buffers
  media: uvcvideo: Use vb2 ioctl and fop helpers
  ...
2025-07-31 13:16:09 -07:00
Linus Torvalds
98e8f2c0e0 x86/platform changes for v6.17:
This tree adds support for the AMD hardware feedback interface (HFI),
 by Perry Yuan.
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmiIdwERHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1gYIRAAueF4R6gXv2luxwZc5xDHUp0z3W2nkFWB
 mpD329mqewy79fPusGRMjwxwuT7/EzIIfVkjOAi21RnwkoU/L6kBdIsn/ZGMTUpG
 +8zFnjBsdAb2Nm27LZ+W6nTxHn+ZiMs1U2AUqYC+F/sTtILA7LKt0aufgRrw028I
 aZKHOvHoYRYxgQEgcaCjBXXyUsw4zetIV8i2fj+rflutXL5tLSSgg9Pyh/dNU8JX
 MfWHxC2J79mYc8sLj2Pc0H6wuMPDCZ7uzBq/uieuZjhDouSdV9oDFoc3bNwYpxZI
 7CBqg8qcnDY3HFnbT7Hwv9O0+Kbl3+714N5P1J0Lb1+ovaRazdLCA9jenRu+lXIp
 7OehfOQoxw0XbWfESvEsSmMEjiyxIbcuwyu9X+9asY8bybD21s1gzbQYOGcBD4sf
 YjbGObnGqqS2GWe6LayU6HKs6kMWQfS+8xLlvWtnT4KNPwVOT1D41Fiy8lYQMXd1
 MFX1vRxLdtMtjVrotq4UmENdK/t7fd2BRvDw3wOjSfNynIf55XFRuqR7RTCLQivJ
 Z8ZF390kb1JSmBJdNZ1Mj4XUT5fTcimLra2qSTZ2dTDO23b0IiTlgoDP1LLbYYDL
 lRGfMViwO4Kinm/nerzELv/VAFMFm/DvHmWuGj/vaRTS3r7iGb3+A5SFe4JS0Utz
 BWoqrbrAWCg=
 =h01B
 -----END PGP SIGNATURE-----

Merge tag 'x86-platform-2025-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 platform updates from Ingo Molnar:
 "This adds support for the AMD hardware feedback interface (HFI), by
  Perry Yuan"

* tag 'x86-platform-2025-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/itmt: Add debugfs file to show core priorities
  platform/x86/amd: hfi: Add debugfs support
  platform/x86/amd: hfi: Set ITMT priority from ranking data
  cpufreq/amd-pstate: Disable preferred cores on designs with workload classification
  x86/process: Clear hardware feedback history for AMD processors
  platform/x86: hfi: Add power management callback
  platform/x86: hfi: Add online and offline callback support
  platform/x86: hfi: Init per-cpu scores for each class
  platform/x86: hfi: Parse CPU core ranking data from shared memory
  platform/x86: hfi: Introduce AMD Hardware Feedback Interface Driver
  x86/msr-index: Add AMD workload classification MSRs
  MAINTAINERS: Add maintainer entry for AMD Hardware Feedback Driver
  Documentation/x86: Add AMD Hardware Feedback Interface documentation
2025-07-29 20:05:06 -07:00
Linus Torvalds
22c5696e3f Driver core changes for 6.17-rc1
- DEBUGFS
 
   - Remove unneeded debugfs_file_{get,put}() instances
 
   - Remove last remnants of debugfs_real_fops()
 
   - Allow storing non-const void * in struct debugfs_inode_info::aux
 
 - SYSFS
 
   - Switch back to attribute_group::bin_attrs (treewide)
 
   - Switch back to bin_attribute::read()/write() (treewide)
 
   - Constify internal references to 'struct bin_attribute'
 
 - Support cache-ids for device-tree systems
 
   - Add arch hook arch_compact_of_hwid()
 
   - Use arch_compact_of_hwid() to compact MPIDR values on arm64
 
 - Rust
 
   - Device
 
     - Introduce CoreInternal device context (for bus internal methods)
 
     - Provide generic drvdata accessors for bus devices
 
     - Provide Driver::unbind() callbacks
 
     - Use the infrastructure above for auxiliary, PCI and platform
 
     - Implement Device::as_bound()
 
     - Rename Device::as_ref() to Device::from_raw() (treewide)
 
     - Implement fwnode and device property abstractions
 
       - Implement example usage in the Rust platform sample driver
 
   - Devres
 
     - Remove the inner reference count (Arc) and use pin-init instead
 
     - Replace Devres::new_foreign_owned() with devres::register()
 
     - Require T to be Send in Devres<T>
 
     - Initialize the data kept inside a Devres last
 
     - Provide an accessor for the Devres associated Device
 
   - Device ID
 
     - Add support for ACPI device IDs and driver match tables
 
     - Split up generic device ID infrastructure
 
     - Use generic device ID infrastructure in net::phy
 
   - DMA
 
     - Implement the dma::Device trait
 
     - Add DMA mask accessors to dma::Device
 
     - Implement dma::Device for PCI and platform devices
 
     - Use DMA masks from the DMA sample module
 
   - I/O
 
     - Implement abstraction for resource regions (struct resource)
 
     - Implement resource-based ioremap() abstractions
 
     - Provide platform device accessors for I/O (remap) requests
 
   - Misc
 
     - Support fallible PinInit types in Revocable
 
     - Implement Wrapper<T> for Opaque<T>
 
     - Merge pin-init blanket dependencies (for Devres)
 
 - Misc
 
   - Fix OF node leak in auxiliary_device_create()
 
   - Use util macros in device property iterators
 
   - Improve kobject sample code
 
   - Add device_link_test() for testing device link flags
 
   - Fix typo in Documentation/ABI/testing/sysfs-kernel-address_bits
 
   - Hint to prefer container_of_const() over container_of()
 -----BEGIN PGP SIGNATURE-----
 
 iHQEABYKAB0WIQS2q/xV6QjXAdC7k+1FlHeO1qrKLgUCaIjkhwAKCRBFlHeO1qrK
 LpXuAP9RWwfD9ZGgQZ9OsMk/0pZ2mDclaK97jcmI9TAeSxeZMgD1FHnOMTY7oSIi
 iG7Muq0yLD+A5gk9HUnMUnFNrngWCg==
 =jgRj
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core updates from Danilo Krummrich:
 "debugfs:
   - Remove unneeded debugfs_file_{get,put}() instances
   - Remove last remnants of debugfs_real_fops()
   - Allow storing non-const void * in struct debugfs_inode_info::aux

  sysfs:
   - Switch back to attribute_group::bin_attrs (treewide)
   - Switch back to bin_attribute::read()/write() (treewide)
   - Constify internal references to 'struct bin_attribute'

  Support cache-ids for device-tree systems:
   - Add arch hook arch_compact_of_hwid()
   - Use arch_compact_of_hwid() to compact MPIDR values on arm64

  Rust:
   - Device:
       - Introduce CoreInternal device context (for bus internal methods)
       - Provide generic drvdata accessors for bus devices
       - Provide Driver::unbind() callbacks
       - Use the infrastructure above for auxiliary, PCI and platform
       - Implement Device::as_bound()
       - Rename Device::as_ref() to Device::from_raw() (treewide)
       - Implement fwnode and device property abstractions
       - Implement example usage in the Rust platform sample driver
   - Devres:
       - Remove the inner reference count (Arc) and use pin-init instead
       - Replace Devres::new_foreign_owned() with devres::register()
       - Require T to be Send in Devres<T>
       - Initialize the data kept inside a Devres last
       - Provide an accessor for the Devres associated Device
   - Device ID:
       - Add support for ACPI device IDs and driver match tables
       - Split up generic device ID infrastructure
       - Use generic device ID infrastructure in net::phy
   - DMA:
       - Implement the dma::Device trait
       - Add DMA mask accessors to dma::Device
       - Implement dma::Device for PCI and platform devices
       - Use DMA masks from the DMA sample module
   - I/O:
       - Implement abstraction for resource regions (struct resource)
       - Implement resource-based ioremap() abstractions
       - Provide platform device accessors for I/O (remap) requests
   - Misc:
       - Support fallible PinInit types in Revocable
       - Implement Wrapper<T> for Opaque<T>
       - Merge pin-init blanket dependencies (for Devres)

  Misc:
   - Fix OF node leak in auxiliary_device_create()
   - Use util macros in device property iterators
   - Improve kobject sample code
   - Add device_link_test() for testing device link flags
   - Fix typo in Documentation/ABI/testing/sysfs-kernel-address_bits
   - Hint to prefer container_of_const() over container_of()"

* tag 'driver-core-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (84 commits)
  rust: io: fix broken intra-doc links to `platform::Device`
  rust: io: fix broken intra-doc link to missing `flags` module
  rust: io: mem: enable IoRequest doc-tests
  rust: platform: add resource accessors
  rust: io: mem: add a generic iomem abstraction
  rust: io: add resource abstraction
  rust: samples: dma: set DMA mask
  rust: platform: implement the `dma::Device` trait
  rust: pci: implement the `dma::Device` trait
  rust: dma: add DMA addressing capabilities
  rust: dma: implement `dma::Device` trait
  rust: net::phy Change module_phy_driver macro to use module_device_table macro
  rust: net::phy represent DeviceId as transparent wrapper over mdio_device_id
  rust: device_id: split out index support into a separate trait
  device: rust: rename Device::as_ref() to Device::from_raw()
  arm64: cacheinfo: Provide helper to compress MPIDR value into u32
  cacheinfo: Add arch hook to compress CPU h/w id into 32 bits for cache-id
  cacheinfo: Set cache 'id' based on DT data
  container_of: Document container_of() is not to be used in new code
  driver core: auxiliary bus: fix OF node leak
  ...
2025-07-29 12:15:39 -07:00
Linus Torvalds
86aa721820 chrome-platform: Updates for v6.17
* New
 
   - Support ECC in chromeos_pstore.
   - Allow to control power and data role via sysfs in cros_ec_typec.
 
 * Improvements
 
   - Defer probe when the dependencies are not ready in cros_ec_typec.
   - Retry when a sensor is not ready in cros_ec_sensorhub.
 
 * Fixes
 
   - Unregister the blocking notifier as well when unregistering the
     struct cros_ec_device.
 
 * Cleanups
 
   - Remove redundant code and leverage more suitable helper macro in
     chromeos_laptop.
   - Fix typo.
 -----BEGIN PGP SIGNATURE-----
 
 iIkEABYKADEWIQS0yQeDP3cjLyifNRUrxTEGBto89AUCaIcVZhMcdHp1bmdiaUBr
 ZXJuZWwub3JnAAoJECvFMQYG2jz06+oBAI/DYCKldtOuy+evThTHsvcysYV9bTao
 M0j6jwO0/UyMAP9lnTnkt9xAXwurtGtQndFUEmmXPEiIwFlyOS3e/Jg6BQ==
 =xX5P
 -----END PGP SIGNATURE-----

Merge tag 'chrome-platform-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux

Pull chrome platform updates from Tzung-Bi Shih:
 "New:
   - Support ECC in chromeos_pstore
   - Allow to control power and data role via sysfs in cros_ec_typec

  Improvements:
   - Defer probe when the dependencies are not ready in cros_ec_typec
   - Retry when a sensor is not ready in cros_ec_sensorhub

  Fixes:
   - Unregister the blocking notifier as well when unregistering the
     struct cros_ec_device.

  Cleanups:
   - Remove redundant code and leverage more suitable helper macro in
     chromeos_laptop
   - Fix typo"

* tag 'chrome-platform-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
  platform/chrome: Fix typo in CROS_USBPD_NOTIFY help text
  platform/chrome: cros_ec_typec: Check ec platform device pointer
  platform/chrome: cros_ec: Unregister notifier in cros_ec_unregister()
  platform/chrome: cros_ec_typec: Add role swap ops
  platform/chrome: chromeos_laptop: Replace open coded variant of DEFINE_RES_IRQ()
  platform/chrome: chromeos_laptop: Remove duplicate check
  platform/chrome: cros_ec_sensorhub: Retries when a sensor is not ready
  platform/chrome: chromeos_pstore: Add ecc_size module parameter
  platform/chrome: cros_ec_typec: Defer probe on missing EC parent
2025-07-28 23:26:07 -07:00
Linus Torvalds
9669b2499e platform-drivers-x86 for v6.17-1
Highlights
 
  - alienware: Add more precise labels to fans
 
  - amd/hsmp: Improve misleading probe errors (make the legacy driver
              aware when HSMP is supported through the ACPI driver)
 
  - amd/pmc: Add Lenovo Yoga 6 13ALCL6 to pmc quirk list
 
  - drm/xe: Correct (D)VSEC information to support PMT crashlog feature
 
  - fujitsu: Clamp charge threshold instead of returning an error
 
  - ideapad: Expore change types
 
  - intel/pmt:
 
    - Add PMT Discovery driver
 
    - Add API to retrieve telemetry regions by feature
 
    - Fix crashlog NULL access
 
    - Support Battlemage GPU (BMG) crashlog
 
  - intel/vsec:
 
    - Add Discovery feature
 
    - Add feature dependency support using device links
 
  - lenovo:
 
    - Move lenovo drivers under drivers/platform/x86/lenovo/
 
    - Add WMI drivers for Lenovo Gaming series
 
    - Improve DMI handling
 
  - oxpec:
 
    - Add support for OneXPlayer X1 Mini Pro (Strix Point variant)
 
    - Fix EC registers for G1 AMD
 
  - samsung-laptop: Expose change types
 
  - wmi: Fix WMI device naming issue (same GUID corner cases)
 
  - x86-android-tables: Add ovc-capacity-table to generic battery nodes
 
  - Miscellaneous cleanups / refactoring / improvements
 
 The following is an automated shortlog grouped by driver:
 
 Add Lenovo Capability Data 01 WMI Driver:
  - Add Lenovo Capability Data 01 WMI Driver
 
 Add Lenovo Gamezone WMI Driver:
  - Add Lenovo Gamezone WMI Driver
 
 Add Lenovo Other Mode WMI Driver:
  - Add Lenovo Other Mode WMI Driver
 
 Add lenovo-wmi-* driver Documentation:
  - Add lenovo-wmi-* driver Documentation
 
 Add Lenovo WMI Events Driver:
  - Add Lenovo WMI Events Driver
 
 Add lenovo-wmi-helpers:
  - Add lenovo-wmi-helpers
 
 alienware-wmi-wmax:
  -  Add appropriate labels to fans
 
 amd/hsmp:
  -  Enhance the print messages to prevent confusion
  -  Use IS_ENABLED() instead of IS_REACHABLE()
 
 amd: pmc:
  -  Add Lenovo Yoga 6 13ALC6 to pmc quirk list
 
 arm64: lenovo-yoga-c630:
  -  use the auxiliary device creation helper
 
 dell_rbu:
  -  Remove unused struct
 
 dell-uart-backlight:
  -  Use blacklight power constant
 
 docs:
  -  Add ABI documentation for intel_pmt feature directories
 
 Documentation: ABI:
  -  Update WMI device paths in ABI docs
 
 drm/xe:
  -  Correct BMG VSEC header sizing
  -  Correct the rev value for the DVSEC entries
 
 fujitsu:
  -  clamp charge_control_end_threshold values to 50
  -  use unsigned int for kstrtounit
 
 ideapad:
  -  Expose charge_types
 
 intel/pmt:
  -  Add PMT Discovery driver
  -  add register access helpers
  -  correct types
  -  decouple sysfs and namespace
 
 intel/pmt/discovery:
  -  fix format string warning
  -  Fix size_t specifiers for 32-bit
  -  Get telemetry attributes
 
 intel/pmt:
  -  fix a crashlog NULL pointer access
  -  fix build dependency for kunit test
  -  KUNIT test for PMT Enhanced Discovery API
  -  mutex clean up
  -  refactor base parameter
  -  re-order trigger logic
  -  support BMG crashlog
 
 intel/pmt/telemetry:
  -  Add API to retrieve telemetry regions by feature
 
 intel/pmt:
  -  use a version struct
  -  use guard(mutex)
  -  white space cleanup
 
 intel_telemetry:
  -  Remove unused telemetry_*_events()
  -  Remove unused telemetry_[gs]et_sampling_period()
  -  Remove unused telemetry_raw_read_events()
 
 intel/tpmi:
  -  Get OOBMSM CPU mapping from TPMI
  -  Relocate platform info to intel_vsec.h
 
 intel/vsec:
  -  Add device links to enforce dependencies
  -  Add new Discovery feature
  -  Add private data for per-device data
  -  Create wrapper to walk PCI config space
  -  Set OOBMSM to CPU mapping
  -  Skip absent features during initialization
  -  Skip driverless features
 
 lenovo:
  -  gamezone needs "other mode"
 
 lenovo-yoga-tab2-pro-1380-fastcharger:
  -  Use devm_pinctrl_register_mappings()
 
 MAINTAINERS:
  -  Add link to documentation of Intel PMT ABI
 
 Move Lenovo files into lenovo subdir:
  - Move Lenovo files into lenovo subdir
 
 oxpec:
  -  Add support for OneXPlayer X1 Mini Pro (Strix Point)
  -  Fix turbo register for G1 AMD
 
 samsung-laptop:
  -  Expose charge_types
 
 silicom:
  -  remove unnecessary GPIO line direction check
 
 thinklmi:
  -  improved DMI handling
 
 thinkpad_acpi:
  -  Handle KCOV __init vs inline mismatches
 
 wmi:
  -  Fix WMI device naming issue
 
 x86-android-tablets:
  -  Add generic_lipo_4v2_battery info
  -  Add ovc-capacity-table info
 
 Merges:
  -  Merge branch 'fixes' into 'for-next'
  -  Merge branch 'fixes' into for-next
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSCSUwRdwTNL2MhaBlZrE9hU+XOMQUCaIdbygAKCRBZrE9hU+XO
 MbqTAQCqqczU2YXRnq7TIvw/yl40+scIKMXobjX0EEpmgqhlHwEAkWwjQG0ytS2j
 hzES5gog1xT6A4TIjVr0Up5MUj3crwU=
 =+TRi
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform drivers from Ilpo Järvinen:

 - alienware: Add more precise labels to fans

 - amd/hsmp: Improve misleading probe errors (make the legacy driver
   aware when HSMP is supported through the ACPI driver)

 - amd/pmc: Add Lenovo Yoga 6 13ALCL6 to pmc quirk list

 - drm/xe: Correct (D)VSEC information to support PMT crashlog feature

 - fujitsu: Clamp charge threshold instead of returning an error

 - ideapad: Expore change types

 - intel/pmt:
     - Add PMT Discovery driver
     - Add API to retrieve telemetry regions by feature
     - Fix crashlog NULL access
     - Support Battlemage GPU (BMG) crashlog

 - intel/vsec:
     - Add Discovery feature
     - Add feature dependency support using device links

 - lenovo:
     - Move lenovo drivers under drivers/platform/x86/lenovo/
     - Add WMI drivers for Lenovo Gaming series
     - Improve DMI handling

 - oxpec:
     - Add support for OneXPlayer X1 Mini Pro (Strix Point variant)
     - Fix EC registers for G1 AMD

 - samsung-laptop: Expose change types

 - wmi: Fix WMI device naming issue (same GUID corner cases)

 - x86-android-tables: Add ovc-capacity-table to generic battery nodes

 - Miscellaneous cleanups / refactoring / improvements

* tag 'platform-drivers-x86-v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (63 commits)
  platform/x86: oxpec: Add support for OneXPlayer X1 Mini Pro (Strix Point)
  platform/x86: oxpec: Fix turbo register for G1 AMD
  platform/x86/intel/pmt: support BMG crashlog
  platform/x86/intel/pmt: use a version struct
  platform/x86/intel/pmt: refactor base parameter
  platform/x86/intel/pmt: add register access helpers
  platform/x86/intel/pmt: decouple sysfs and namespace
  platform/x86/intel/pmt: correct types
  platform/x86/intel/pmt: re-order trigger logic
  platform/x86/intel/pmt: use guard(mutex)
  platform/x86/intel/pmt: mutex clean up
  platform/x86/intel/pmt: white space cleanup
  drm/xe: Correct BMG VSEC header sizing
  drm/xe: Correct the rev value for the DVSEC entries
  platform/x86/intel/pmt: fix a crashlog NULL pointer access
  platform/x86: samsung-laptop: Expose charge_types
  platform/x86/amd: pmc: Add Lenovo Yoga 6 13ALC6 to pmc quirk list
  platform/x86: dell-uart-backlight: Use blacklight power constant
  platform/x86/intel/pmt: fix build dependency for kunit test
  platform/x86: lenovo: gamezone needs "other mode"
  ...
2025-07-28 23:21:28 -07:00
Linus Torvalds
fcb117e075 gpio updates for v6.17-rc1
GPIOLIB core:
 - introduce a parallel, limited sysfs user ABI that doesn't expose the
   global GPIO numbers to user-space while maintaining backward
   compatibility with the end goal of it completely replacing the existing
   interface, allowing us to remove it
 - remove the legacy devm_gpio_request() routine which has no more users
 - start the process of allowing to compile-out the legacy parts of the
   GPIO core for users who don't need it by introducing a new Kconfig
   option: GPIOLIB_LEGACY
 - don't use global GPIO numbers in debugfs output from the core code
   (drivers still do it, the work is ongoing)
 - start the process of moving the fields specific to the gpio-mmio helper
   out of the core struct gpio_chip into their own structure that wraps
   it: create a new header with modern interfaces and convert several
   drivers to using it
 - remove the platform data structure associated with the gpio-mmio helper
   from the kernel after having converted all remaining users to generic
   device properties
 - remove legacy struct gpio definition as it has no more users
 
 New drivers:
 - add the GPIO driver for the Apple System Management Controller
 
 Driver improvements:
 - add support for new models to gpio-adp5585, gpio-tps65219 and
   gpio-pca953x
 - extend the interrupt support in gpio-loongson-64bit
 - allow to mark the simulated GPIO lines as invalid in gpio-sim
 - convert all remaining GPIO drivers to using the new GPIO value setter
   callbacks
 - convert gpio-rcar to using simple device power management ops callbacks
 - don't check if current direction of a line is output before setting
   the value in gpio-pisosr and ti-fpc202: the GPIO core already handles
   that
 - also drop unneeded GPIO range checks in drivers, the core already makes
   sure we're within bounds when calling driver callbacks
 - use dev_fwnode() where applicable across GPIO drivers
 - set line value in gpio-zynqmp-modepin and gpio-twl6040 when the user
   wants to change direction of the pin to output even though these
   drivers don't need to do anything else to actually set the direction,
   otherwise a call like gpiod_direction_output(d, 1) will not result in
   the line driver high
 - remove the reduntant call to pm_runtime_mark_last_busy() from
   gpio-arizona
 - use lock guards in gpio-cadence and gpio-mxc
 - check the return values of regmap functions in gpio-wcd934x and
   gpio-tps65912
 - use better regmap interfaces in gpio-wcove and gpio-pca953x
 - remove dummy GPIO chip callbacks from several drivers in cases where
   the GPIO core can already handle their absence
 - allow building gpio-palmas as a module
 
 Fixes:
 - use correct bit widths (according to the documentation) in gpio-virtio
 
 Device-tree bindings:
 - convert several of the legacy .txt documents for many different devices
   to YAML, improving automatic validation
 - create a "trivial" GPIO DT schema that covers a wide range of simple
   hardware that share a set of basic GPIO properties
 - document new HW: Apple MAC SMC GPIO block and adp5589 I/O expander
 - document a new model for pca95xx
 - add and/or remove properties in YAML documents for gpio-rockchip,
   fsl,qoriq-gpio, arm,pl061 and gpio-xilinx
 
 Misc:
 - some minor refactoring in several places, adding/removing forward
   declarations, moving defines to better places, constify the arguments
   in some functions, remove duplicate includes, etc.
 - documentation updates
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmiHQsUACgkQEacuoBRx
 13LNDxAAsHxVqBjdCSzmnOCteIRrRWv8yCzeuPzFWekxGPJNEx/tC83cqdLF2yN/
 MFrlQLx4ZksCBWOmcoC9aQE5c8ZXfnugF2rztxeDIRtSwC0ED97K9Z798RrgLJUF
 M6HyaWgsEcMBDk0jXG2w3JESnPbx74VnGtPixv8+QeiM2DA5XRsLPaPbQEkatBVo
 9T7Ls/vfS6AK9fSqMg2ZjKi3bXpXMsmU4PXrhh/mCGSBU/TO3fF1IPig5SsKUpNL
 C2nm3e4XIaXCNIBqgGSpppbzCrwDBlDTb029QtoStXgsiMbppXI532NjuCfDlj80
 1Vlmwot4O91SJoC9XvmSM6KBWrBqX2zL3bYtpkLymEPPS8+25gwQ3HxteIzl1V4S
 Up8KZ+9EmNxxhfKYzhdWG0Puyam4sHiP1MlkeyEKgHJen4/07Pg4WdOthyuH72tg
 /U5wS+zDhhDpibHFYdQ5F04ubMfVxipvf0JHhbjuDAuXKqGohjJNUiE2/M7yBnyd
 n0IS9Bw95lOLepbAHkm/JneFvSJYJfOrLz+d981664tfrY7A99RLtSOluzQKSrzz
 dpqc+yn+x/TKaZeYV22mhIri5o9oupT7JqPHqXYe//iWzJt3m2EavzTRoR2JeJQq
 p7Quytgfj4FcR2v6GyldXWwFhRK0397kOLcNUQ7HVMaOAMMi5Y8=
 =tUPm
 -----END PGP SIGNATURE-----

Merge tag 'gpio-updates-for-v6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio updates from Bartosz Golaszewski:
 "There's one new driver (Apple SMC) and extensions to existing drivers
  for supporting new HW models. A lot of different impovements across
  drivers and in core GPIO code. Details on that are in the signed tag
  as usual.

  We managed to remove some of the legacy APIs. Arnd Bergmann started to
  work on making the legacy bits optional so that we may compile them
  only for older platforms that still really need them.

  Rob Herring has done a lot of work to convert legacy .txt dt-bindings
  for GPIO controllers to YAML. There are only a few left now in the
  GPIO tree.

  A big part of the commits in this PR concern the conversion of GPIO
  drivers to using the new line value setter callbacks. This conversion
  is now complete treewide (unless I've missed something) and once all
  the changes from different trees land in mainline, I'll send you
  another PR containing a commit dropping the legacy callbacks from the
  tree.

  As the quest to pay back technical dept never really ends, we're
  starting another set of interface conversions, this time it's about
  moving fields specific to only a handful of drivers using the
  gpio-mmio helper out of the core gpio_chip structure that every
  controller implements and uses. This cycle we introduce a new set of
  APIs and convert a few drivers under drivers/gpio/, next cycle we'll
  convert remaining modules treewide (in gpio, pinctrl and mfd trees)
  and finally remove the old interfaces and move the gpio-mmio fields
  into their own structure wrapping gpio_chip.

  One last change I should mention here is the rework of the sysfs
  interface. In 2016, we introduced the GPIO character device as the
  preferred alternative to the sysfs class under /sys/class/gpio. While
  it has seen a wide adoption with the help of its user-space
  counterpart - libgpiod - there are still users who prefer the
  simplicity of sysfs.

  As far as the GPIO subsystem is concerned, the problem is not the
  existince of the GPIO class as such but rather the fact that it
  exposes the global GPIO numbers to the user-space, stopping us from
  ever being able to remove the numberspace from the kernel. To that
  end, this release we introduced a parallel, limited sysfs interface
  that doesn't expose these numbers and only implements a subset of
  features that are relevant to the existing users. This is a result of
  several discussions over the course of last year and should allow us
  to remove the legacy part some time in the future.

  Summary:

  GPIOLIB core:
   - introduce a parallel, limited sysfs user ABI that doesn't expose
     the global GPIO numbers to user-space while maintaining backward
     compatibility with the end goal of it completely replacing the
     existing interface, allowing us to remove it
   - remove the legacy devm_gpio_request() routine which has no more
     users
   - start the process of allowing to compile-out the legacy parts of
     the GPIO core for users who don't need it by introducing a new
     Kconfig option: GPIOLIB_LEGACY
   - don't use global GPIO numbers in debugfs output from the core code
     (drivers still do it, the work is ongoing)
   - start the process of moving the fields specific to the gpio-mmio
     helper out of the core struct gpio_chip into their own structure
     that wraps it: create a new header with modern interfaces and
     convert several drivers to using it
   - remove the platform data structure associated with the gpio-mmio
     helper from the kernel after having converted all remaining users
     to generic device properties
   - remove legacy struct gpio definition as it has no more users

  New drivers:
   - add the GPIO driver for the Apple System Management Controller

  Driver improvements:
   - add support for new models to gpio-adp5585, gpio-tps65219 and
     gpio-pca953x
   - extend the interrupt support in gpio-loongson-64bit
   - allow to mark the simulated GPIO lines as invalid in gpio-sim
   - convert all remaining GPIO drivers to using the new GPIO value
     setter callbacks
   - convert gpio-rcar to using simple device power management ops
     callbacks
   - don't check if current direction of a line is output before setting
     the value in gpio-pisosr and ti-fpc202: the GPIO core already
     handles that
   - also drop unneeded GPIO range checks in drivers, the core already
     makes sure we're within bounds when calling driver callbacks
   - use dev_fwnode() where applicable across GPIO drivers
   - set line value in gpio-zynqmp-modepin and gpio-twl6040 when the
     user wants to change direction of the pin to output even though
     these drivers don't need to do anything else to actually set the
     direction, otherwise a call like gpiod_direction_output(d, 1) will
     not result in the line driver high
   - remove the reduntant call to pm_runtime_mark_last_busy() from
     gpio-arizona
   - use lock guards in gpio-cadence and gpio-mxc
   - check the return values of regmap functions in gpio-wcd934x and
     gpio-tps65912
   - use better regmap interfaces in gpio-wcove and gpio-pca953x
   - remove dummy GPIO chip callbacks from several drivers in cases
     where the GPIO core can already handle their absence
   - allow building gpio-palmas as a module

  Fixes:
   - use correct bit widths (according to the documentation) in
     gpio-virtio

  Device-tree bindings:
   - convert several of the legacy .txt documents for many different
     devices to YAML, improving automatic validation
   - create a "trivial" GPIO DT schema that covers a wide range of
     simple hardware that share a set of basic GPIO properties
   - document new HW: Apple MAC SMC GPIO block and adp5589 I/O expander
   - document a new model for pca95xx
   - add and/or remove properties in YAML documents for gpio-rockchip,
     fsl,qoriq-gpio, arm,pl061 and gpio-xilinx

  Misc:
   - some minor refactoring in several places, adding/removing forward
     declarations, moving defines to better places, constify the
     arguments in some functions, remove duplicate includes, etc.
   - documentation updates"

* tag 'gpio-updates-for-v6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (202 commits)
  MIPS: alchemy: gpio: use new GPIO line value setter callbacks for the remaining chips
  gpiolib: enable CONFIG_GPIOLIB_LEGACY even for !GPIOLIB
  gpio: virtio: Fix config space reading.
  gpiolib: make legacy interfaces optional
  dt-bindings: gpio: rockchip: Allow use of a power-domain
  gpiolib: of: add forward declaration for struct device_node
  power: reset: macsmc-reboot: Add driver for rebooting via Apple SMC
  gpio: Add new gpio-macsmc driver for Apple Macs
  mfd: Add Apple Silicon System Management Controller
  soc: apple: rtkit: Make shmem_destroy optional
  dt-bindings: mfd: Add Apple Mac System Management Controller
  dt-bindings: power: reboot: Add Apple Mac SMC Reboot Controller
  dt-bindings: gpio: Add Apple Mac SMC GPIO block
  gpio: cadence: Remove duplicated include in gpio-cadence.c
  gpio: tps65219: Add support for TI TPS65214 PMIC
  gpio: tps65219: Update _IDX & _OFFSET macro prefix
  gpio: sysfs: Fix an end of loop test in gpiod_unexport()
  dt-bindings: gpio: Convert qca,ar7100-gpio to DT schema
  dt-bindings: gpio: Convert maxim,max3191x to DT schema
  dt-bindings: gpio: fsl,qoriq-gpio: Add missing mpc8xxx compatibles
  ...
2025-07-28 21:58:46 -07:00
Keenan Salandy
cc2d5b72b1 platform/chrome: Fix typo in CROS_USBPD_NOTIFY help text
Correct the misspelling "platorms" to "platforms" in the help text
for the CROS_USBPD_NOTIFY Kconfig option.

Signed-off-by: Keenan Salandy <keenansalandy@gmail.com>
Link: https://lore.kernel.org/r/20250723140930.1443-1-keenansalandy@gmail.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2025-07-23 23:09:44 +00:00
Tomasz Michalec
731a4702b6 platform/chrome: cros_ec_typec: Check ec platform device pointer
It is possible that parent device for cros_ec_typec device is already
available, but ec pointer in parent driver data isn't populated yet. It
may happen when cros_typec_probe is running in parallel with
cros_ec_register. This leads to NULL pointer dereference when
cros_typec_probe tries to get driver data from typec->ec->ec->dev.

Check if typec->ec->ec is set before using it in cros_typec_probe.

Signed-off-by: Tomasz Michalec <tmichalec@google.com>
Link: https://lore.kernel.org/r/20250722132826.707087-1-tmichalec@google.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2025-07-23 03:19:16 +00:00
Tzung-Bi Shih
e237495346 platform/chrome: cros_ec: Unregister notifier in cros_ec_unregister()
The blocking notifier is registered in cros_ec_register(); however, it
isn't unregistered in cros_ec_unregister().

Fix it.

Fixes: 42cd0ab476 ("platform/chrome: cros_ec: Query EC protocol version if EC transitions between RO/RW")
Cc: stable@vger.kernel.org
Reviewed-by: Benson Leung <bleung@chromium.org>
Link: https://lore.kernel.org/r/20250722120513.234031-1-tzungbi@kernel.org
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2025-07-23 02:44:39 +00:00
Antheas Kapenekakis
1798561bef
platform/x86: oxpec: Add support for OneXPlayer X1 Mini Pro (Strix Point)
The OneXPlayer X1 Mini Pro (which is the Strix Point variant of the Mini)
uses the same registers as the X1 Mini, so re-use the quirk.

Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Link: https://lore.kernel.org/r/20250718163305.159232-2-lkml@antheas.dev
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:45:37 +03:00
Antheas Kapenekakis
232b41d3c2
platform/x86: oxpec: Fix turbo register for G1 AMD
Turns out that the AMD variant of the G1 uses different EC registers
than the Intel variant. Differentiate them and apply the correct ones
to the AMD variant.

Fixes: b369395c89 ("platform/x86: oxpec: Add support for the OneXPlayer G1")
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Link: https://lore.kernel.org/r/20250718163305.159232-1-lkml@antheas.dev
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:45:34 +03:00
Michael J. Ruhl
2c402a801c
platform/x86/intel/pmt: support BMG crashlog
The Battlemage GPU has the type 1 version 2 crashlog feature.

Update the crashlog driver to support this crashlog version.

Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-14-michael.j.ruhl@intel.com
[ij: make crashlog_type1_ver2 static]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:39:13 +03:00
Michael J. Ruhl
5623fa6859
platform/x86/intel/pmt: use a version struct
In preparation for supporting multiple crashlog versions, use a struct
to keep bit offset info for the status and control bits.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-13-michael.j.ruhl@intel.com
[ij: move crashlog_type1_ver0 to its final place & add consts to crashlog_info]
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:39:10 +03:00
Michael J. Ruhl
66df9fa783
platform/x86/intel/pmt: refactor base parameter
To support an upcoming crashlog change, use the parent of
struct intel_pmt_entry, struct crashlog_entry, as a main parameter.

Using struct crashlog_entry will allow for a more flexible interface
to control the crashlog feature.

- Refactor to use struct crashlog_entry in place of
  struct intel_pmt_entry
- Rename variables from "entry" to "crashlog"

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-12-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:39:08 +03:00
Michael J. Ruhl
f57b32cb4a
platform/x86/intel/pmt: add register access helpers
The control register is used in a read/modify/write pattern.
The status register is used in a read/check bit pattern.

Add helpers to eliminate common code.

Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-11-michael.j.ruhl@intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:39:06 +03:00
Michael J. Ruhl
8ab4f88d46
platform/x86/intel/pmt: decouple sysfs and namespace
The PMT namespace includes the crashlog sysfs attribute information.
Other crashlog version/types may need different sysfs attributes.
Coupling the attributes with the namespace blocks this usage.

Decouple sysfs attributes from the name space and add them to the
specific entry.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-10-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:39:03 +03:00
Michael J. Ruhl
5c7bfa1088
platform/x86/intel/pmt: correct types
A couple of local variables do not match the return types of some of
the functions.

Update the mismatched types to match.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-9-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:39:01 +03:00
Michael J. Ruhl
147c18d8ef
platform/x86/intel/pmt: re-order trigger logic
Setting the clear bit or checking the complete bit before checking to
see if crashlog is disabled seems incorrect.

Check disable before accessing any other bits.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-8-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:38:58 +03:00
Michael J. Ruhl
4f8fa22d10
platform/x86/intel/pmt: use guard(mutex)
Update the mutex paths to use the new guard() mechanism.

With the removal of goto, do some minor cleanup of the current logic
path.

Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-7-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:38:56 +03:00
Michael J. Ruhl
75a496aa05
platform/x86/intel/pmt: mutex clean up
The header file for mutex usage and mutex_destroy() cleanup code is
absent from the crashlog.c module.

Add the header file and mutex_destroy().

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-6-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:38:54 +03:00
Michael J. Ruhl
ba22fe0cff
platform/x86/intel/pmt: white space cleanup
Noticed two white space issues; cleaned them.

Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-5-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:38:51 +03:00
Michael J. Ruhl
54d5cd4719
platform/x86/intel/pmt: fix a crashlog NULL pointer access
Usage of the intel_pmt_read() for binary sysfs, requires a pcidev. The
current use of the endpoint value is only valid for telemetry endpoint
usage.

Without the ep, the crashlog usage causes the following NULL pointer
exception:

BUG: kernel NULL pointer dereference, address: 0000000000000000
Oops: Oops: 0000 [#1] SMP NOPTI
RIP: 0010:intel_pmt_read+0x3b/0x70 [pmt_class]
Code:
Call Trace:
 <TASK>
 ? sysfs_kf_bin_read+0xc0/0xe0
 kernfs_fop_read_iter+0xac/0x1a0
 vfs_read+0x26d/0x350
 ksys_read+0x6b/0xe0
 __x64_sys_read+0x1d/0x30
 x64_sys_call+0x1bc8/0x1d70
 do_syscall_64+0x6d/0x110

Augment struct intel_pmt_entry with a pointer to the pcidev to avoid
the NULL pointer exception.

Fixes: 045a513040 ("platform/x86/intel/pmt: Use PMT callbacks")
Cc: stable@vger.kernel.org
Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-2-michael.j.ruhl@intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:38:44 +03:00
Jelle van der Waa
de2884c6cd
platform/x86: samsung-laptop: Expose charge_types
Support the newly introduced charge_types sysfs attribute as a
replacement for the custom `battery_life_extender` attribute. Setting
charge_types to `Long Life` enables battery life extending mode.

This change is similar to the recent Ideapad patch adding support for
charge_types.

Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
Link: https://lore.kernel.org/r/20250702182844.107706-1-jvanderwaa@redhat.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:38:39 +03:00
Mario Limonciello
4ff3aeb664
platform/x86/amd: pmc: Add Lenovo Yoga 6 13ALC6 to pmc quirk list
The Lenovo Yoga 6 13ACL6 82ND has a similar BIOS problem as other Lenovo
laptops from that vintage that causes a rather long resume from suspend.

Add it to the quirk list that manipulates the scratch register to avoid
the issue.

Reported-by: Adam Berglund <adam.f.berglund@hotmail.com>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4434
Tested-by: Adam Berglund <adam.f.berglund@hotmail.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250718172307.1928744-1-superm1@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 16:04:45 +03:00
Thomas Zimmermann
cf685b3826
platform/x86: dell-uart-backlight: Use blacklight power constant
The backlight subsystem has gotten its own power constants. Replace
FB_BLANK_UNBLANK with BACKLIGHT_POWER_ON.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250715122643.137027-2-tzimmermann@suse.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 16:02:50 +03:00
Linus Torvalds
964ebc07c5 platform-drivers-x86 for v6.16-4
Fixes and New HW Support
 
 - alienware-wmi-wmax:
 
   - Add AWCC support for Alienware Area-51m and m15 R5.
 
   - Fix `dmi_system_id` array termination
 
 - arm64: huawei-gaokun-ec: fix OF node leak
 
 - dell-ddv: Fix taking psy->extensions_sem twice
 
 - dell-lis3lv02d: Add Precision 3551 accelerometer support
 
 - firmware_attributes_class: Fix initialization order
 
 - ideapad-laptop: Retain FnLock and kbd backlight across boots
 
 - lenovo-wmi-hotkey: Avoid triggering error -5 due to missing mute LED
 
 - mellanox: mlxbf-pmc: Validate event names and bool input
 
 - power: supply: Add get/set property direct to allow avoiding taking
                  psy->extensions_sem twice from power supply extensions
 
 The following is an automated shortlog grouped by driver:
 
 alieneware-wmi-wmax:
  -  Add AWCC support to more laptops
 
 alienware-wmi-wmax:
  -  Fix `dmi_system_id` array
 
 arm64: huawei-gaokun-ec:
  -  fix OF node leak
 
 dell-ddv:
  -  Fix taking the psy->extensions_sem lock twice
 
 dell-lis3lv02d:
  -  Add Precision 3551
 
 Fix initialization order for firmware_attributes_class:
  - Fix initialization order for firmware_attributes_class
 
 ideapad-laptop:
  -  Fix FnLock not remembered among boots
  -  Fix kbd backlight not remembered among boots
 
 lenovo-wmi-hotkey:
  -  Avoid triggering error -5 due to missing mute LED
 
 MAINTAINERS:
  -  Update entries for IFS and SBL drivers
 
 mlxbf-pmc:
  -  Remove newline char from event name input
  -  Use kstrtobool() to check 0/1 input
  -  Validate event/enable input
 
 power: supply: core:
  -  Add power_supply_get/set_property_direct()
 
 power: supply: test-power:
  -  Test access to extended power supply
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSCSUwRdwTNL2MhaBlZrE9hU+XOMQUCaH40yAAKCRBZrE9hU+XO
 MbSEAP4tNEOahKx4ER4Awg7BvJKY6lfifKvu1yt5K3/aWde9VQD8CRv99ryV3kAy
 EX3Ut1otWsB7UY7+tfV8WeYmXutf/Qs=
 =wHun
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v6.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform drivers fixes from Ilpo Järvinen:

 - power supply code:
    - Add get/set property direct to allow avoiding taking
      psy->extensions_sem twice from power supply extensions

 - alienware-wmi-wmax:
    - Add AWCC support for Alienware Area-51m and m15 R5
    - Fix `dmi_system_id` array termination

 - arm64: huawei-gaokun-ec: fix OF node leak

 - dell-ddv: Fix taking psy->extensions_sem twice

 - dell-lis3lv02d: Add Precision 3551 accelerometer support

 - firmware_attributes_class: Fix initialization order

 - ideapad-laptop: Retain FnLock and kbd backlight across boots

 - lenovo-wmi-hotkey: Avoid triggering error -5 due to missing mute LED

 - mellanox: mlxbf-pmc: Validate event names and bool input

* tag 'platform-drivers-x86-v6.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  MAINTAINERS: Update entries for IFS and SBL drivers
  platform/x86: dell-lis3lv02d: Add Precision 3551
  platform/x86: alieneware-wmi-wmax: Add AWCC support to more laptops
  platform/x86: Fix initialization order for firmware_attributes_class
  platform: arm64: huawei-gaokun-ec: fix OF node leak
  lenovo-wmi-hotkey: Avoid triggering error -5 due to missing mute LED
  platform/x86: ideapad-laptop: Fix kbd backlight not remembered among boots
  platform/x86: ideapad-laptop: Fix FnLock not remembered among boots
  platform/mellanox: mlxbf-pmc: Use kstrtobool() to check 0/1 input
  platform/mellanox: mlxbf-pmc: Validate event/enable input
  platform/mellanox: mlxbf-pmc: Remove newline char from event name input
  platform/x86: dell-ddv: Fix taking the psy->extensions_sem lock twice
  power: supply: test-power: Test access to extended power supply
  power: supply: core: Add power_supply_get/set_property_direct()
  platform/x86: alienware-wmi-wmax: Fix `dmi_system_id` array
2025-07-21 08:32:36 -07:00
Arnd Bergmann
5a9fffd8a5
platform/x86/intel/pmt: fix build dependency for kunit test
When INTEL_PMT_TELEMETRY is in a loadable module, the discovery
test cannot be built-in:

x86_64-linux-ld: drivers/platform/x86/intel/pmt/discovery-kunit.o: in function `test_intel_pmt_get_regions_by_feature':
discovery-kunit.c:(.text+0x29d): undefined reference to `intel_pmt_get_regions_by_feature'
x86_64-linux-ld: discovery-kunit.c:(.text+0x2c3): undefined reference to `intel_pmt_put_feature_group'

Add a Kconfig dependency to prevent this.

Fixes: b9707d46a9 ("platform/x86/intel/pmt: KUNIT test for PMT Enhanced Discovery API")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250714081559.4056777-1-arnd@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-21 16:59:23 +03:00
Ilpo Järvinen
b5f20799f1
Merge branch 'fixes' into 'for-next'
Merge the fixes branch into the for-next branch to resolve Makefile
conflict and include the power supply accessor work that is required
by the upcoming Uniwill driver.
2025-07-21 16:37:27 +03:00
Jan-Niklas Burfeind
aef9da3338
platform/x86: dell-lis3lv02d: Add Precision 3551
This marks 0x29 as accelerometer address on Dell Precision 3551.

I followed previous works of Paul Menzel and Hans de Goede to verify it:

$ cd /sys/bus/pci/drivers/i801_smbus/0000\:00\:1f.4

$ ls -d i2c-?
i2c-0

$ sudo modprobe i2c-dev

$ sudo i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x08-0x77.
Continue? [Y/n] Y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         08 -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- --
30: 30 -- -- -- -- 35 UU UU -- -- -- -- -- -- -- --
40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
50: UU -- 52 -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

$ echo lis3lv02d 0x29 > sudo tee /sys/bus/i2c/devices/i2c-0/new_device
lis3lv02d 0x29

$ sudo dmesg
[    0.000000] Linux version 6.12.28 (nixbld@localhost) (gcc (GCC) 14.2.1 20250322, GNU ld (GNU Binutils) 2.44) #1-NixOS SMP PREEMPT_DYNAMIC Fri May  9 07:50:53 UTC 2025
[...]
[    0.000000] DMI: Dell Inc. Precision 3551/07YHW8, BIOS 1.18.0 10/03/2022
[...]
[ 3749.077624] lis3lv02d_i2c 0-0029: supply Vdd not found, using dummy regulator
[ 3749.077732] lis3lv02d_i2c 0-0029: supply Vdd_IO not found, using dummy regulator
[ 3749.098674] lis3lv02d: 8 bits 3DC sensor found
[ 3749.182480] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input28
[ 3749.182899] i2c i2c-0: new_device: Instantiated device lis3lv02d at 0x29

Signed-off-by: Jan-Niklas Burfeind <kernel@aiyionpri.me>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Link: https://lore.kernel.org/r/20250710190919.37842-1-kernel@aiyionpri.me
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-11 19:00:15 +03:00
Kurt Borja
dbfb567f4a
platform/x86: alieneware-wmi-wmax: Add AWCC support to more laptops
Add support to Alienware Area-51m and Alienware m15 R5.

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Link: https://lore.kernel.org/r/20250710-m15_r5-v1-1-2c6ad44e5987@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-11 18:59:55 +03:00
Torsten Hilbrich
2bfe3ae1aa
platform/x86: Fix initialization order for firmware_attributes_class
The think-lmi driver uses the firwmare_attributes_class. But this class
is registered after think-lmi, causing the "think-lmi" directory in
"/sys/class/firmware-attributes" to be missing when the driver is
compiled as builtin.

Fixes: 5592240380 ("platform/x86: think-lmi: Directly use firmware_attributes_class")
Signed-off-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Link: https://lore.kernel.org/r/7dce5f7f-c348-4350-ac53-d14a8e1e8034@secunet.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-11 18:52:54 +03:00
Johan Hovold
bc48d79a18
platform: arm64: huawei-gaokun-ec: fix OF node leak
Make sure to drop the OF node reference taken when creating the Gaokun
auxiliary devices when the devices are later released.

Fixes: 7636f090d0 ("platform: arm64: add Huawei Matebook E Go EC driver")
Cc: Pengyu Luo <mitltlatltl@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Pengyu Luo <mitltlatltl@gmail.com>
Link: https://lore.kernel.org/r/20250708085358.15657-1-johan@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-11 18:48:39 +03:00
Arnd Bergmann
6e38b9fcbf
platform/x86: lenovo: gamezone needs "other mode"
Registering the "other mode" notifier fails if that is disabled:

x86_64-linux-ld: drivers/platform/x86/lenovo/wmi-gamezone.o: in function `lwmi_gz_probe':
wmi-gamezone.c:(.text+0x336): undefined reference to `devm_lwmi_om_register_notifier'

This could be fixed by adding a stub helper, but a Kconfig 'select'
seems simpler here.

Fixes: 22024ac536 ("platform/x86: Add Lenovo Gamezone WMI Driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250709151734.1268435-1-arnd@kernel.org
[ij: retained the other selects as wmi-gamezone is using them directly.]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-11 18:35:10 +03:00
Arnd Bergmann
6382c27389
platform/x86/intel/pmt/discovery: fix format string warning
When -Wformat-security is enabled, this new code triggers it:

drivers/platform/x86/intel/pmt/discovery.c: In function 'pmt_features_discovery':
drivers/platform/x86/intel/pmt/discovery.c:505:36: error: format not a string literal and no format arguments [-Werror=format-security]
  505 |                                    pmt_feature_names[feature->id]);

Fixes: d9a0788093 ("platform/x86/intel/pmt: Add PMT Discovery driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250711072718.2748415-1-arnd@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-11 18:00:48 +03:00
Abhishek Pandit-Subedi
ab229c2b72 platform/chrome: cros_ec_typec: Add role swap ops
Add the pr_set and dr_set typec_operations to registered typec ports.
This enables sysfs to control power and data role when the port is
capable of doing so.

Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Co-developed-by: Radu Vele <raduvele@google.com>
Signed-off-by: Radu Vele <raduvele@google.com>
Link: https://lore.kernel.org/r/20250711003502.857536-1-raduvele@google.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2025-07-11 03:13:08 +00:00
Suma Hegde
bde430fb66
platform/x86/amd/hsmp: Enhance the print messages to prevent confusion
When the HSMP ACPI device is present, loading the amd_hsmp.ko
module incorrectly displays the message "HSMP is not supported on
Family:%x model:%x\n" despite being supported by the hsmp_acpi.ko
module, leading to confusion.

To address this issue, relocate the acpi_dev_present() check to the
beginning of the hsmp_plt_init() and revise the print message to
better reflect the current support status.

Additionally, add more error messages in the error paths and debug
messages to indicate successful probing for both hsmp_acpi.ko
and amd_hsmp.ko modules.

Reviewed-by: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com>
Signed-off-by: Suma Hegde <suma.hegde@amd.com>
Link: https://lore.kernel.org/r/20250709105413.2487851-1-suma.hegde@amd.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-09 15:21:50 +03:00
Jackie Dong
c86f7bb92f
lenovo-wmi-hotkey: Avoid triggering error -5 due to missing mute LED
Not all of Lenovo non-ThinkPad devices support both mic mute LED (on F4)
and audio mute LED (on F1). Some of them only support one mute LED, some
of them don't have any mute LEDs. If any of the mute LEDs is missing,
the driver reports error -5.

Check if the device supports a mute LED or not. Do not trigger error -5
message from missing a mute LED if it is not supported on the device.

Signed-off-by: Jackie Dong <xy-jackie@139.com>
Suggested-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250709035716.36267-1-xy-jackie@139.com
[ij: major edits to the changelog.]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-09 11:49:20 +03:00
Nathan Chancellor
428f6f3a56
platform/x86/intel/pmt/discovery: Fix size_t specifiers for 32-bit
When building i386 allmodconfig, there are two warnings in the newly
added discovery code:

  drivers/platform/x86/intel/pmt/discovery.c: In function 'pmt_feature_get_feature_table':
  drivers/platform/x86/intel/pmt/discovery.c:427:35: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
    427 |         if (WARN(size > res_size, "Bad table size %ld > %pa", size, &res_size))
        |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~
        |                                                               |
        |                                                               size_t {aka unsigned int}
  ...
  drivers/platform/x86/intel/pmt/discovery.c:427:53: note: format string is defined here
    427 |         if (WARN(size > res_size, "Bad table size %ld > %pa", size, &res_size))
        |                                                   ~~^
        |                                                     |
        |                                                     long int
        |                                                   %d

  drivers/platform/x86/intel/pmt/discovery-kunit.c: In function 'validate_pmt_regions':
  include/linux/kern_levels.h:5:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
  ...
  drivers/platform/x86/intel/pmt/discovery-kunit.c:35:17: note: in expansion of macro 'kunit_info'
     35 |                 kunit_info(test, "\t\taddr=%p, size=%lu, num_rmids=%u", region->addr, region->size,
        |                 ^~~~~~~~~~

size_t is 'unsigned long' for 64-bit platforms but 'unsigned int' for
32-bit platforms, so '%ld' is not correct. Use the proper size_t
specifier, '%zu', to resolve the warnings on 32-bit platforms while not
affecting 64-bit platforms.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernelci.org bot <bot@kernelci.org>
Fixes: d9a0788093 ("platform/x86/intel/pmt: Add PMT Discovery driver")
Fixes: b9707d46a9 ("platform/x86/intel/pmt: KUNIT test for PMT Enhanced Discovery API")
Closes: https://lore.kernel.org/all/CACo-S-29Degjym-azsJNSd1yofLOB2_Rf5xpa9b7L-14OPn7wQ@mail.gmail.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20250708-discovery-pmt-fix-32-bit-formats-v1-1-296a5fc9c3d4@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-09 11:32:37 +03:00
Rong Zhang
e10981075a
platform/x86: ideapad-laptop: Fix kbd backlight not remembered among boots
On some models supported by ideapad-laptop, the HW/FW can remember the
state of keyboard backlight among boots. However, it is always turned
off while shutting down, as a side effect of the LED class device
unregistering sequence.

This is inconvenient for users who always prefer turning on the
keyboard backlight. Thus, set LED_RETAIN_AT_SHUTDOWN on the LED class
device so that the state of keyboard backlight gets remembered, which
also aligns with the behavior of manufacturer utilities on Windows.

Fixes: 503325f84b ("platform/x86: ideapad-laptop: add keyboard backlight control support")
Cc: stable@vger.kernel.org
Signed-off-by: Rong Zhang <i@rong.moe>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250707163808.155876-3-i@rong.moe
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-08 13:23:29 +03:00
Rong Zhang
9533b789df
platform/x86: ideapad-laptop: Fix FnLock not remembered among boots
On devices supported by ideapad-laptop, the HW/FW can remember the
FnLock state among boots. However, since the introduction of the FnLock
LED class device, it is turned off while shutting down, as a side effect
of the LED class device unregistering sequence.

Many users always turn on FnLock because they use function keys much
more frequently than multimedia keys. The behavior change is
inconvenient for them. Thus, set LED_RETAIN_AT_SHUTDOWN on the LED class
device so that the FnLock state gets remembered, which also aligns with
the behavior of manufacturer utilities on Windows.

Fixes: 07f48f668f ("platform/x86: ideapad-laptop: add FnLock LED class device")
Cc: stable@vger.kernel.org
Signed-off-by: Rong Zhang <i@rong.moe>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250707163808.155876-2-i@rong.moe
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-08 13:23:26 +03:00
Mario Limonciello
13bc67a96e platform/x86/amd: hfi: Add debugfs support
Add a dump of the class and capabilities table to debugfs to assist
with debugging scheduler issues.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/20250609200518.3616080-13-superm1@kernel.org
2025-07-07 22:34:59 +02:00
Mario Limonciello
216fe0d768 platform/x86/amd: hfi: Set ITMT priority from ranking data
The static ranking data that is read at module load should be used
to set up the priorities for the cores relative to the performance
values.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/20250609200518.3616080-12-superm1@kernel.org
2025-07-07 22:34:17 +02:00
Perry Yuan
263e66f9c3 platform/x86: hfi: Add power management callback
Introduce power management callbacks for the `amd_hfi` driver.  Specifically,
add the `suspend` and `resume` callbacks to handle the necessary operations
during system low power states and wake-up.

Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/20250609200518.3616080-9-superm1@kernel.org
2025-07-07 22:26:37 +02:00
Perry Yuan
bb20421c05 platform/x86: hfi: Add online and offline callback support
There are some firmware parameters that need to be configured
when a CPU core is brought online or offline.

When a CPU is online, it will initialize the workload classification
parameters to CPU firmware which will trigger the workload class ID
updating function.

Once the CPU is going offline, it will need to disable the workload
classification function and clear the history.

Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/20250609200518.3616080-8-superm1@kernel.org
2025-07-07 22:24:40 +02:00
Perry Yuan
b6ffe4d9e0 platform/x86: hfi: Init per-cpu scores for each class
Initialize per CPU score `amd_hfi_ipcc_scores` which store energy score
and performance score data for each class.

Classic and dense cores are ranked according to those values as energy
efficiency capability or performance capability.  OS scheduler will pick cores
from the ranking list on each class ID for the thread which provide the class
id got from hardware feedback interface.

Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/20250609200518.3616080-7-superm1@kernel.org
2025-07-07 21:19:17 +02:00
Perry Yuan
d4e95ea7a7 platform/x86: hfi: Parse CPU core ranking data from shared memory
When `amd_hfi` driver is loaded, it will use PCCT subspace type 4 table
to retrieve the shared memory address which contains the CPU core ranking
table. This table includes a header that specifies the number of ranking
data entries to be parsed and rank each CPU core with the Performance and
Energy Efficiency capability as implemented by the CPU power management
firmware.

Once the table has been parsed, each CPU is assigned a ranking score
within its class. Subsequently, when the scheduler selects cores, it
chooses from the ranking list based on the assigned scores in each class,
thereby ensuring the optimal selection of CPU cores according to their
predefined classifications and priorities.

Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/20250609200518.3616080-6-superm1@kernel.org
2025-07-07 21:17:16 +02:00
Perry Yuan
5d902ee560 platform/x86: hfi: Introduce AMD Hardware Feedback Interface Driver
The AMD Heterogeneous core design and Hardware Feedback Interface (HFI)
provide behavioral classification and a dynamically updated ranking table
for the scheduler to use when choosing cores for tasks.

There are two CPU core types defined: Classic and Dense. Classic cores are
the standard performance cores, while Dense cores are optimized for area and
efficiency.

Heterogeneous compute refers to CPU implementations that are comprised
of more than one architectural class, each with two capabilities. This
means each CPU reports two separate capabilities: "perf" and "eff".

Each capability lists all core ranking numbers between 0 and 255, where
a higher number represents a higher capability.

Heterogeneous systems can also extend to more than two architectural
classes.

The purpose of the scheduling feedback mechanism is to provide information
to the operating system scheduler in real time, allowing the scheduler to
direct threads to the optimal core during task scheduling.

All core ranking data are provided by the PMFW via a shared memory ranking
table, which the driver reads and uses to update core capabilities to the
scheduler. When the hardware updates the table, it generates a platform
interrupt to notify the OS to read the new ranking table.

Signed-off-by: Perry Yuan <perry.yuan@amd.com>
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537
Link: https://lore.kernel.org/20250609200518.3616080-5-superm1@kernel.org
2025-07-07 19:28:19 +02:00
Stuart Hayes
56036d6af4
platform/x86: dell_rbu: Remove unused struct
Stop using an entire struct packet_data just for its embedded list_head.

Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
Link: https://lore.kernel.org/r/20250609184659.7210-4-stuart.w.hayes@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-07 16:02:59 +03:00
Shravan Kumar Ramani
0e2cebd723
platform/mellanox: mlxbf-pmc: Use kstrtobool() to check 0/1 input
For setting the enable value, the input should be 0 or 1 only. Use
kstrtobool() in place of kstrtoint() in mlxbf_pmc_enable_store() to
accept only valid input.

Fixes: 423c336185 ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3")
Signed-off-by: Shravan Kumar Ramani <shravankr@nvidia.com>
Reviewed-by: David Thompson <davthompson@nvidia.com>
Link: https://lore.kernel.org/r/2ee618c59976bcf1379d5ddce2fc60ab5014b3a9.1751380187.git.shravankr@nvidia.com
[ij: split kstrbool() change to own commit.]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-07 15:53:28 +03:00
Shravan Kumar Ramani
f8c1311769
platform/mellanox: mlxbf-pmc: Validate event/enable input
Before programming the event info, validate the event number received as input
by checking if it exists in the event_list. Also fix a typo in the comment for
mlxbf_pmc_get_event_name() to correctly mention that it returns the event name
when taking the event number as input, and not the other way round.

Fixes: 423c336185 ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3")
Signed-off-by: Shravan Kumar Ramani <shravankr@nvidia.com>
Reviewed-by: David Thompson <davthompson@nvidia.com>
Link: https://lore.kernel.org/r/2ee618c59976bcf1379d5ddce2fc60ab5014b3a9.1751380187.git.shravankr@nvidia.com
[ij: split kstrbool() change to own commit.]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-07 15:53:27 +03:00