Commit af5043c8 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'acpi-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "These are mostly docmentation fixes and janitorial changes plus some
  new device IDs and a new quirk.

  Specifics:

   - Fix documentation regarding GPIO properties (Andy Shevchenko)

   - Fix spelling mistakes in ACPI documentation (Flavio Suligoi)

   - Fix white space inconsistencies in ACPI code (Maximilian Luz)

   - Fix string formatting in the ACPI Generic Event Device (GED) driver
     (Nick Desaulniers)

   - Add Intel Alder Lake device IDs to the ACPI drivers used by the
     Dynamic Platform and Thermal Framework (Srinivas Pandruvada)

   - Add lid-related DMI quirk for Medion Akoya E2228T to the ACPI
     button driver (Hans de Goede)"

* tag 'acpi-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: DPTF: Support Alder Lake
  Documentation: ACPI: fix spelling mistakes
  ACPI: button: Add DMI quirk for Medion Akoya E2228T
  ACPI: GED: fix -Wformat
  ACPI: Fix whitespace inconsistencies
  ACPI: scan: Fix acpi_dma_configure_id() kerneldoc name
  Documentation: firmware-guide: gpio-properties: Clarify initial output state
  Documentation: firmware-guide: gpio-properties: active_low only for GpioIo()
  Documentation: firmware-guide: gpio-properties: Fix factual mistakes
