summaryrefslogtreecommitdiff
path: root/drivers/acpi/mipi-disco-img.c
AgeCommit message (Collapse)AuthorFilesLines
2024-02-26ACPI: property: Polish ignoring bad data nodesSakari Ailus1-4/+4
Clean up ignoring data nodes in mipi-disco-img.c: use { } initialiser, fix a kernel-doc warning and use isdigit(). Fixes: 5bd4edbbf920 ("ACPI: property: Ignore bad graph port nodes on Dell XPS 9315") Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-02-15ACPI: property: Ignore bad graph port nodes on Dell XPS 9315Sakari Ailus1-0/+71
Some systems were shipped with both Windows and Linux camera descriptions. In general, if Linux description exist, they will be used and Windows description ignored. In this case the Linux descriptions were buggy so use Windows definition instead. This patch ignores the bad graph port nodes on Dell XPS 9315 and there are likely other such systems, too. The corresponding information has been added to ipu-bridge to cover the missing bits. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2023-11-21ACPI: scan: Fix an error message in DisCo for Imaging supportSakari Ailus1-1/+1
The recently merged DisCo for Imaging support used a wrong printk specifier in printing a message. Fix it by using %zu instead of %lu. Also use "bits" instead of "bytes" as these are indeed bytes. Fixes: a6cb0a611273 ("ACPI: scan: Extract MIPI DisCo for Imaging data into swnodes") Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2023-11-20ACPI: property: Replicate DT-aligned u32 properties from DisCo for ImagingSakari Ailus1-0/+17
MIPI DisCo for Imaging defines properties for camera sensors that functionally align with DT equivalents. Replicate these properties in the ACPI device swnodes so the code using the corresponding DT properties already does not need to be updated to deal with their MIPI counterparts directly. The replicated properties are: "mipi-img-clock-frequency" -> "clock-frequency" "mipi-img-led-max-current" -> "led-max-microamp" "mipi-img-flash-max-current" -> "flash-max-microamp" "mipi-img-flash-max-timeout" -> "flash-max-timeout-us" Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> [ rjw: Changelog edits, removal of redundant braces ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2023-11-20ACPI: property: Dig "rotation" property for devices with CSI2 _CRSSakari Ailus1-0/+17
Find the "rotation" property value for devices with _CRS CSI-2 resource descriptors and use it to add the "rotation" property to the software nodes representing the CSI-2 connection graph. That value typically comes from the _PLD (Physical Location of Device) object if it is present for the given device. This way, camera sensor drivers that know the "rotation" property do not need to care about _PLD on systems using ACPI. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> [ rjw: Changelog edits, file rename ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2023-11-20ACPI: scan: Extract MIPI DisCo for Imaging data into swnodesRafael J. Wysocki1-2/+250
Add information extracted from the MIPI DisCo for Imaging device properties to software nodes created during the CSI-2 connection graph discovery. Link: https://www.mipi.org/specifications/mipi-disco-imaging Co-developed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2023-11-20ACPI: scan: Extract _CRS CSI-2 connection information into swnodesRafael J. Wysocki1-1/+152
Use the connection information extracted from the _CRS CSI-2 resource descriptors for all devices that have them to populate port names and the "reg", "bus-type" and "remote-endpoint" properties in the software nodes representing the CSI-2 connection graph. Link: https://uefi.org/specs/ACPI/6.5/06_Device_Configuration.html#camera-serial-interface-csi-2-connection-resource-descriptor Co-developed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2023-11-20ACPI: scan: Extract CSI-2 connection graph from _CRSRafael J. Wysocki1-0/+292
Find ACPI CSI-2 resource descriptors defined since ACPI 6.4 (for CSI-2 and camera configuration) in _CRS for all device objects in the given scope of the ACPI namespace that have them, identify the corresponding "remote endpoint" device objects for them and allocate memory for software nodes needed to create a DT-like data structure representing the CSI-2 connection graph for drivers. The code needed to populate these software nodes will be added by subsequent change sets. Link: https://uefi.org/specs/ACPI/6.5/06_Device_Configuration.html#camera-serial-interface-csi-2-connection-resource-descriptor Co-developed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>