Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 181d2c24 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: cpas: Add cpas hw version in query cap"

parents 20d46786 f77a2a75
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -51,21 +51,23 @@ struct cam_cpas_intf {
static struct cam_cpas_intf *g_cpas_intf;

int cam_cpas_get_hw_info(uint32_t *camera_family,
	struct cam_hw_version *camera_version)
	struct cam_hw_version *camera_version,
	struct cam_hw_version *cpas_version)
{
	if (!CAM_CPAS_INTF_INITIALIZED()) {
		pr_err("cpas intf not initialized\n");
		return -ENODEV;
	}

	if (!camera_family || !camera_version) {
		pr_err("invalid input %pK %pK\n", camera_family,
			camera_version);
	if (!camera_family || !camera_version || !cpas_version) {
		pr_err("invalid input %pK %pK %pK\n", camera_family,
			camera_version, cpas_version);
		return -EINVAL;
	}

	*camera_family = g_cpas_intf->hw_caps.camera_family;
	*camera_version = g_cpas_intf->hw_caps.camera_version;
	*cpas_version = g_cpas_intf->hw_caps.cpas_version;

	return 0;
}
@@ -344,7 +346,7 @@ int cam_cpas_subdev_cmd(struct cam_cpas_intf *cpas_intf,
		}

		rc = cam_cpas_get_hw_info(&query.camera_family,
			&query.camera_version);
			&query.camera_version, &query.cpas_version);
		if (rc)
			break;

+4 −2
Original line number Diff line number Diff line
@@ -312,13 +312,15 @@ int cam_cpas_reg_read(
 * @camera_family  : Camera family type. One of
 *                   CAM_FAMILY_CAMERA_SS
 *                   CAM_FAMILY_CPAS_SS
 * @camera_version : Camera version
 * @camera_version : Camera platform version
 * @cpas_version   : Camera cpas version
 *
 * @return 0 on success.
 *
 */
int cam_cpas_get_hw_info(
	uint32_t                 *camera_family,
	struct cam_hw_version    *camera_version);
	struct cam_hw_version    *camera_version,
	struct cam_hw_version    *cpas_version);

#endif /* _CAM_CPAS_API_H_ */
+3 −1
Original line number Diff line number Diff line
@@ -11,13 +11,15 @@
 *
 * @camera_family     : Camera family type
 * @reserved          : Reserved field for alignment
 * @camera_version    : Camera version
 * @camera_version    : Camera platform version
 * @cpas_version      : Camera CPAS version within camera platform
 *
 */
struct cam_cpas_query_cap {
	uint32_t                 camera_family;
	uint32_t                 reserved;
	struct cam_hw_version    camera_version;
	struct cam_hw_version    cpas_version;
};

#endif /* __UAPI_CAM_CPAS_H__ */