drivers/intel/mipi_camera: Only generate ADR if no HID supplied

It's an ACPI spec violation for a device to have both an _ADR and
a _HID method, so prefer the latter if a HID value is specified
via the chip registers.

Change-Id: I5d84dbea52595e61df56a5ff779d5e0ee0d84bdf
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87248
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Matt DeVillier 2025-04-06 15:59:15 -05:00
commit d04d7d80b0

View file

@ -844,14 +844,13 @@ static void write_i2c_camera_device(const struct device *dev, const char *scope)
acpigen_pop_len(); /* Power Resource */
}
if (config->device_type == INTEL_ACPI_CAMERA_SENSOR)
acpigen_write_name_integer("_ADR", 0);
if (config->acpi_hid)
acpigen_write_name_string("_HID", config->acpi_hid);
else if (config->device_type == INTEL_ACPI_CAMERA_VCM ||
config->device_type == INTEL_ACPI_CAMERA_NVM)
acpigen_write_name_string("_HID", ACPI_DT_NAMESPACE_HID);
else if (config->device_type == INTEL_ACPI_CAMERA_SENSOR)
acpigen_write_name_integer("_ADR", 0);
acpigen_write_name_integer("_UID", config->acpi_uid);
acpigen_write_name_string("_DDN", config->chip_name);