linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Tao Zhang <quic_taozha@quicinc.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Konrad Dybcio <konradybcio@gmail.com>,
	Mike Leach <mike.leach@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Jinlong Mao <quic_jinlmao@quicinc.com>,
	Leo Yan <leo.yan@linaro.org>,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Tingwei Zhang <quic_tingweiz@quicinc.com>,
	Yuanfang Zhang <quic_yuanfang@quicinc.com>,
	Trilok Soni <quic_tsoni@quicinc.com>,
	Hao Zhang <quic_hazha@quicinc.com>,
	linux-arm-msm@vger.kernel.org, andersson@kernel.org
Subject: Re: [PATCH v6 09/13] Add nodes for dsb edge control
Date: Tue, 20 Jun 2023 09:37:07 +0200	[thread overview]
Message-ID: <2023062024-sincere-tripod-95dc@gregkh> (raw)
In-Reply-To: <1687246361-23607-10-git-send-email-quic_taozha@quicinc.com>

On Tue, Jun 20, 2023 at 03:32:37PM +0800, Tao Zhang wrote:
> Add the nodes to set value for DSB edge control and DSB edge
> control mask. Each DSB subunit TPDM has maximum of n(n<16) EDCR
> resgisters to configure edge control. DSB edge detection control
> 00: Rising edge detection
> 01: Falling edge detection
> 10: Rising and falling edge detection (toggle detection)
> And each DSB subunit TPDM has maximum of m(m<8) ECDMR registers to
> configure mask. Eight 32 bit registers providing DSB interface
> edge detection mask control.
> 
> Signed-off-by: Tao Zhang <quic_taozha@quicinc.com>
> ---
>  .../ABI/testing/sysfs-bus-coresight-devices-tpdm   |  32 +++++
>  drivers/hwtracing/coresight/coresight-tpdm.c       | 143 ++++++++++++++++++++-
>  drivers/hwtracing/coresight/coresight-tpdm.h       |  22 ++++
>  3 files changed, 196 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpdm b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpdm
> index 2a82cd0..34189e4a 100644
> --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpdm
> +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpdm
> @@ -60,3 +60,35 @@ Description:
>  		Bit[3] : Set to 0 for low performance mode.
>  				 Set to 1 for high performance mode.
>  		Bit[4:8] : Select byte lane for high performance mode.
> +
> +What:		/sys/bus/coresight/devices/<tpdm-name>/dsb_edge_ctrl
> +Date:		March 2023
> +KernelVersion	6.5
> +Contact:	Jinlong Mao (QUIC) <quic_jinlmao@quicinc.com>, Tao Zhang (QUIC) <quic_taozha@quicinc.com>
> +Description:
> +		Read/Write a set of the edge control registers of the DSB
> +		in TPDM.
> +
> +		Expected format is the following:
> +		<integer1> <integer2> <integer3>

sysfs is "one value", not 3.  Please never have to parse a sysfs file.

> +static ssize_t dsb_edge_ctrl_show(struct device *dev,
> +				       struct device_attribute *attr,
> +				       char *buf)
> +{
> +	struct tpdm_drvdata *drvdata = dev_get_drvdata(dev->parent);
> +	ssize_t size = 0;
> +	unsigned long bytes;
> +	int i;
> +
> +	spin_lock(&drvdata->spinlock);
> +	for (i = 0; i < TPDM_DSB_MAX_EDCR; i++) {
> +		bytes = sysfs_emit_at(buf, size,
> +				  "Index:0x%x Val:0x%x\n", i,

Again, no, one value, no "string" needed to parse anything.

greg k-h

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-06-20  7:37 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20  7:32 [PATCH v6 00/13] Add support to configure TPDM DSB subunit Tao Zhang
2023-06-20  7:32 ` [PATCH v6 01/13] coresight-tpdm: Remove the unnecessary lock Tao Zhang
2023-06-20  7:32 ` [PATCH v6 02/13] dt-bindings: arm: Add support for DSB element size Tao Zhang
2023-06-22  1:47   ` Rob Herring
2023-06-20  7:32 ` [PATCH v6 03/13] coresight-tpdm: Introduce TPDM subtype to TPDM driver Tao Zhang
2023-06-20  7:32 ` [PATCH v6 04/13] coresight-tpda: Add DSB dataset support Tao Zhang
2023-06-20  7:32 ` [PATCH v6 05/13] coresight-tpdm: Initialize DSB subunit configuration Tao Zhang
2023-06-20  7:32 ` [PATCH v6 06/13] coresight-tpdm: Add reset node to TPDM node Tao Zhang
2023-06-20  7:32 ` [PATCH v6 07/13] coresight-tpdm: Add nodes to set trigger timestamp and type Tao Zhang
2023-06-20  7:32 ` [PATCH v6 08/13] coresight-tpdm: Add node to set dsb programming mode Tao Zhang
2023-06-20  7:32 ` [PATCH v6 09/13] Add nodes for dsb edge control Tao Zhang
2023-06-20  7:36   ` Greg Kroah-Hartman
2023-06-20  7:37   ` Greg Kroah-Hartman [this message]
2023-06-20  8:31     ` Tao Zhang
2023-06-20  8:49       ` Greg Kroah-Hartman
     [not found]         ` <23eae515-4262-d5b8-4629-ade11362d4a8@quicinc.com>
2023-06-28  6:13           ` Greg Kroah-Hartman
2023-06-20 13:41       ` Suzuki K Poulose
2023-07-12 13:53         ` Tao Zhang
2023-07-13  8:54           ` Mike Leach
2023-07-13  9:34             ` Suzuki K Poulose
2023-07-13 16:13               ` Tao Zhang
2023-07-13 16:37                 ` Suzuki K Poulose
2023-07-14  5:50                   ` Tao Zhang
2023-07-14  5:50                     ` Tao Zhang
2023-07-14 10:24                     ` Suzuki K Poulose
2023-07-14 14:39                       ` Tao Zhang
2023-07-14 14:39                         ` Tao Zhang
2023-06-20  7:32 ` [PATCH v6 10/13] coresight-tpdm: Add nodes to configure pattern match output Tao Zhang
2023-06-20  7:32 ` [PATCH v6 11/13] coresight-tpdm: Add nodes for timestamp request Tao Zhang
2023-06-20  7:32 ` [PATCH v6 12/13] dt-bindings: arm: Add support for DSB MSR register Tao Zhang
2023-06-22  1:47   ` Rob Herring
2023-06-20  7:32 ` [PATCH v6 13/13] coresight-tpdm: Add nodes for dsb msr support Tao Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2023062024-sincere-tripod-95dc@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andersson@kernel.org \
    --cc=coresight@lists.linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@linaro.org \
    --cc=quic_hazha@quicinc.com \
    --cc=quic_jinlmao@quicinc.com \
    --cc=quic_taozha@quicinc.com \
    --cc=quic_tingweiz@quicinc.com \
    --cc=quic_tsoni@quicinc.com \
    --cc=quic_yuanfang@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=suzuki.poulose@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).