Commit 0b3e7973 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branches 'acpi-misc' and 'acpi-doc'

* acpi-misc:
  ACPI: thermal: Remove redundant acpi_has_method() calls
  ACPI: SBS: remove unused const variable 'SMBUS_PEC'

* acpi-doc:
  Documentation: ACPI: DSD: Convert LED documentation to ReST
.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>
========================================
Describing and referring to LEDs in ACPI Describing and referring to LEDs in ACPI
========================================
Individual LEDs are described by hierarchical data extension [6] nodes under the Individual LEDs are described by hierarchical data extension [6] nodes under the
device node, the LED driver chip. The "reg" property in the LED specific nodes device node, the LED driver chip. The "reg" property in the LED specific nodes
...@@ -25,8 +30,12 @@ entry shall contain the string "led@" followed by the number of the LED, ...@@ -25,8 +30,12 @@ entry shall contain the string "led@" followed by the number of the LED,
followed by the referred object name. That object shall be named "LED" followed followed by the referred object name. That object shall be named "LED" followed
by the number of the LED. by the number of the LED.
An ASL example of a camera sensor device and a LED driver device for two LEDs. Example
Objects not relevant for LEDs or the references to them have been omitted. =======
An ASL example of a camera sensor device and a LED driver device for two LEDs is
show below. Objects not relevant for LEDs or the references to them have been
omitted. ::
Device (LED) Device (LED)
{ {
...@@ -71,12 +80,15 @@ Objects not relevant for LEDs or the references to them have been omitted. ...@@ -71,12 +80,15 @@ Objects not relevant for LEDs or the references to them have been omitted.
} }
where where
::
LED LED driver device LED LED driver device
LED0 First LED LED0 First LED
LED1 Second LED LED1 Second LED
SEN Camera sensor device (or another device the LED is SEN Camera sensor device (or another device the LED is related to)
related to)
References
==========
[1] Device tree. <URL:http://www.devicetree.org>, referenced 2019-02-21. [1] Device tree. <URL:http://www.devicetree.org>, referenced 2019-02-21.
......
...@@ -10,6 +10,7 @@ ACPI Support ...@@ -10,6 +10,7 @@ ACPI Support
namespace namespace
dsd/graph dsd/graph
dsd/data-node-references dsd/data-node-references
dsd/leds
enumeration enumeration
osi osi
method-customizing method-customizing
......
...@@ -15,8 +15,6 @@ enum acpi_smb_protocol { ...@@ -15,8 +15,6 @@ enum acpi_smb_protocol {
SMBUS_BLOCK_PROCESS_CALL = 0xd, SMBUS_BLOCK_PROCESS_CALL = 0xd,
}; };
static const u8 SMBUS_PEC = 0x80;
enum acpi_sbs_device_addr { enum acpi_sbs_device_addr {
ACPI_SBS_CHARGER = 0x9, ACPI_SBS_CHARGER = 0x9,
ACPI_SBS_MANAGER = 0xa, ACPI_SBS_MANAGER = 0xa,
......
...@@ -225,13 +225,9 @@ static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode) ...@@ -225,13 +225,9 @@ static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode)
if (!tz) if (!tz)
return -EINVAL; return -EINVAL;
if (!acpi_has_method(tz->device->handle, "_SCP")) { if (ACPI_FAILURE(acpi_execute_simple_method(tz->device->handle,
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "_SCP not present\n")); "_SCP", mode)))
return -ENODEV; return -ENODEV;
} else if (ACPI_FAILURE(acpi_execute_simple_method(tz->device->handle,
"_SCP", mode))) {
return -ENODEV;
}
return 0; return 0;
} }
...@@ -463,8 +459,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) ...@@ -463,8 +459,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
break; break;
} }
if ((flag & ACPI_TRIPS_DEVICES) if (flag & ACPI_TRIPS_DEVICES) {
&& acpi_has_method(tz->device->handle, "_TZD")) {
memset(&devices, 0, sizeof(devices)); memset(&devices, 0, sizeof(devices));
status = acpi_evaluate_reference(tz->device->handle, "_TZD", status = acpi_evaluate_reference(tz->device->handle, "_TZD",
NULL, &devices); NULL, &devices);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment