Re: [PATCH v2] coresight: trbe: Hide enable_sink sysfs file

From: Leo Yan

Date: Tue Aug 11 2026 - 05:08:48 EST


On Fri, Aug 07, 2026 at 11:13:22AM +0100, James Clark wrote:
> TRBE doesn't support sysfs mode, but the enable_sink file can still be
> successfully written to enable the device, and only attempting to enable
> the source would later fail.
>
> Avoid misleading users by adding a flag that devices can use to hide
> either the enable_sink or enable_source files, and set it for TRBE.
>
> Don't set it for ETE as it's possible that ETE could appear on the
> legacy bus and work with sysfs, and writing to enable_source already
> reports EINVAL if the device doesn't support sysfs mode.

It is a pity that we cannot determine from the ETE registers whether ETE
is connected to the legacy bus or TRBE.

> Signed-off-by: James Clark <james.clark@xxxxxxxxxx>

Reviewed-by: Leo Yan <leo.yan@xxxxxxx>