media: atomisp: Use string choices helpers

Use string_choices.h helpers instead of hard-coded strings.

Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
This commit is contained in:
Chelsy Ratnawat 2025-08-25 03:15:15 -07:00 committed by Sakari Ailus
parent d178c7ca8f
commit 07e4753014
5 changed files with 12 additions and 7 deletions

View File

@ -27,6 +27,7 @@
#include <linux/io.h>
#include <linux/pm_runtime.h>
#include <linux/string_choices.h>
/* Assume max number of ACC stages */
#define MAX_ACC_STAGES 20
@ -841,7 +842,7 @@ int atomisp_css_irq_enable(struct atomisp_device *isp,
{
dev_dbg(isp->dev, "%s: css irq info 0x%08x: %s (%d).\n",
__func__, info,
enable ? "enable" : "disable", enable);
str_enable_disable(enable), enable);
if (ia_css_irq_enable(info, enable)) {
dev_warn(isp->dev, "%s:Invalid irq info: 0x%08x when %s.\n",
__func__, info,

View File

@ -12,6 +12,7 @@
#include <linux/regulator/consumer.h>
#include <linux/gpio/consumer.h>
#include <linux/platform_device.h>
#include <linux/string_choices.h>
#include "../../include/linux/atomisp_platform.h"
#include "../../include/linux/atomisp_gmin_platform.h"
@ -916,7 +917,7 @@ static int gmin_acpi_pm_ctrl(struct v4l2_subdev *subdev, int on)
return 0;
dev_dbg(subdev->dev, "Setting power state to %s\n",
on ? "on" : "off");
str_on_off(on));
if (on)
ret = acpi_device_set_power(adev,
@ -929,7 +930,7 @@ static int gmin_acpi_pm_ctrl(struct v4l2_subdev *subdev, int on)
gs->clock_on = on;
else
dev_err(subdev->dev, "Couldn't set power state to %s\n",
on ? "on" : "off");
str_on_off(on));
return ret;
}

View File

@ -16,6 +16,7 @@
#include <linux/dmi.h>
#include <linux/interrupt.h>
#include <linux/bits.h>
#include <linux/string_choices.h>
#include <media/v4l2-fwnode.h>
#include <asm/iosf_mbi.h>
@ -527,7 +528,7 @@ static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable)
u32 val = enable ? MRFLD_ISPSSPM0_IUNIT_POWER_ON :
MRFLD_ISPSSPM0_IUNIT_POWER_OFF;
dev_dbg(isp->dev, "IUNIT power-%s.\n", enable ? "on" : "off");
dev_dbg(isp->dev, "IUNIT power-%s.\n", str_on_off(enable));
/* WA for P-Unit, if DVFS enabled, ISP timeout observed */
if (IS_CHT && enable && !isp->pm_only) {
@ -569,7 +570,7 @@ static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable)
usleep_range(100, 150);
} while (1);
dev_err(isp->dev, "IUNIT power-%s timeout.\n", enable ? "on" : "off");
dev_err(isp->dev, "IUNIT power-%s timeout.\n", str_on_off(enable));
return -EBUSY;
}

View File

@ -5,6 +5,7 @@
*/
#include <linux/math.h>
#include <linux/string_choices.h>
#include <math_support.h>
#include <gdc_device.h> /* HR_GDC_N */
@ -1220,7 +1221,7 @@ int ia_css_binary_find(struct ia_css_binary_descr *descr, struct ia_css_binary *
dev_dbg(atomisp_dev, "Using binary %s (id %d), type %d, mode %d, continuous %s\n",
xcandidate->blob->name, xcandidate->sp.id, xcandidate->type,
xcandidate->sp.pipeline.mode,
xcandidate->sp.enable.continuous ? "true" : "false");
str_true_false(xcandidate->sp.enable.continuous));
if (err)
dev_err(atomisp_dev, "Failed to find a firmware binary matching the pipeline parameters\n");

View File

@ -7,6 +7,7 @@
/*! \file */
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/string_choices.h>
#include <linux/vmalloc.h>
#include "hmm.h"
@ -1478,7 +1479,7 @@ map_sp_threads(struct ia_css_stream *stream, bool map)
enum ia_css_pipe_id pipe_id;
IA_CSS_ENTER_PRIVATE("stream = %p, map = %s",
stream, map ? "true" : "false");
stream, str_true_false(map));
if (!stream) {
IA_CSS_LEAVE_ERR_PRIVATE(-EINVAL);