linux/include/acpi
Hans de Goede 8661423eea ACPI / utils: Add new acpi_dev_present helper
acpi_dev_found just iterates over all ACPI-ids and sees if one matches.
This means that it will return true for devices which are in the DSDT
but disabled (their _STA method returns 0).

For some drivers it is useful to be able to check if a certain HID
is not only present in the namespace, but also actually present as in
acpi_device_is_present() will return true for the device. For example
because if a certain device is present then the driver will want to use
an extcon or IIO ADC channel provided by that device.

This commit adds a new acpi_dev_present helper which drivers can use
to this end.

Like acpi_dev_found, acpi_dev_present take a HID as argument, but
it also has 2 extra optional arguments to only check for an ACPI
device with a specific UID and/or HRV value. This makes it more
generic and allows it to replace custom code doing similar checks
in several places.

Arguably acpi_dev_present is what acpi_dev_found should have been, but
there are too many users to just change acpi_dev_found without the risk
of breaking something.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-04-19 22:53:34 +02:00
..
platform ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acbuffer.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acconfig.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acexcep.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acnames.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acoutput.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acpi_bus.h ACPI / utils: Add new acpi_dev_present helper 2017-04-19 22:53:34 +02:00
acpi_drivers.h Revert "ACPI, PCI, IRQ: remove redundant code in acpi_irq_penalty_init()" 2016-07-02 01:38:34 +02:00
acpi_io.h ACPI / osl: Remove deprecated acpi_get_table_with_size()/early_acpi_os_unmap_memory() 2016-12-21 02:36:38 +01:00
acpi_lpat.h ACPI / LPAT: Common table processing functions 2015-01-29 21:02:10 +08:00
acpi_numa.h ACPI / NUMA: move bad_srat() and srat_disabled() to drivers/acpi/numa.c 2016-05-30 14:27:08 +02:00
acpi.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acpiosxf.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acpixf.h ACPICA: Update version to 20170119 2017-02-09 14:48:49 +01:00
acrestyp.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
actbl1.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
actbl2.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
actbl3.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
actbl.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
actypes.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acuuid.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
apei.h acpi, apei, ghes: Factor out ioremap virtual memory for IRQ and NMI context. 2014-07-22 15:05:06 -07:00
button.h ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED() 2015-09-15 03:05:45 +02:00
cppc_acpi.h ACPI / CPPC: Add prefix cppc to cpudata structure name 2016-09-08 23:02:15 +02:00
ghes.h ACPICA: Restore error table definitions to reduce code differences between Linux and ACPICA upstream. 2014-06-16 22:33:50 +02:00
hed.h ACPI Hardware Error Device (PNP0C33) support 2010-05-19 22:40:24 -04:00
pcc.h mailbox: PCC: Fix return value of pcc_mbox_request_channel() 2016-10-17 14:26:49 +02:00
pdc_intel.h ACPI: Enable bit 11 in _PDC to advertise hw coord 2009-02-07 00:41:14 -05:00
processor.h ACPI / processor: Make acpi_processor_ppc_has_changed() void 2016-11-21 14:35:42 +01:00
reboot.h Add the ability to reset the machine using the RESET_REG in ACPI's FADT table. 2008-07-16 23:27:08 +02:00
video.h ACPI / video: Move ACPI_VIDEO_NOTIFY_* defines to acpi/video.h 2016-11-16 23:07:43 +01:00