Lines Matching defs:adev

98 static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev)
100 acpi_handle handle = acpi_device_handle(adev);
119 static int ipu_bridge_match_ivsc_dev(struct device *dev, const void *adev)
121 if (ACPI_COMPANION(dev) != adev)
130 static struct device *ipu_bridge_get_ivsc_csi_dev(struct acpi_device *adev)
137 dev = bus_find_device(&platform_bus_type, NULL, adev,
155 struct acpi_device *adev;
158 adev = ipu_bridge_get_ivsc_acpi_dev(sensor_adev);
159 if (adev) {
160 csi_dev = ipu_bridge_get_ivsc_csi_dev(adev);
162 acpi_dev_put(adev);
163 dev_err(&adev->dev, "Failed to find MEI CSI dev\n");
168 sensor->ivsc_adev = adev;
174 static int ipu_bridge_read_acpi_buffer(struct acpi_device *adev, char *id,
182 status = acpi_evaluate_object(adev->handle, id, NULL, &buffer);
188 dev_err(&adev->dev, "Couldn't locate ACPI buffer\n");
193 dev_err(&adev->dev, "Not an ACPI buffer\n");
199 dev_err(&adev->dev, "Given buffer is too small\n");
211 static u32 ipu_bridge_parse_rotation(struct acpi_device *adev,
220 dev_warn(&adev->dev,
227 static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_device *adev)
233 status = acpi_get_physical_device_location(adev->handle, &pld);
235 dev_warn(&adev->dev, "_PLD call failed, using default orientation\n");
253 dev_warn(&adev->dev, "Unknown _PLD panel val %d\n", pld->panel);
262 int ipu_bridge_parse_ssdb(struct acpi_device *adev, struct ipu_sensor *sensor)
267 ret = ipu_bridge_read_acpi_buffer(adev, "SSDB", &ssdb, sizeof(ssdb));
272 dev_warn(&adev->dev, "Unknown VCM type %d\n", ssdb.vcmtype);
277 dev_err(&adev->dev, "Number of lanes in SSDB is invalid\n");
284 sensor->rotation = ipu_bridge_parse_rotation(adev, &ssdb);
285 sensor->orientation = ipu_bridge_parse_orientation(adev);
507 struct acpi_device *adev = ACPI_COMPANION(data->sensor);
527 vcm_client = i2c_acpi_new_device_by_fwnode(acpi_fwnode_handle(adev),
553 struct acpi_device *adev;
556 adev = ACPI_COMPANION(sensor);
557 if (!adev)
581 acpi_dev_name(adev));
620 acpi_dev_put(sensor->adev);
631 struct acpi_device *adev;
634 for_each_acpi_dev_match(adev, cfg->hid, NULL, -1) {
635 if (!adev->status.enabled)
639 acpi_dev_put(adev);
646 ret = bridge->parse_sensor_fwnode(adev, sensor);
653 ret = ipu_bridge_check_ivsc_dev(sensor, adev);
671 sensor->adev = acpi_dev_get(adev);
673 primary = acpi_fwnode_handle(adev);
681 acpi_dev_name(adev));
694 acpi_dev_put(adev);
721 struct acpi_device *sensor_adev, *adev;
734 adev = ipu_bridge_get_ivsc_acpi_dev(sensor_adev);
735 if (!adev)
738 csi_dev = ipu_bridge_get_ivsc_csi_dev(adev);
743 acpi_dev_put(adev);