From 5a615789cd7b6e2a10b69a5f631e1e25df35ecd1 Mon Sep 17 00:00:00 2001 From: Mohit Ingale Date: Tue, 22 Apr 2025 00:57:57 +0000 Subject: [PATCH] platform: tegra: rtcpu: Rename camera diag control sysfs node Renamed the "control" sysfs node to "diag_control" in the camera-diagnostics driver to avoid naming conflicts with other control nodes in the system. This renames the associated show/store functions and updates all references to maintain the same functionality through the new more specific node name. The camera diagnostic control interface is now accessible through /sys/devices/platform/.../camera-diag/diag_control instead of .../control. Bug 5225858 Change-Id: I5ce96d6d981354f7af9edc7495cf9eef6ba1fdb6 Signed-off-by: Mohit Ingale Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3345338 Reviewed-by: mobile promotions Tested-by: mobile promotions Reviewed-by: Bhushan Rayrikar GVS: buildbot_gerritrpt Reviewed-by: Vincent Chung Reviewed-by: Shiva Dubey --- drivers/platform/tegra/rtcpu/camera-diagnostics.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/platform/tegra/rtcpu/camera-diagnostics.c b/drivers/platform/tegra/rtcpu/camera-diagnostics.c index 265a9836..e5355550 100644 --- a/drivers/platform/tegra/rtcpu/camera-diagnostics.c +++ b/drivers/platform/tegra/rtcpu/camera-diagnostics.c @@ -1057,7 +1057,7 @@ static void camera_diag_channel_deinit(struct camera_diag_channel *ch) /** * @brief Sysfs store function for controlling diagnostic state. * - * This function is called when the user writes to the 'control' sysfs attribute. + * This function is called when the user writes to the 'diag_control' sysfs attribute. * It allows toggling the ISP SDL diagnostics on and off without deallocating memory. * Accepted values: "start" to start diagnostics, "stop" to stop diagnostics. * @@ -1068,7 +1068,7 @@ static void camera_diag_channel_deinit(struct camera_diag_channel *ch) * * @return Number of bytes processed on success, negative error code on failure. */ -static ssize_t control_store(struct device *dev, struct device_attribute *attr, +static ssize_t diag_control_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct camera_diag_channel *ch = dev_get_drvdata(dev); @@ -1125,7 +1125,7 @@ static ssize_t control_store(struct device *dev, struct device_attribute *attr, /** * @brief Sysfs show function for diagnostic control state. * - * This function is called when the user reads the 'control' sysfs attribute. + * This function is called when the user reads the 'diag_control' sysfs attribute. * It shows the current state of the ISP SDL diagnostics and available commands. * * @param[in] dev Device pointer. @@ -1134,7 +1134,7 @@ static ssize_t control_store(struct device *dev, struct device_attribute *attr, * * @return Number of bytes written to buffer on success, negative error code on failure. */ -static ssize_t control_show(struct device *dev, struct device_attribute *attr, char *buf) +static ssize_t diag_control_show(struct device *dev, struct device_attribute *attr, char *buf) { struct camera_diag_channel *ch = dev_get_drvdata(dev); struct camrtc_diag_isp5_sdl_status_resp status; @@ -1161,12 +1161,12 @@ static ssize_t control_show(struct device *dev, struct device_attribute *attr, c /* Create the device attributes */ static DEVICE_ATTR_RO(status); -static DEVICE_ATTR_RW(control); +static DEVICE_ATTR_RW(diag_control); /* Define the attribute group */ static struct attribute *camera_diag_attrs[] = { &dev_attr_status.attr, - &dev_attr_control.attr, + &dev_attr_diag_control.attr, NULL, };