Home
last modified time | relevance | path

Searched +full:accessory +full:- +full:mode +full:- +full:debug (Results 1 – 5 of 5) sorted by relevance

/linux/include/linux/usb/
H A Dtypec_altmode.h1 /* SPDX-License-Identifier: GPL-2.0 */
15 * struct typec_altmode - USB Type-C alternate mode device
17 * @svid: Standard or Vendor ID (SVID) of the alternate mode
18 * @mode: Index of the Mode
20 * @active: Tells has the mode been entered or not
21 * @desc: Optional human readable description of the mode
28 int mode; member
42 dev_set_drvdata(&altmode->dev, data); in typec_altmode_set_drvdata()
47 return dev_get_drvdata(&altmode->dev); in typec_altmode_get_drvdata()
51 * struct typec_altmode_ops - Alternate mode specific operations vector
[all …]
/linux/drivers/extcon/
H A Dextcon-usbc-tusb320.c1 // SPDX-License-Identifier: GPL-2.0
3 * drivers/extcon/extcon-tusb320.c - TUSB320 extcon driver
10 #include <linux/extcon-provider.h>
70 int (*set_mode)(struct tusb320_priv *priv, enum tusb320_mode mode);
92 [TUSB320_ATTACHED_STATE_ACC] = "accessory",
108 ret = regmap_read(priv->regmap, sizeof(sig) - 1 - i, &val); in tusb320_check_signature()
112 dev_err(priv->dev, "signature mismatch!\n"); in tusb320_check_signature()
113 return -ENODEV; in tusb320_check_signature()
120 static int tusb320_set_mode(struct tusb320_priv *priv, enum tusb320_mode mode) in tusb320_set_mode() argument
124 /* Mode cannot be changed while cable is attached */ in tusb320_set_mode()
[all …]
/linux/drivers/usb/typec/
H A Dclass.c1 // SPDX-License-Identifier: GPL-2.0
3 * USB Type-C Connector Class
29 /* ------------------------------------------------------------------------- */
35 [TYPEC_ACCESSORY_DEBUG] = "debug",
66 return partner->identity; in get_pd_identity()
70 return cable->identity; in get_pd_identity()
77 struct typec_port *port = to_typec_port(dev->parent); in get_pd_product_type()
85 if (port->data_role == TYPEC_HOST) in get_pd_product_type()
86 ptype = product_type_ufp[PD_IDH_PTYPE(id->id_header)]; in get_pd_product_type()
88 ptype = product_type_dfp[PD_IDH_DFP_PTYPE(id->id_header)]; in get_pd_product_type()
[all …]
H A Danx7411.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Driver for Analogix ANX7411 USB Type-C and PD controller
339 int mode; in anx7411_detect_power_mode() local
341 ret = anx7411_reg_read(ctx->spi_client, REQUEST_CURRENT); in anx7411_detect_power_mode()
345 ctx->typec.request_current = ret * CURRENT_UNIT; /* 50ma per unit */ in anx7411_detect_power_mode()
347 ret = anx7411_reg_read(ctx->spi_client, REQUEST_VOLTAGE); in anx7411_detect_power_mode()
351 ctx->typec.request_voltage = ret * VOLTAGE_UNIT; /* 100mv per unit */ in anx7411_detect_power_mode()
353 if (ctx->psy_online == ANX7411_PSY_OFFLINE) { in anx7411_detect_power_mode()
354 ctx->psy_online = ANX7411_PSY_FIXED_ONLINE; in anx7411_detect_power_mode()
355 ctx->usb_type = POWER_SUPPLY_USB_TYPE_PD; in anx7411_detect_power_mode()
[all …]
/linux/drivers/usb/typec/tcpm/
H A Dtcpm.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright 2015-2017 Google, Inc
213 VDM_STATE_ERR_BUSY = -3,
214 VDM_STATE_ERR_SEND = -2,
215 VDM_STATE_ERR_TMOUT = -1,
244 * Based on "Table 6-14 Fixed Supply PDO - Sink" of "USB Power Delivery Specification Revision 3.0,
267 /* Alternate mode support */
293 * @active: PPS mode is active
506 /* Alternate mode data */
537 * SNK_READY for non-pd link.
[all …]