linux/drivers/platform/chrome
Andrei Kuchynski 9fc83373f0 platform/chrome: cros_ec_typec: Add support for setting USB mode via sysfs
This patch implements USB mode setting via a sysfs interface in
cros_ec_typec driver. User-space applications can now change the current
USB mode by writing to "usb_mode" sysfs entry, replacing the previous
ioctl-based method.
The embedded controller (EC) currently supports only entering USB4 mode
and exiting all modes (including altmodes). Both of these operations
trigger Data Reset Message, even if no USB Mode is active.
Additionally, the patch exposes the USB modes supported by the port via
"usb_capability" sysfs attribute.

Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
Link: https://lore.kernel.org/r/20250210130419.4110130-1-akuchynski@chromium.org
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2025-02-21 01:42:22 +00:00
..
wilco_ec chrome platform changes for 6.13 2024-11-19 10:24:12 -08:00
chromeos_acpi.c platform/chrome: chromeos_acpi: print hex string for ACPI_TYPE_BUFFER 2023-08-10 11:10:56 +08:00
chromeos_laptop.c platform/chrome: chromeos_laptop: Use kmemdup_array 2024-08-23 21:48:43 +08:00
chromeos_of_hw_prober.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
chromeos_privacy_screen.c ACPI: make remove callback of ACPI driver void 2022-11-23 19:11:22 +01:00
chromeos_pstore.c chrome platform changes for 5.8 2020-06-04 10:54:45 -07:00
chromeos_tbmc.c platform/chrome: chromeos_tbmc: Report wake events 2019-09-12 16:01:35 +02:00
cros_ec_chardev.c platform/chrome: Switch back to struct platform_driver::remove() 2024-10-28 08:48:34 +00:00
cros_ec_debugfs.c platform/chrome: Switch back to struct platform_driver::remove() 2024-10-28 08:48:34 +00:00
cros_ec_i2c.c platform/chrome: cros_ec: jump to RW before probing 2024-12-30 01:31:05 +00:00
cros_ec_ishtp.c platform/chrome: cros_ec: jump to RW before probing 2024-12-30 01:31:05 +00:00
cros_ec_lightbar.c platform/chrome: Switch back to struct platform_driver::remove() 2024-10-28 08:48:34 +00:00
cros_ec_lpc_mec.c platform/chrome: cros_ec_lpc: Handle zero length read/write 2024-06-14 02:47:25 +00:00
cros_ec_lpc_mec.h platform/chrome: cros_ec_lpc: MEC access can use an AML mutex 2024-06-06 03:11:51 +00:00
cros_ec_lpc.c platform/chrome: cros_ec_lpc: Match on Framework ACPI device 2025-02-03 02:39:55 +00:00
cros_ec_proto_test_util.c platform/chrome: kunit: make EC protocol tests independent 2023-10-05 18:11:36 +08:00
cros_ec_proto_test_util.h platform/chrome: kunit: make EC protocol tests independent 2023-10-05 18:11:36 +08:00
cros_ec_proto_test.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cros_ec_proto.c platform/chrome: cros_ec_proto: remove unnecessary retries 2024-12-30 01:31:05 +00:00
cros_ec_rpmsg.c platform/chrome: cros_ec: jump to RW before probing 2024-12-30 01:31:05 +00:00
cros_ec_sensorhub_ring.c platform/chrome: sensorhub: Implement quickselect for median calculation 2023-11-13 12:46:42 +08:00
cros_ec_sensorhub_trace.h platform: chrome: Split trace include file 2022-03-31 16:56:29 -07:00
cros_ec_sensorhub.c platform/chrome: cros_ec_sensorhub: provide ID table for avoiding fallback match 2024-04-24 16:45:56 +08:00
cros_ec_spi.c chrome-platform: Updates for v6.14 2025-01-21 19:48:29 -08:00
cros_ec_sysfs.c platform/chrome: cros_ec_sysfs: Expose AP_MODE_ENTRY feature state 2025-02-05 04:03:31 +00:00
cros_ec_trace.c platform/chrome: Update ChromeOS EC command tracing 2025-01-06 01:25:26 +00:00
cros_ec_trace.h platform/chrome: use macros for passthru indexes 2022-06-10 02:31:42 +00:00
cros_ec_typec.c platform/chrome: cros_ec_typec: Add support for setting USB mode via sysfs 2025-02-21 01:42:22 +00:00
cros_ec_typec.h platform/chrome: cros_ec_typec: Add support for setting USB mode via sysfs 2025-02-21 01:42:22 +00:00
cros_ec_uart.c platform/chrome: cros_ec: jump to RW before probing 2024-12-30 01:31:05 +00:00
cros_ec_vbc.c platform/chrome: cros_ec_vbc: Constify 'struct bin_attribute' 2024-12-30 01:31:05 +00:00
cros_ec.c platform/chrome: cros_ec: jump to RW before probing 2024-12-30 01:31:05 +00:00
cros_ec.h platform/chrome: cros_ec_lpc: Separate host command and irq disable 2023-10-28 11:13:25 +08:00
cros_hps_i2c.c platform/chrome: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-09-30 01:34:01 +00:00
cros_kbd_led_backlight.c platform/chrome: cros_kbd_led_backlight: Remove OF match 2024-12-30 01:31:05 +00:00
cros_typec_altmode.c platform/chrome: cros_ec_typec: Thunderbolt support 2024-12-24 08:56:05 +01:00
cros_typec_altmode.h platform/chrome: cros_ec_typec: Thunderbolt support 2024-12-24 08:56:05 +01:00
cros_typec_switch.c platform/chrome: Switch back to struct platform_driver::remove() 2024-10-28 08:48:34 +00:00
cros_typec_vdm.c platform/chrome: cros_typec_vdm: Mark port_amode_ops const 2023-10-04 11:40:54 +08:00
cros_typec_vdm.h platform/chrome: cros_typec_vdm: Mark port_amode_ops const 2023-10-04 11:40:54 +08:00
cros_usbpd_logger.c platform/chrome: cros_usbpd_logger: Use str_enabled_disabled() helper 2025-01-13 07:39:46 +00:00
cros_usbpd_notify.c platform/chrome: Switch back to struct platform_driver::remove() 2024-10-28 08:48:34 +00:00
Kconfig platform/chrome: cros_ec_typec: Thunderbolt support 2024-12-24 08:56:05 +01:00
Makefile platform/chrome: cros_ec_typec: Displayport support 2024-12-24 08:56:05 +01:00