History log of /linux-master/drivers/platform/x86/intel/int1092/intel_sar.c
Revision Date Author Comments
# e709455e 02-Mar-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

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>


# 92e35247 19-Jan-2023 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

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>


# 85303db3 06-Oct-2021 Shravan S <s.shravan@intel.com>

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>


# 7df22784 06-Oct-2021 Shravan S <s.shravan@intel.com>

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>


# dcfbd31e 23-Jul-2021 Shravan S <s.shravan@intel.com>

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>