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

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
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>

========================================
Describing and referring to LEDs in ACPI
========================================

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
@@ -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
by the number of the LED.

An ASL example of a camera sensor device and a LED driver device for two LEDs.
Objects not relevant for LEDs or the references to them have been omitted.
Example
=======

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)
	{
@@ -71,12 +80,15 @@ Objects not relevant for LEDs or the references to them have been omitted.
	}

where
::

	LED	LED driver device
	LED0	First LED
	LED1	Second LED
	SEN	Camera sensor device (or another device the LED is
		related to)
	SEN	Camera sensor device (or another device the LED is related to)

References
==========

[1] Device tree. <URL:http://www.devicetree.org>, referenced 2019-02-21.

+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ ACPI Support
   namespace
   dsd/graph
   dsd/data-node-references
   dsd/leds
   enumeration
   osi
   method-customizing
+0 −2
Original line number Diff line number Diff line
@@ -15,8 +15,6 @@ enum acpi_smb_protocol {
	SMBUS_BLOCK_PROCESS_CALL = 0xd,
};

static const u8 SMBUS_PEC = 0x80;

enum acpi_sbs_device_addr {
	ACPI_SBS_CHARGER = 0x9,
	ACPI_SBS_MANAGER = 0xa,
+3 −8
Original line number Diff line number Diff line
@@ -225,13 +225,9 @@ static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode)
	if (!tz)
		return -EINVAL;

	if (!acpi_has_method(tz->device->handle, "_SCP")) {
		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "_SCP not present\n"));
	if (ACPI_FAILURE(acpi_execute_simple_method(tz->device->handle,
						    "_SCP", mode)))
		return -ENODEV;
	} else if (ACPI_FAILURE(acpi_execute_simple_method(tz->device->handle,
							   "_SCP", mode))) {
		return -ENODEV;
	}

	return 0;
}
@@ -463,8 +459,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
			break;
	}

	if ((flag & ACPI_TRIPS_DEVICES)
	    && acpi_has_method(tz->device->handle, "_TZD")) {
	if (flag & ACPI_TRIPS_DEVICES) {
		memset(&devices, 0, sizeof(devices));
		status = acpi_evaluate_reference(tz->device->handle, "_TZD",
						NULL, &devices);