Commit Graph

4 Commits

Author SHA1 Message Date
Jose Ignacio Tornos Martinez 2a2f24b187 platform/x86: intel: int1092: intel_sar: Convert to platform remove callback returning void
Bugzilla: https://bugzilla.redhat.com/2123542

commit e709455e9736b1cf15d2c6914e26d34d4ebbdcf3
Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date:   Thu Mar 2 15:47:23 2023 +0100

    platform/x86: intel: int1092: intel_sar: Convert to platform remove callback returning void
    
    The .remove() callback for a platform driver returns an int which makes
    many driver authors wrongly assume it's possible to do error handling by
    returning an error code. However the value returned is (mostly) ignored
    and this typically results in resource leaks. To improve here there is a
    quest to make the remove callback return void. In the first step of this
    quest all drivers are converted to .remove_new() which already returns
    void.
    
    Trivially convert this driver from always returning zero in the remove
    callback to the void returning variant.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Link: https://lore.kernel.org/r/20230302144732.1903781-21-u.kleine-koenig@pengutronix.de
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-07-10 17:56:12 +02:00
Jose Ignacio Tornos Martinez 1e9ec674c9 platform/x86: int1092: Switch to use acpi_evaluate_dsm_typed()
Bugzilla: https://bugzilla.redhat.com/2123542

commit 92e3524754dc1eb1e690cd109110929e54c76993
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date:   Thu Jan 19 20:09:04 2023 +0200

    platform/x86: int1092: Switch to use acpi_evaluate_dsm_typed()
    
    The acpi_evaluate_dsm_typed() provides a way to check the type of the
    object evaluated by _DSM call. Use it instead of open coded variant.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Link: https://lore.kernel.org/r/20230119180904.78446-1-andriy.shevchenko@linux.intel.com
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-07-10 17:56:12 +02:00
Jose Ignacio Tornos Martinez a835dd5876 platform/x86: int1092: Fix non sequential device mode handling
Bugzilla: https://bugzilla.redhat.com/2123542

commit 7df227847ab562c42d318bceccebb0c911c87b04
Author: Shravan S <s.shravan@intel.com>
Date:   Wed Oct 6 13:05:25 2021 +0530

    platform/x86: int1092: Fix non sequential device mode handling
    
    SAR information from BIOS may come in non sequential pattern.
    
    To overcome the issue, a check is made to extract the right SAR
    information using the device mode which is currently being used.
    
    Remove .owner field if calls are used which set it automatically.
    Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
    
    Signed-off-by: Shravan S <s.shravan@intel.com>
    Link: https://lore.kernel.org/r/20211006073525.1332925-1-s.shravan@intel.com
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-07-10 17:56:02 +02:00
Jose Ignacio Tornos Martinez 50aea2265f platform/x86: BIOS SAR driver for Intel M.2 Modem
Bugzilla: https://bugzilla.redhat.com/2123542

Conflicts:
    - drivers/platform/x86/intel/Kconfig
    - drivers/platform/x86/intel/Makefile
      context diff because 67896ef13c4db was already applied

commit dcfbd31ef4bcf6ceb373911faa4a5299e0547702
Author: Shravan S <s.shravan@intel.com>
Date:   Sat Jul 24 02:44:52 2021 +0530

    platform/x86: BIOS SAR driver for Intel M.2 Modem
    
    Dynamic BIOS SAR driver exposing dynamic SAR information from BIOS
    
    The Dynamic SAR (Specific Absorption Rate) driver uses ACPI DSM
    (Device Specific Method) to communicate with BIOS and retrieve
    dynamic SAR information and change notifications. The driver uses
    sysfs to expose this data to userspace via read and notify.
    
    Sysfs interface is documented in detail under:
    Documentation/ABI/testing/sysfs-driver-intc_sar
    
    Signed-off-by: Shravan S <s.shravan@intel.com>
    Link: https://lore.kernel.org/r/20210723211452.27995-2-s.shravan@intel.com
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-07-10 17:56:00 +02:00