linux/drivers/acpi
Mika Westerberg b60e4ea4a4 ACPI / property: Allow holes in reference properties
DT allows holes or empty phandles for references. This is used for example
in SPI subsystem where some chip selects are native and others are regular
GPIOs. In ACPI _DSD we currently do not support this but instead the
preceding reference consumes all following integer arguments.

For example we would like to support something like the below ASL fragment
for SPI:

  Package () {
      "cs-gpios",
      Package () {
          ^GPIO, 19, 0, 0, // GPIO CS0
          0,               // Native CS
          ^GPIO, 20, 0, 0, // GPIO CS1
      }
  }

The zero in the middle means "no entry" or NULL reference. To support this
we change acpi_data_get_property_reference() to take firmware node and
num_args as argument and rename it to __acpi_node_get_property_reference().
The function returns -ENOENT if the given index resolves to "no entry"
reference and -ENODATA when there are no more entries in the property.

We then add static inline wrapper acpi_node_get_property_reference() that
passes MAX_ACPI_REFERENCE_ARGS as num_args to support the existing
behaviour which some drivers have been relying on.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-10-11 22:44:00 +02:00
..
acpica Revert "ACPICA: Namespace: Fix deadlock triggered by MLC support in dynamic table loading" 2016-07-11 16:18:18 +02:00
apei pstore subsystem updates for v4.8 2016-07-26 18:48:23 -07:00
dptf ACPI / DPTF: move int340x_thermal.c to the DPTF folder 2016-07-21 13:42:46 +02:00
nfit libnvdimm, nd_blk: mask off reserved status bits 2016-08-08 09:26:13 -07:00
pmic ACPI / PMIC: remove modular references from non-modular code 2016-07-16 03:03:14 +02:00
ac.c
acpi_amba.c ACPI / amba: Remove CLK_IS_ROOT 2016-04-27 23:42:57 +02:00
acpi_apd.c ACPI / APD: Provide build-in properties of the UART 2016-08-31 01:18:56 +02:00
acpi_cmos_rtc.c char/genrtc: x86: remove remnants of asm/rtc.h 2016-06-04 00:20:07 +02:00
acpi_configfs.c ACPI: Rename configfs.c to acpi_configfs.c to prevent link error 2016-07-11 15:13:36 +02:00
acpi_dbg.c ACPI / debugger: Fix regression introduced by IS_ERR_VALUE() removal 2016-07-05 23:02:34 +02:00
acpi_extlog.c
acpi_ipmi.c
acpi_lpat.c ACPI / lpat: make it explicitly non-modular 2016-07-16 03:08:10 +02:00
acpi_lpss.c ACPI / LPSS: Provide build-in properties of the UART 2016-08-31 01:18:57 +02:00
acpi_memhotplug.c
acpi_pad.c
acpi_platform.c Power management and ACPI material for v4.6-rc1, part 1 2016-03-16 14:10:53 -07:00
acpi_pnp.c ACPI / PNP: constify device IDs 2016-01-04 22:10:30 +01:00
acpi_processor.c ACPI / processor: Avoid reserving IO regions too early 2016-06-02 01:57:50 +02:00
acpi_video.c ACPI / video: skip evaluating _DOD when it does not exist 2016-06-22 02:00:04 +02:00
battery.c ACPI / battery: Correctly serialise with the pending async probe 2016-05-21 01:25:07 +02:00
battery.h
bgrt.c drivers/acpi: make bgrt driver explicitly non-modular 2016-03-09 23:46:07 +01:00
blacklist.c ACPI / osi: Collect _OSI handling into one single file 2016-05-05 00:13:53 +02:00
bus.c Merge branches 'acpi-processor', 'acpi-cppc', 'acpi-apei' and 'acpi-sleep' 2016-07-25 13:42:25 +02:00
button.c ACPI / button: remove pointer to old lid_sysfs on unbind 2016-08-03 01:27:20 +02:00
cm_sbs.c
container.c
cppc_acpi.c ACPI / CPPC: Prevent cpc_desc_ptr points to the invalid data 2016-06-25 02:53:31 +02:00
custom_method.c
debugfs.c
device_pm.c ACPI / PM: Export acpi_device_fix_up_power() 2016-05-20 15:54:01 +02:00
device_sysfs.c ACPI / device_sysfs: Clean up checkpatch errors 2016-05-04 23:47:32 +02:00
dock.c ACPI / dock: make dock explicitly non-modular 2016-07-16 03:08:08 +02:00
ec_sys.c ACPI / EC: Deny write access unless requested by module param 2016-03-09 23:26:15 +01:00
ec.c Merge branches 'acpi-ec' and 'acpi-button' 2016-08-05 16:04:49 +02:00
event.c
evged.c ACPI / GED: make evged.c explicitly non-modular 2016-05-09 22:59:25 +02:00
fan.c ACPI / fan: Make struct dev_pm_ops const 2016-03-09 23:23:21 +01:00
glue.c
gsi.c
hed.c
internal.h ACPI: add support for ACPI reconfiguration notifiers 2016-07-08 21:52:35 +02:00
ioapic.c
Kconfig PCI changes for the v4.8 merge window: 2016-08-02 17:12:29 -04:00
Makefile PCI changes for the v4.8 merge window: 2016-08-02 17:12:29 -04:00
numa.c ACPI / NUMA: Enable ACPI based NUMA on ARM64 2016-06-22 01:36:59 +02:00
nvs.c
osi.c ACPI / osi: Collect _OSI handling into one single file 2016-05-05 00:13:53 +02:00
osl.c treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00
pci_irq.c x86/ACPI/PCI: Recognize that Interrupt Line 255 means "not connected" 2016-03-09 01:23:35 +01:00
pci_link.c ACPI,PCI,IRQ: separate ISA penalty calculation 2016-07-02 01:38:34 +02:00
pci_mcfg.c PCI/ACPI: Add generic MCFG table handling 2016-06-10 18:27:59 -05:00
pci_root.c PCI/ACPI: Support I/O resources when parsing host bridge resources 2016-06-10 16:00:48 -05:00
pci_slot.c ACPI / PCI: make pci_slot explicitly non-modular 2016-07-16 03:05:29 +02:00
power.c
proc.c
processor_core.c ACPI / processor: Add acpi_map_madt_entry() 2016-05-30 14:27:09 +02:00
processor_driver.c Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-07-29 13:55:30 -07:00
processor_idle.c ACPI / processor_idle: Add support for Low Power Idle(LPI) states 2016-07-21 23:25:58 +02:00
processor_pdc.c
processor_perflib.c
processor_thermal.c
processor_throttling.c ACPI / processor: Avoid reserving IO regions too early 2016-06-02 01:57:50 +02:00
property.c ACPI / property: Allow holes in reference properties 2016-10-11 22:44:00 +02:00
reboot.c
resource.c PCI: ACPI: IA64: fix IO port generic range check 2016-03-22 23:07:49 +01:00
sbs.c ACPI / SBS: fix inconsistent indenting inside if statement 2016-01-04 22:14:27 +01:00
sbshc.c
sbshc.h
scan.c xen: features and fixes for 4.8-rc0 2016-07-27 11:35:37 -07:00
sleep.c ACPI: Execute _PTS before system reboot 2016-06-29 23:44:02 +02:00
sleep.h ACPICA: Drop Linux-specific waking vector functions 2016-01-04 22:05:20 +01:00
sysfs.c ACPI: add support for ACPI reconfiguration notifiers 2016-07-08 21:52:35 +02:00
tables.c ACPI / tables: move arch-specific symbol to asm/acpi.h 2016-06-22 01:16:14 +02:00
thermal.c ACPI / thermal: Remove create_workqueue() 2016-06-22 02:12:56 +02:00
utils.c nfit: make DIMM DSMs optional 2016-07-19 12:32:39 -07:00
video_detect.c ACPI / video: Thinkpad X201 Tablet needs video_detect_force_video 2016-06-22 01:59:03 +02:00
wakeup.c