On Wed, 2017-03-29 at 12:26 +0300, Mika Westerberg wrote: > On Tue, Mar 28, 2017 at 11:42:29PM +0200, Rafael J. Wysocki wrote: > > On Thursday, March 16, 2017 05:17:35 PM Hans de Goede wrote: > > > 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. > > > > > > 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@xxxxxxxxxx> > > > > Andy, Mika, any concerns about this patch, please? > > No concerns from my side. > > Reviewed-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> Neither from me. I briefly looked in the code and indeed we have no existing helper as a such, so, if you think this is the best way to go, I would agree. -- Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Intel Finland Oy -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html