[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260209-arm_coresight_cti_refactor_v1-v1-5-db71ab4d200b@arm.com>
Date: Mon, 09 Feb 2026 18:01:15 +0000
From: Leo Yan <leo.yan@....com>
To: Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@....com>, James Clark <james.clark@...aro.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Tingwei Zhang <quic_tingwei@...cinc.com>,
Yingchao Deng <yingchao.deng@....qualcomm.com>,
Jie Gan <jie.gan@....qualcomm.com>
Cc: coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, Leo Yan <leo.yan@....com>
Subject: [PATCH 5/8] coresight: cti: Rename cti_active() to cti_is_active()
Rename cti_active() to cti_is_active() to clarify that it checks whether
the CTI device is active.
Signed-off-by: Leo Yan <leo.yan@....com>
---
drivers/hwtracing/coresight/coresight-cti-core.c | 8 ++++----
drivers/hwtracing/coresight/coresight-cti-sysfs.c | 14 +++++++-------
drivers/hwtracing/coresight/coresight-cti.h | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-cti-core.c b/drivers/hwtracing/coresight/coresight-cti-core.c
index 3becef607e5ec5225cb6fd616da804903651fdf1..48db87e2fd0f1a669f2d20a0014108da215e26fd 100644
--- a/drivers/hwtracing/coresight/coresight-cti-core.c
+++ b/drivers/hwtracing/coresight/coresight-cti-core.c
@@ -164,7 +164,7 @@ void cti_write_intack(struct device *dev, u32 ackval)
guard(raw_spinlock_irqsave)(&drvdata->spinlock);
/* write if enabled */
- if (cti_active(config))
+ if (cti_is_active(config))
cti_write_single_reg(drvdata, CTIINTACK, ackval);
}
@@ -351,7 +351,7 @@ int cti_channel_trig_op(struct device *dev, enum cti_chan_op op,
config->ctiouten[trigger_idx] = reg_value;
/* write through if enabled */
- if (cti_active(config))
+ if (cti_is_active(config))
cti_write_single_reg(drvdata, reg_offset, reg_value);
return 0;
@@ -389,7 +389,7 @@ int cti_channel_gate_op(struct device *dev, enum cti_chan_gate_op op,
}
if (err == 0) {
config->ctigate = reg_value;
- if (cti_active(config))
+ if (cti_is_active(config))
cti_write_single_reg(drvdata, CTIGATE, reg_value);
}
@@ -438,7 +438,7 @@ int cti_channel_setop(struct device *dev, enum cti_chan_set_op op,
break;
}
- if ((err == 0) && cti_active(config))
+ if ((err == 0) && cti_is_active(config))
cti_write_single_reg(drvdata, reg_offset, reg_value);
return err;
diff --git a/drivers/hwtracing/coresight/coresight-cti-sysfs.c b/drivers/hwtracing/coresight/coresight-cti-sysfs.c
index c15a580f6e90f57b1376e0b883a27700966feb1a..a22cc9a2bee24eb6115e7adb61880cc86d03e12e 100644
--- a/drivers/hwtracing/coresight/coresight-cti-sysfs.c
+++ b/drivers/hwtracing/coresight/coresight-cti-sysfs.c
@@ -268,7 +268,7 @@ static ssize_t cti_reg32_show(struct device *dev, char *buf,
struct cti_config *config = &drvdata->config;
scoped_guard(raw_spinlock_irqsave, &drvdata->spinlock) {
- if ((reg_offset >= 0) && cti_active(config)) {
+ if ((reg_offset >= 0) && cti_is_active(config)) {
val = cti_read_single_reg(drvdata, reg_offset);
if (pcached_val)
*pcached_val = val;
@@ -301,7 +301,7 @@ static ssize_t cti_reg32_store(struct device *dev, const char *buf,
*pcached_val = (u32)val;
/* write through if offset and enabled */
- if ((reg_offset >= 0) && cti_active(config))
+ if ((reg_offset >= 0) && cti_is_active(config))
cti_write_single_reg(drvdata, reg_offset, val);
}
@@ -393,7 +393,7 @@ static ssize_t inen_store(struct device *dev,
config->ctiinen[index] = val;
/* write through if enabled */
- if (cti_active(config))
+ if (cti_is_active(config))
cti_write_single_reg(drvdata, CTIINEN(index), val);
return size;
@@ -434,7 +434,7 @@ static ssize_t outen_store(struct device *dev,
config->ctiouten[index] = val;
/* write through if enabled */
- if (cti_active(config))
+ if (cti_is_active(config))
cti_write_single_reg(drvdata, CTIOUTEN(index), val);
return size;
@@ -476,7 +476,7 @@ static ssize_t appclear_store(struct device *dev,
config->ctiappset &= ~val;
/* write through if enabled */
- if (cti_active(config))
+ if (cti_is_active(config))
cti_write_single_reg(drvdata, CTIAPPCLEAR, val);
return size;
@@ -497,7 +497,7 @@ static ssize_t apppulse_store(struct device *dev,
guard(raw_spinlock_irqsave)(&drvdata->spinlock);
/* write through if enabled */
- if (cti_active(config))
+ if (cti_is_active(config))
cti_write_single_reg(drvdata, CTIAPPPULSE, val);
return size;
@@ -763,7 +763,7 @@ static ssize_t chan_xtrigs_reset_store(struct device *dev,
config->xtrig_rchan_sel = 0;
/* if enabled then write through */
- if (cti_active(config))
+ if (cti_is_active(config))
cti_write_all_hw_regs(drvdata);
return size;
diff --git a/drivers/hwtracing/coresight/coresight-cti.h b/drivers/hwtracing/coresight/coresight-cti.h
index 7a3e7f806dcb093e504f1aacb3b29564bea28f6c..400c1545b22bfe631144d24faceb354ff2d49166 100644
--- a/drivers/hwtracing/coresight/coresight-cti.h
+++ b/drivers/hwtracing/coresight/coresight-cti.h
@@ -238,7 +238,7 @@ coresight_cti_get_platform_data(struct device *dev);
const char *cti_plat_get_node_name(struct fwnode_handle *fwnode);
/* cti powered and enabled */
-static inline bool cti_active(struct cti_config *cfg)
+static inline bool cti_is_active(struct cti_config *cfg)
{
return cfg->hw_powered && cfg->hw_enabled;
}
--
2.34.1
Powered by blists - more mailing lists