Skip to content

Commit a78dfdb

Browse files
committed
Merge branches 'acpi-debug' and 'acpi-docs'
Merge an update related to ACPI debugging and ACPI documentation updates for 6.17-rc1: - Enable CONFIG_ACPI_DEBUG by default to make it easier to get ACPI debug messages from OEM platforms (Mario Limonciello) - Fix parent device references in ASL examples in the ACPI documentation and fix spelling and style in the gpio-properties documentation in firmware-guide (Andy Shevchenko) * acpi-debug: ACPI: Enable CONFIG_ACPI_DEBUG by default * acpi-docs: Documentation: ACPI: Fix parent device references Documentation: firmware-guide: gpio-properties: Spelling and style fixes
3 parents c58364a + 814eca1 + e65cb01 commit a78dfdb

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

Documentation/firmware-guide/acpi/gpio-properties.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ _DSD Device Properties Related to GPIO
66

77
With the release of ACPI 5.1, the _DSD configuration object finally
88
allows names to be given to GPIOs (and other things as well) returned
9-
by _CRS. Previously, we were only able to use an integer index to find
9+
by _CRS. Previously we were only able to use an integer index to find
1010
the corresponding GPIO, which is pretty error prone (it depends on
1111
the _CRS output ordering, for example).
1212

@@ -49,11 +49,11 @@ index
4949
pin
5050
Pin in the GpioIo()/GpioInt() resource. Typically this is zero.
5151
active_low
52-
If 1, the GPIO is marked as active_low.
52+
If 1, the GPIO is marked as active-low.
5353

5454
Since ACPI GpioIo() resource does not have a field saying whether it is
55-
active low or high, the "active_low" argument can be used here. Setting
56-
it to 1 marks the GPIO as active low.
55+
active-low or active-high, the "active_low" argument can be used here.
56+
Setting it to 1 marks the GPIO as active-low.
5757

5858
Note, active_low in _DSD does not make sense for GpioInt() resource and
5959
must be 0. GpioInt() resource has its own means of defining it.
@@ -231,8 +231,8 @@ In those cases ACPI device identification objects, _HID, _CID, _CLS, _SUB, _HRV,
231231
available to the driver can be used to identify the device and that is supposed
232232
to be sufficient to determine the meaning and purpose of all of the GPIO lines
233233
listed by the GpioIo()/GpioInt() resources returned by _CRS. In other words,
234-
the driver is supposed to know what to use the GpioIo()/GpioInt() resources for
235-
once it has identified the device. Having done that, it can simply assign names
234+
the driver is supposed to know what to use from the GpioIo()/GpioInt() resources
235+
for once it has identified the device. Having done that, it can simply assign names
236236
to the GPIO lines it is going to use and provide the GPIO subsystem with a
237237
mapping between those names and the ACPI GPIO resources corresponding to them.
238238

@@ -252,9 +252,9 @@ question would look like this::
252252
static const struct acpi_gpio_params shutdown_gpio = { 0, 0, false };
253253

254254
static const struct acpi_gpio_mapping bluetooth_acpi_gpios[] = {
255-
{ "reset-gpios", &reset_gpio, 1 },
256-
{ "shutdown-gpios", &shutdown_gpio, 1 },
257-
{ }
255+
{ "reset-gpios", &reset_gpio, 1 },
256+
{ "shutdown-gpios", &shutdown_gpio, 1 },
257+
{ }
258258
};
259259

260260
Next, the mapping table needs to be passed as the second argument to
@@ -270,7 +270,7 @@ Using the _CRS fallback
270270

271271
If a device does not have _DSD or the driver does not create ACPI GPIO
272272
mapping, the Linux GPIO framework refuses to return any GPIOs. This is
273-
because the driver does not know what it actually gets. For example if we
273+
because the driver does not know what it actually gets. For example, if we
274274
have a device like below::
275275

276276
Device (BTH)
@@ -292,7 +292,7 @@ The driver might expect to get the right GPIO when it does::
292292
...error handling...
293293

294294
but since there is no way to know the mapping between "reset" and
295-
the GpioIo() in _CRS desc will hold ERR_PTR(-ENOENT).
295+
the GpioIo() in _CRS the desc will hold ERR_PTR(-ENOENT).
296296

297297
The driver author can solve this by passing the mapping explicitly
298298
(this is the recommended way and it's documented in the above chapter).
@@ -318,15 +318,15 @@ Case 1::
318318
desc = gpiod_get(dev, "non-null-connection-id", flags);
319319
desc = gpiod_get_index(dev, "non-null-connection-id", index, flags);
320320

321+
Case 1 assumes that corresponding ACPI device description must have
322+
defined device properties and will prevent from getting any GPIO resources
323+
otherwise.
324+
321325
Case 2::
322326

323327
desc = gpiod_get(dev, NULL, flags);
324328
desc = gpiod_get_index(dev, NULL, index, flags);
325329

326-
Case 1 assumes that corresponding ACPI device description must have
327-
defined device properties and will prevent to getting any GPIO resources
328-
otherwise.
329-
330330
Case 2 explicitly tells GPIO core to look for resources in _CRS.
331331

332332
Be aware that gpiod_get_index() in cases 1 and 2, assuming that there

Documentation/firmware-guide/acpi/i2c-muxes.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Consider this topology::
1414
| | | 0x70 |--CH01--> i2c client B (0x50)
1515
+------+ +------+
1616

17-
which corresponds to the following ASL::
17+
which corresponds to the following ASL (in the scope of \_SB)::
1818

1919
Device (SMB1)
2020
{
@@ -24,7 +24,7 @@ which corresponds to the following ASL::
2424
Name (_HID, ...)
2525
Name (_CRS, ResourceTemplate () {
2626
I2cSerialBus (0x70, ControllerInitiated, I2C_SPEED,
27-
AddressingMode7Bit, "^SMB1", 0x00,
27+
AddressingMode7Bit, "\\_SB.SMB1", 0x00,
2828
ResourceConsumer,,)
2929
}
3030

@@ -37,7 +37,7 @@ which corresponds to the following ASL::
3737
Name (_HID, ...)
3838
Name (_CRS, ResourceTemplate () {
3939
I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
40-
AddressingMode7Bit, "^CH00", 0x00,
40+
AddressingMode7Bit, "\\_SB.SMB1.CH00", 0x00,
4141
ResourceConsumer,,)
4242
}
4343
}
@@ -52,7 +52,7 @@ which corresponds to the following ASL::
5252
Name (_HID, ...)
5353
Name (_CRS, ResourceTemplate () {
5454
I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
55-
AddressingMode7Bit, "^CH01", 0x00,
55+
AddressingMode7Bit, "\\_SB.SMB1.CH01", 0x00,
5656
ResourceConsumer,,)
5757
}
5858
}

drivers/acpi/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ config ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD
394394

395395
config ACPI_DEBUG
396396
bool "Debug Statements"
397+
default y
397398
help
398399
The ACPI subsystem can produce debug output. Saying Y enables this
399400
output and increases the kernel size by around 50K.

0 commit comments

Comments
 (0)