Re: [PATCH v5 2/2] spmi: Add generic DebugFS interface for bus inspection

From: Abel Vesa

Date: Tue Nov 03 2026 - 05:11:01 EST


On 26-10-31 02:07:28, vamshi gajjela wrote:
> From: Vamshi Gajjela <vamshigajjela@xxxxxxxxxx>
>
> Introduce a generic, controller-agnostic DebugFS interface in the SPMI
> core under /sys/kernel/debug/spmi/spmi-<nr>/:
> - name: Displays the controller parent device name and OF node.
> - xfer: Transactional interface supporting register reads, writes,
> and directed command opcodes with automatic opcode selection.
>
> Because raw writes and commands to PMICs can damage hardware and bypass
> client drivers and their regmap caches, write ('w') and command ('c')
> operations are disabled by default behind SPMI_ALLOW_WRITE_DEBUGFS. When
> enabled, they restrict access to root (mode 0600) and mark the kernel
> tainted with TAINT_USER.
>
> Detailed interface syntax and parameters are documented in
> Documentation/ABI/testing/debugfs-spmi.
>
> Co-developed-by: Jim Wylder <jwylder@xxxxxxxxxx>
> Signed-off-by: Jim Wylder <jwylder@xxxxxxxxxx>
> Signed-off-by: Vamshi Gajjela <vamshigajjela@xxxxxxxxxx>

Reviewed-by: Abel Vesa <abel.vesa@xxxxxxxxxxxxxxxx>