]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: typec: ucsi: Enable debugfs for message_out data structure
authorPooja Katiyar <pooja.katiyar@intel.com>
Thu, 30 Oct 2025 14:48:57 +0000 (07:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Nov 2025 14:13:07 +0000 (15:13 +0100)
commit775fae520e6ae62c393a8daf42dc534f09692f3f
treefdc745b3b8610b5c1624c10d1c3a8f71964075c6
parentdb0028637cc832add6d87564fcc2ebb12781b046
usb: typec: ucsi: Enable debugfs for message_out data structure

Add debugfs entry for writing message_out data structure to handle
UCSI 2.1 and 3.0 commands through debugfs interface.

Users writing to the message_out debugfs file should ensure the input
data adheres to the following format:
1. Input must be a non-empty valid hexadecimal string.
2. Input length of hexadecimal string must not exceed 256 bytes of
   length to be in alignment with the message out data structure size
   as per the UCSI specification v2.1.
3. If the input string length is odd, then user needs to prepend a
   '0' to the first character for proper hex conversion.

Below are examples of valid hex strings. Note that these values are
just examples. The exact values depend on specific command use case.

        #echo 1A2B3C4D > message_out
        #echo 01234567 > message_out

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Pooja Katiyar <pooja.katiyar@intel.com>
Link: https://patch.msgid.link/0a81c2209eb299c1af191cd7ce758a92d5adf81b.1761773881.git.pooja.katiyar@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/debugfs.c