parents fcfb6791 7222a8a5
...@@ -19,9 +19,9 @@ report the "current" state of the lid as either "opened" or "closed". ...@@ -19,9 +19,9 @@ report the "current" state of the lid as either "opened" or "closed".
For most platforms, both the _LID method and the lid notifications are For most platforms, both the _LID method and the lid notifications are
reliable. However, there are exceptions. In order to work with these reliable. However, there are exceptions. In order to work with these
exceptional buggy platforms, special restrictions and expections should be exceptional buggy platforms, special restrictions and exceptions should be
taken into account. This document describes the restrictions and the taken into account. This document describes the restrictions and the
expections of the Linux ACPI lid device driver. exceptions of the Linux ACPI lid device driver.
Restrictions of the returning value of the _LID control method Restrictions of the returning value of the _LID control method
...@@ -46,7 +46,7 @@ state is changed to "closed". The "closed" notification is normally used to ...@@ -46,7 +46,7 @@ state is changed to "closed". The "closed" notification is normally used to
trigger some system power saving operations on Windows. Since it is fully trigger some system power saving operations on Windows. Since it is fully
tested, it is reliable from all AML tables. tested, it is reliable from all AML tables.
Expections for the userspace users of the ACPI lid device driver Exceptions for the userspace users of the ACPI lid device driver
================================================================ ================================================================
The ACPI button driver exports the lid state to the userspace via the The ACPI button driver exports the lid state to the userspace via the
...@@ -100,7 +100,7 @@ use the following kernel parameter: ...@@ -100,7 +100,7 @@ use the following kernel parameter:
C. button.lid_init_state=ignore: C. button.lid_init_state=ignore:
When this option is specified, the ACPI button driver never reports the When this option is specified, the ACPI button driver never reports the
initial lid state and there is a compensation mechanism implemented to initial lid state and there is a compensation mechanism implemented to
ensure that the reliable "closed" notifications can always be delievered ensure that the reliable "closed" notifications can always be delivered
to the userspace by always pairing "closed" input events with complement to the userspace by always pairing "closed" input events with complement
"opened" input events. But there is still no guarantee that the "opened" "opened" input events. But there is still no guarantee that the "opened"
notifications can be delivered to the userspace when the lid is actually notifications can be delivered to the userspace when the lid is actually
......
...@@ -20,9 +20,9 @@ index, like the ASL example below shows:: ...@@ -20,9 +20,9 @@ index, like the ASL example below shows::
Name (_CRS, ResourceTemplate () Name (_CRS, ResourceTemplate ()
{ {
GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly, GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
"\\_SB.GPO0", 0, ResourceConsumer) {15} "\\_SB.GPO0", 0, ResourceConsumer) {15}
GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly, GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
"\\_SB.GPO0", 0, ResourceConsumer) {27, 31} "\\_SB.GPO0", 0, ResourceConsumer) {27, 31}
}) })
...@@ -49,15 +49,41 @@ index ...@@ -49,15 +49,41 @@ index
pin pin
Pin in the GpioIo()/GpioInt() resource. Typically this is zero. Pin in the GpioIo()/GpioInt() resource. Typically this is zero.
active_low active_low
If 1 the GPIO is marked as active_low. If 1, the GPIO is marked as active_low.
Since ACPI GpioIo() resource does not have a field saying whether it is Since ACPI GpioIo() resource does not have a field saying whether it is
active low or high, the "active_low" argument can be used here. Setting active low or high, the "active_low" argument can be used here. Setting
it to 1 marks the GPIO as active low. it to 1 marks the GPIO as active low.
Note, active_low in _DSD does not make sense for GpioInt() resource and
must be 0. GpioInt() resource has its own means of defining it.
In our Bluetooth example the "reset-gpios" refers to the second GpioIo() In our Bluetooth example the "reset-gpios" refers to the second GpioIo()
resource, second pin in that resource with the GPIO number of 31. resource, second pin in that resource with the GPIO number of 31.
The GpioIo() resource unfortunately doesn't explicitly provide an initial
state of the output pin which driver should use during its initialization.
Linux tries to use common sense here and derives the state from the bias
and polarity settings. The table below shows the expectations:
========= ============= ==============
Pull Bias Polarity Requested...
========= ============= ==============
Implicit x AS IS (assumed firmware configured for us)
Explicit x (no _DSD) as Pull Bias (Up == High, Down == Low),
assuming non-active (Polarity = !Pull Bias)
Down Low as low, assuming active
Down High as low, assuming non-active
Up Low as high, assuming non-active
Up High as high, assuming active
========= ============= ==============
That said, for our above example the both GPIOs, since the bias setting
is explicit and _DSD is present, will be treated as active with a high
polarity and Linux will configure the pins in this state until a driver
reprograms them differently.
It is possible to leave holes in the array of GPIOs. This is useful in It is possible to leave holes in the array of GPIOs. This is useful in
cases like with SPI host controllers where some chip selects may be cases like with SPI host controllers where some chip selects may be
implemented as GPIOs and some as native signals. For example a SPI host implemented as GPIOs and some as native signals. For example a SPI host
...@@ -112,8 +138,8 @@ Example:: ...@@ -112,8 +138,8 @@ Example::
Package () { Package () {
"gpio-line-names", "gpio-line-names",
Package () { Package () {
"SPI0_CS_N", "EXP2_INT", "MUX6_IO", "UART0_RXD", "MUX7_IO", "SPI0_CS_N", "EXP2_INT", "MUX6_IO", "UART0_RXD",
"LVL_C_A1", "MUX0_IO", "SPI1_MISO" "MUX7_IO", "LVL_C_A1", "MUX0_IO", "SPI1_MISO",
} }
} }
...@@ -137,7 +163,7 @@ to the GPIO lines it is going to use and provide the GPIO subsystem with a ...@@ -137,7 +163,7 @@ to the GPIO lines it is going to use and provide the GPIO subsystem with a
mapping between those names and the ACPI GPIO resources corresponding to them. mapping between those names and the ACPI GPIO resources corresponding to them.
To do that, the driver needs to define a mapping table as a NULL-terminated To do that, the driver needs to define a mapping table as a NULL-terminated
array of struct acpi_gpio_mapping objects that each contain a name, a pointer array of struct acpi_gpio_mapping objects that each contains a name, a pointer
to an array of line data (struct acpi_gpio_params) objects and the size of that to an array of line data (struct acpi_gpio_params) objects and the size of that
array. Each struct acpi_gpio_params object consists of three fields, array. Each struct acpi_gpio_params object consists of three fields,
crs_entry_index, line_index, active_low, representing the index of the target crs_entry_index, line_index, active_low, representing the index of the target
...@@ -154,13 +180,14 @@ question would look like this:: ...@@ -154,13 +180,14 @@ question would look like this::
static const struct acpi_gpio_mapping bluetooth_acpi_gpios[] = { static const struct acpi_gpio_mapping bluetooth_acpi_gpios[] = {
{ "reset-gpios", &reset_gpio, 1 }, { "reset-gpios", &reset_gpio, 1 },
{ "shutdown-gpios", &shutdown_gpio, 1 }, { "shutdown-gpios", &shutdown_gpio, 1 },
{ }, { }
}; };
Next, the mapping table needs to be passed as the second argument to Next, the mapping table needs to be passed as the second argument to
acpi_dev_add_driver_gpios() that will register it with the ACPI device object acpi_dev_add_driver_gpios() or its managed analogue that will
pointed to by its first argument. That should be done in the driver's .probe() register it with the ACPI device object pointed to by its first
routine. On removal, the driver should unregister its GPIO mapping table by argument. That should be done in the driver's .probe() routine.
On removal, the driver should unregister its GPIO mapping table by
calling acpi_dev_remove_driver_gpios() on the ACPI device object where that calling acpi_dev_remove_driver_gpios() on the ACPI device object where that
table was previously registered. table was previously registered.
...@@ -191,12 +218,12 @@ The driver might expect to get the right GPIO when it does:: ...@@ -191,12 +218,12 @@ The driver might expect to get the right GPIO when it does::
but since there is no way to know the mapping between "reset" and but since there is no way to know the mapping between "reset" and
the GpioIo() in _CRS desc will hold ERR_PTR(-ENOENT). the GpioIo() in _CRS desc will hold ERR_PTR(-ENOENT).
The driver author can solve this by passing the mapping explictly The driver author can solve this by passing the mapping explicitly
(the recommended way and documented in the above chapter). (this is the recommended way and it's documented in the above chapter).
The ACPI GPIO mapping tables should not contaminate drivers that are not The ACPI GPIO mapping tables should not contaminate drivers that are not
knowing about which exact device they are servicing on. It implies that knowing about which exact device they are servicing on. It implies that
the ACPI GPIO mapping tables are hardly linked to ACPI ID and certain the ACPI GPIO mapping tables are hardly linked to an ACPI ID and certain
objects, as listed in the above chapter, of the device in question. objects, as listed in the above chapter, of the device in question.
Getting GPIO descriptor Getting GPIO descriptor
...@@ -229,5 +256,5 @@ Case 2 explicitly tells GPIO core to look for resources in _CRS. ...@@ -229,5 +256,5 @@ Case 2 explicitly tells GPIO core to look for resources in _CRS.
Be aware that gpiod_get_index() in cases 1 and 2, assuming that there Be aware that gpiod_get_index() in cases 1 and 2, assuming that there
are two versions of ACPI device description provided and no mapping is are two versions of ACPI device description provided and no mapping is
present in the driver, will return different resources. That's why a present in the driver, will return different resources. That's why a
certain driver has to handle them carefully as explained in previous certain driver has to handle them carefully as explained in the previous
chapter. chapter.
...@@ -98,7 +98,7 @@ subject to change:: ...@@ -98,7 +98,7 @@ subject to change::
[ 0.188903] exdebug-0398 ex_trace_point : Method End [0xf58394d8:\_SB.PCI0.LPCB.ECOK] execution. [ 0.188903] exdebug-0398 ex_trace_point : Method End [0xf58394d8:\_SB.PCI0.LPCB.ECOK] execution.
Developers can utilize these special log entries to track the AML Developers can utilize these special log entries to track the AML
interpretion, thus can aid issue debugging and performance tuning. Note interpretation, thus can aid issue debugging and performance tuning. Note
that, as the "AML tracer" logs are implemented via ACPI_DEBUG_PRINT() that, as the "AML tracer" logs are implemented via ACPI_DEBUG_PRINT()
macro, CONFIG_ACPI_DEBUG is also required to be enabled for enabling macro, CONFIG_ACPI_DEBUG is also required to be enabled for enabling
"AML tracer" logs. "AML tracer" logs.
......
...@@ -578,7 +578,7 @@ acpi_video_bqc_value_to_level(struct acpi_video_device *device, ...@@ -578,7 +578,7 @@ acpi_video_bqc_value_to_level(struct acpi_video_device *device,
ACPI_VIDEO_FIRST_LEVEL - 1 - bqc_value; ACPI_VIDEO_FIRST_LEVEL - 1 - bqc_value;
level = device->brightness->levels[bqc_value + level = device->brightness->levels[bqc_value +
ACPI_VIDEO_FIRST_LEVEL]; ACPI_VIDEO_FIRST_LEVEL];
} else { } else {
level = bqc_value; level = bqc_value;
} }
...@@ -990,8 +990,8 @@ acpi_video_init_brightness(struct acpi_video_device *device) ...@@ -990,8 +990,8 @@ acpi_video_init_brightness(struct acpi_video_device *device)
goto out_free_levels; goto out_free_levels;
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"found %d brightness levels\n", "found %d brightness levels\n",
br->count - ACPI_VIDEO_FIRST_LEVEL)); br->count - ACPI_VIDEO_FIRST_LEVEL));
return 0; return 0;
out_free_levels: out_free_levels:
......
...@@ -987,7 +987,7 @@ static int acpi_battery_update(struct acpi_battery *battery, bool resume) ...@@ -987,7 +987,7 @@ static int acpi_battery_update(struct acpi_battery *battery, bool resume)
*/ */
if ((battery->state & ACPI_BATTERY_STATE_CRITICAL) || if ((battery->state & ACPI_BATTERY_STATE_CRITICAL) ||
(test_bit(ACPI_BATTERY_ALARM_PRESENT, &battery->flags) && (test_bit(ACPI_BATTERY_ALARM_PRESENT, &battery->flags) &&
(battery->capacity_now <= battery->alarm))) (battery->capacity_now <= battery->alarm)))
acpi_pm_wakeup_event(&battery->device->dev); acpi_pm_wakeup_event(&battery->device->dev);
return result; return result;
......
...@@ -89,7 +89,18 @@ static const struct dmi_system_id dmi_lid_quirks[] = { ...@@ -89,7 +89,18 @@ static const struct dmi_system_id dmi_lid_quirks[] = {
*/ */
.matches = { .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "MEDION"), DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
DMI_MATCH(DMI_PRODUCT_NAME, "E2215T MD60198"), DMI_MATCH(DMI_PRODUCT_NAME, "E2215T"),
},
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
},
{
/*
* Medion Akoya E2228T, notification of the LID device only
* happens on close, not on open and _LID always returns closed.
*/
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
DMI_MATCH(DMI_PRODUCT_NAME, "E2228T"),
}, },
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN, .driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
}, },
......
...@@ -106,6 +106,7 @@ static int pch_fivr_remove(struct platform_device *pdev) ...@@ -106,6 +106,7 @@ static int pch_fivr_remove(struct platform_device *pdev)
static const struct acpi_device_id pch_fivr_device_ids[] = { static const struct acpi_device_id pch_fivr_device_ids[] = {
{"INTC1045", 0}, {"INTC1045", 0},
{"INTC1049", 0},
{"", 0}, {"", 0},
}; };
MODULE_DEVICE_TABLE(acpi, pch_fivr_device_ids); MODULE_DEVICE_TABLE(acpi, pch_fivr_device_ids);
......
...@@ -229,6 +229,8 @@ static const struct acpi_device_id int3407_device_ids[] = { ...@@ -229,6 +229,8 @@ static const struct acpi_device_id int3407_device_ids[] = {
{"INT3532", 0}, {"INT3532", 0},
{"INTC1047", 0}, {"INTC1047", 0},
{"INTC1050", 0}, {"INTC1050", 0},
{"INTC1060", 0},
{"INTC1061", 0},
{"", 0}, {"", 0},
}; };
MODULE_DEVICE_TABLE(acpi, int3407_device_ids); MODULE_DEVICE_TABLE(acpi, int3407_device_ids);
......
...@@ -25,10 +25,16 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = { ...@@ -25,10 +25,16 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
{"INT340A"}, {"INT340A"},
{"INT340B"}, {"INT340B"},
{"INTC1040"}, {"INTC1040"},
{"INTC1041"},
{"INTC1043"}, {"INTC1043"},
{"INTC1044"}, {"INTC1044"},
{"INTC1045"}, {"INTC1045"},
{"INTC1046"},
{"INTC1047"}, {"INTC1047"},
{"INTC1048"},
{"INTC1049"},
{"INTC1060"},
{"INTC1061"},
{""}, {""},
}; };
......
...@@ -31,7 +31,7 @@ int acpi_notifier_call_chain(struct acpi_device *dev, u32 type, u32 data) ...@@ -31,7 +31,7 @@ int acpi_notifier_call_chain(struct acpi_device *dev, u32 type, u32 data)
event.type = type; event.type = type;
event.data = data; event.data = data;
return (blocking_notifier_call_chain(&acpi_chain_head, 0, (void *)&event) return (blocking_notifier_call_chain(&acpi_chain_head, 0, (void *)&event)
== NOTIFY_BAD) ? -EINVAL : 0; == NOTIFY_BAD) ? -EINVAL : 0;
} }
EXPORT_SYMBOL(acpi_notifier_call_chain); EXPORT_SYMBOL(acpi_notifier_call_chain);
......
...@@ -101,7 +101,7 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares, ...@@ -101,7 +101,7 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,
switch (gsi) { switch (gsi) {
case 0 ... 255: case 0 ... 255:
sprintf(ev_name, "_%c%02hhX", sprintf(ev_name, "_%c%02X",
trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi); trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi);
if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle))) if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))
......
...@@ -27,6 +27,7 @@ static const struct acpi_device_id fan_device_ids[] = { ...@@ -27,6 +27,7 @@ static const struct acpi_device_id fan_device_ids[] = {
{"PNP0C0B", 0}, {"PNP0C0B", 0},
{"INT3404", 0}, {"INT3404", 0},
{"INTC1044", 0}, {"INTC1044", 0},
{"INTC1048", 0},
{"", 0}, {"", 0},
}; };
MODULE_DEVICE_TABLE(acpi, fan_device_ids); MODULE_DEVICE_TABLE(acpi, fan_device_ids);
......
...@@ -134,7 +134,7 @@ int acpi_add_power_resource(acpi_handle handle); ...@@ -134,7 +134,7 @@ int acpi_add_power_resource(acpi_handle handle);
void acpi_power_add_remove_device(struct acpi_device *adev, bool add); void acpi_power_add_remove_device(struct acpi_device *adev, bool add);
int acpi_power_wakeup_list_init(struct list_head *list, int *system_level); int acpi_power_wakeup_list_init(struct list_head *list, int *system_level);
int acpi_device_sleep_wake(struct acpi_device *dev, int acpi_device_sleep_wake(struct acpi_device *dev,
int enable, int sleep_state, int dev_state); int enable, int sleep_state, int dev_state);
int acpi_power_get_inferred_state(struct acpi_device *device, int *state); int acpi_power_get_inferred_state(struct acpi_device *device, int *state);
int acpi_power_on_resources(struct acpi_device *device, int state); int acpi_power_on_resources(struct acpi_device *device, int state);
int acpi_power_transition(struct acpi_device *device, int state); int acpi_power_transition(struct acpi_device *device, int state);
......
...@@ -2175,10 +2175,10 @@ static int acpi_nfit_register_dimms(struct acpi_nfit_desc *acpi_desc) ...@@ -2175,10 +2175,10 @@ static int acpi_nfit_register_dimms(struct acpi_nfit_desc *acpi_desc)
* these commands. * these commands.
*/ */
enum nfit_aux_cmds { enum nfit_aux_cmds {
NFIT_CMD_TRANSLATE_SPA = 5, NFIT_CMD_TRANSLATE_SPA = 5,
NFIT_CMD_ARS_INJECT_SET = 7, NFIT_CMD_ARS_INJECT_SET = 7,
NFIT_CMD_ARS_INJECT_CLEAR = 8, NFIT_CMD_ARS_INJECT_CLEAR = 8,
NFIT_CMD_ARS_INJECT_GET = 9, NFIT_CMD_ARS_INJECT_GET = 9,
}; };
static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc) static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc)
...@@ -2632,7 +2632,7 @@ static int acpi_nfit_blk_region_enable(struct nvdimm_bus *nvdimm_bus, ...@@ -2632,7 +2632,7 @@ static int acpi_nfit_blk_region_enable(struct nvdimm_bus *nvdimm_bus,
nfit_blk->bdw_offset = nfit_mem->bdw->offset; nfit_blk->bdw_offset = nfit_mem->bdw->offset;
mmio = &nfit_blk->mmio[BDW]; mmio = &nfit_blk->mmio[BDW];
mmio->addr.base = devm_nvdimm_memremap(dev, nfit_mem->spa_bdw->address, mmio->addr.base = devm_nvdimm_memremap(dev, nfit_mem->spa_bdw->address,
nfit_mem->spa_bdw->length, nd_blk_memremap_flags(ndbr)); nfit_mem->spa_bdw->length, nd_blk_memremap_flags(ndbr));
if (!mmio->addr.base) { if (!mmio->addr.base) {
dev_dbg(dev, "%s failed to map bdw\n", dev_dbg(dev, "%s failed to map bdw\n",
nvdimm_name(nvdimm)); nvdimm_name(nvdimm));
......
...@@ -175,7 +175,7 @@ static int acpi_pci_irq_check_entry(acpi_handle handle, struct pci_dev *dev, ...@@ -175,7 +175,7 @@ static int acpi_pci_irq_check_entry(acpi_handle handle, struct pci_dev *dev,
* configure the IRQ assigned to this slot|dev|pin. The 'source_index' * configure the IRQ assigned to this slot|dev|pin. The 'source_index'
* indicates which resource descriptor in the resource template (of * indicates which resource descriptor in the resource template (of
* the link device) this interrupt is allocated from. * the link device) this interrupt is allocated from.
* *
* NOTE: Don't query the Link Device for IRQ information at this time * NOTE: Don't query the Link Device for IRQ information at this time
* because Link Device enumeration may not have occurred yet * because Link Device enumeration may not have occurred yet
* (e.g. exists somewhere 'below' this _PRT entry in the ACPI * (e.g. exists somewhere 'below' this _PRT entry in the ACPI
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2002 Dominik Brodowski <devel@brodo.de> * Copyright (C) 2002 Dominik Brodowski <devel@brodo.de>
* *
* TBD: * TBD:
* 1. Support more than one IRQ resource entry per link device (index). * 1. Support more than one IRQ resource entry per link device (index).
* 2. Implement start/stop mechanism and use ACPI Bus Driver facilities * 2. Implement start/stop mechanism and use ACPI Bus Driver facilities
* for IRQ management (e.g. start()->_SRS). * for IRQ management (e.g. start()->_SRS).
*/ */
...@@ -249,8 +249,8 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link) ...@@ -249,8 +249,8 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
} }
} }
/* /*
* Query and parse _CRS to get the current IRQ assignment. * Query and parse _CRS to get the current IRQ assignment.
*/ */
status = acpi_walk_resources(link->device->handle, METHOD_NAME__CRS, status = acpi_walk_resources(link->device->handle, METHOD_NAME__CRS,
...@@ -396,7 +396,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) ...@@ -396,7 +396,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
/* /*
* "acpi_irq_balance" (default in APIC mode) enables ACPI to use PIC Interrupt * "acpi_irq_balance" (default in APIC mode) enables ACPI to use PIC Interrupt
* Link Devices to move the PIRQs around to minimize sharing. * Link Devices to move the PIRQs around to minimize sharing.
* *
* "acpi_irq_nobalance" (default in PIC mode) tells ACPI not to move any PIC IRQs * "acpi_irq_nobalance" (default in PIC mode) tells ACPI not to move any PIC IRQs
* that the BIOS has already set to active. This is necessary because * that the BIOS has already set to active. This is necessary because
* ACPI has no automatic means of knowing what ISA IRQs are used. Note that * ACPI has no automatic means of knowing what ISA IRQs are used. Note that
...@@ -414,7 +414,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) ...@@ -414,7 +414,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
* *
* Note that PCI IRQ routers have a list of possible IRQs, * Note that PCI IRQ routers have a list of possible IRQs,
* which may not include the IRQs this table says are available. * which may not include the IRQs this table says are available.
* *
* Since this heuristic can't tell the difference between a link * Since this heuristic can't tell the difference between a link
* that no device will attach to, vs. a link which may be shared * that no device will attach to, vs. a link which may be shared
* by multiple active devices -- it is not optimal. * by multiple active devices -- it is not optimal.
......
...@@ -173,7 +173,7 @@ static int pci_mcfg_quirk_matches(struct mcfg_fixup *f, u16 segment, ...@@ -173,7 +173,7 @@ static int pci_mcfg_quirk_matches(struct mcfg_fixup *f, u16 segment,
{ {
if (!memcmp(f->oem_id, mcfg_oem_id, ACPI_OEM_ID_SIZE) && if (!memcmp(f->oem_id, mcfg_oem_id, ACPI_OEM_ID_SIZE) &&
!memcmp(f->oem_table_id, mcfg_oem_table_id, !memcmp(f->oem_table_id, mcfg_oem_table_id,
ACPI_OEM_TABLE_ID_SIZE) && ACPI_OEM_TABLE_ID_SIZE) &&
f->oem_revision == mcfg_oem_revision && f->oem_revision == mcfg_oem_revision &&
f->segment == segment && f->segment == segment &&
resource_contains(&f->bus_range, bus_range)) resource_contains(&f->bus_range, bus_range))
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* 1. via "Device Specific (D-State) Control" * 1. via "Device Specific (D-State) Control"
* 2. via "Power Resource Control". * 2. via "Power Resource Control".
* The code below deals with ACPI Power Resources control. * The code below deals with ACPI Power Resources control.
* *
* An ACPI "power resource object" represents a software controllable power * An ACPI "power resource object" represents a software controllable power
* plane, clock plane, or other resource depended on by a device. * plane, clock plane, or other resource depended on by a device.
* *
...@@ -645,7 +645,7 @@ int acpi_power_wakeup_list_init(struct list_head *list, int *system_level_p) ...@@ -645,7 +645,7 @@ int acpi_power_wakeup_list_init(struct list_head *list, int *system_level_p)
* -ENODEV if the execution of either _DSW or _PSW has failed * -ENODEV if the execution of either _DSW or _PSW has failed
*/ */
int acpi_device_sleep_wake(struct acpi_device *dev, int acpi_device_sleep_wake(struct acpi_device *dev,
int enable, int sleep_state, int dev_state) int enable, int sleep_state, int dev_state)
{ {
union acpi_object in_arg[3]; union acpi_object in_arg[3];
struct acpi_object_list arg_list = { 3, in_arg }; struct acpi_object_list arg_list = { 3, in_arg };
...@@ -690,7 +690,7 @@ int acpi_device_sleep_wake(struct acpi_device *dev, ...@@ -690,7 +690,7 @@ int acpi_device_sleep_wake(struct acpi_device *dev,
/* /*
* Prepare a wakeup device, two steps (Ref ACPI 2.0:P229): * Prepare a wakeup device, two steps (Ref ACPI 2.0:P229):
* 1. Power on the power resources required for the wakeup device * 1. Power on the power resources required for the wakeup device
* 2. Execute _DSW (Device Sleep Wake) or (deprecated in ACPI 3.0) _PSW (Power * 2. Execute _DSW (Device Sleep Wake) or (deprecated in ACPI 3.0) _PSW (Power
* State Wake) for the device, if present * State Wake) for the device, if present
*/ */
......
...@@ -354,7 +354,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) ...@@ -354,7 +354,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
(u32) px->control, (u32) px->status)); (u32) px->control, (u32) px->status));
/* /*
* Check that ACPI's u64 MHz will be valid as u32 KHz in cpufreq * Check that ACPI's u64 MHz will be valid as u32 KHz in cpufreq
*/ */
if (!px->core_frequency || if (!px->core_frequency ||
((u32)(px->core_frequency * 1000) != ((u32)(px->core_frequency * 1000) !=
...@@ -627,7 +627,7 @@ int acpi_processor_preregister_performance( ...@@ -627,7 +627,7 @@ int acpi_processor_preregister_performance(
goto err_ret; goto err_ret;
/* /*
* Now that we have _PSD data from all CPUs, lets setup P-state * Now that we have _PSD data from all CPUs, lets setup P-state
* domain info. * domain info.
*/ */
for_each_possible_cpu(i) { for_each_possible_cpu(i) {
...@@ -693,7 +693,7 @@ int acpi_processor_preregister_performance( ...@@ -693,7 +693,7 @@ int acpi_processor_preregister_performance(
if (match_pdomain->domain != pdomain->domain) if (match_pdomain->domain != pdomain->domain)
continue; continue;
match_pr->performance->shared_type = match_pr->performance->shared_type =
pr->performance->shared_type; pr->performance->shared_type;
cpumask_copy(match_pr->performance->shared_cpu_map, cpumask_copy(match_pr->performance->shared_cpu_map,
pr->performance->shared_cpu_map); pr->performance->shared_cpu_map);
......
...@@ -366,7 +366,7 @@ static int acpi_battery_get_state(struct acpi_battery *battery) ...@@ -366,7 +366,7 @@ static int acpi_battery_get_state(struct acpi_battery *battery)
state_readers[i].mode, state_readers[i].mode,
ACPI_SBS_BATTERY, ACPI_SBS_BATTERY,
state_readers[i].command, state_readers[i].command,
(u8 *)battery + (u8 *)battery +
state_readers[i].offset); state_readers[i].offset);
if (result) if (result)
goto end; goto end;
......
...@@ -176,7 +176,7 @@ int acpi_smbus_write(struct acpi_smb_hc *hc, u8 protocol, u8 address, ...@@ -176,7 +176,7 @@ int acpi_smbus_write(struct acpi_smb_hc *hc, u8 protocol, u8 address,
EXPORT_SYMBOL_GPL(acpi_smbus_write); EXPORT_SYMBOL_GPL(acpi_smbus_write);
int acpi_smbus_register_callback(struct acpi_smb_hc *hc, int acpi_smbus_register_callback(struct acpi_smb_hc *hc,
smbus_alarm_callback callback, void *context) smbus_alarm_callback callback, void *context)
{ {
mutex_lock(&hc->lock); mutex_lock(&hc->lock);
hc->callback = callback; hc->callback = callback;
......
...@@ -24,9 +24,9 @@ enum acpi_sbs_device_addr { ...@@ -24,9 +24,9 @@ enum acpi_sbs_device_addr {
typedef void (*smbus_alarm_callback)(void *context); typedef void (*smbus_alarm_callback)(void *context);
extern int acpi_smbus_read(struct acpi_smb_hc *hc, u8 protocol, u8 address, extern int acpi_smbus_read(struct acpi_smb_hc *hc, u8 protocol, u8 address,
u8 command, u8 * data); u8 command, u8 *data);
extern int acpi_smbus_write(struct acpi_smb_hc *hc, u8 protocol, u8 slave_address, extern int acpi_smbus_write(struct acpi_smb_hc *hc, u8 protocol, u8 slave_address,
u8 command, u8 * data, u8 length); u8 command, u8 *data, u8 length);
extern int acpi_smbus_register_callback(struct acpi_smb_hc *hc, extern int acpi_smbus_register_callback(struct acpi_smb_hc *hc,
smbus_alarm_callback callback, void *context); smbus_alarm_callback callback, void *context);
extern int acpi_smbus_unregister_callback(struct acpi_smb_hc *hc); extern int acpi_smbus_unregister_callback(struct acpi_smb_hc *hc);
...@@ -1453,7 +1453,7 @@ int acpi_dma_get_range(struct device *dev, u64 *dma_addr, u64 *offset, ...@@ -1453,7 +1453,7 @@ int acpi_dma_get_range(struct device *dev, u64 *dma_addr, u64 *offset,
} }
/** /**
* acpi_dma_configure - Set-up DMA configuration for the device. * acpi_dma_configure_id - Set-up DMA configuration for the device.
* @dev: The pointer to the device * @dev: The pointer to the device
* @attr: device dma attributes * @attr: device dma attributes
* @input_id: input device id const value pointer * @input_id: input device id const value pointer
......
...@@ -178,14 +178,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = { ...@@ -178,14 +178,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"), DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"),
}, },
}, },
{ {
.callback = video_detect_force_video, .callback = video_detect_force_video,
.ident = "ThinkPad X201T", .ident = "ThinkPad X201T",
.matches = { .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201T"), DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201T"),
}, },
}, },
/* The native backlight controls do not work on some older machines */ /* The native backlight controls do not work on some older machines */
{ {
......
...@@ -44,7 +44,7 @@ void acpi_enable_wakeup_devices(u8 sleep_state) ...@@ -44,7 +44,7 @@ void acpi_enable_wakeup_devices(u8 sleep_state)
if (!dev->wakeup.flags.valid if (!dev->wakeup.flags.valid
|| sleep_state > (u32) dev->wakeup.sleep_state || sleep_state > (u32) dev->wakeup.sleep_state
|| !(device_may_wakeup(&dev->dev) || !(device_may_wakeup(&dev->dev)
|| dev->wakeup.prepare_count)) || dev->wakeup.prepare_count))
continue; continue;
if (device_may_wakeup(&dev->dev)) if (device_may_wakeup(&dev->dev))
...@@ -69,7 +69,7 @@ void acpi_disable_wakeup_devices(u8 sleep_state) ...@@ -69,7 +69,7 @@ void acpi_disable_wakeup_devices(u8 sleep_state)
if (!dev->wakeup.flags.valid if (!dev->wakeup.flags.valid
|| sleep_state > (u32) dev->wakeup.sleep_state || sleep_state > (u32) dev->wakeup.sleep_state
|| !(device_may_wakeup(&dev->dev) || !(device_may_wakeup(&dev->dev)
|| dev->wakeup.prepare_count)) || dev->wakeup.prepare_count))
continue; continue;
acpi_set_gpe_wake_mask(dev->wakeup.gpe_device, dev->wakeup.gpe_number, acpi_set_gpe_wake_mask(dev->wakeup.gpe_device, dev->wakeup.gpe_number,
......
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