18 #define GOOGLE_CHROMEEC_USBC_DEVICE_HID "GOOG0014"
19 #define GOOGLE_CHROMEEC_USBC_DEVICE_NAME "USBC"
64 if (
config->use_custom_pld)
65 group_token =
config->custom_pld.group.token;
67 group_token =
config->group.token;
68 if (group_token != (port_number + 1))
71 switch (
port->path.usb.port_type) {
93 switch (port_location) {
107 return "RIGHT_FRONT";
141 if (
config->use_custom_pld)
142 *pld =
config->custom_pld;
153 unsigned int num_ports = 0;
161 if (rv || num_ports == 0)
166 if (rv || pcap_mask == 0)
173 "USB Type-C Control");
175 for (i = 0; i < num_ports; ++i) {
195 .orientation_switch =
config->mux_conn[i],
196 .usb_role_switch =
config->mux_conn[i],
197 .mode_switch =
config->mux_conn[i],
277 if (
CONFIG(DRIVERS_INTEL_DPTF))
286 return "\\_SB_.PCI0.LPCB.EC0_.RFWU";
const char * acpi_device_path(const struct device *dev)
struct acpi_dp * acpi_dp_add_string(struct acpi_dp *dp, const char *name, const char *string)
void acpigen_emit_namestring(const char *namepath)
void acpigen_write_store(void)
void acpigen_pop_len(void)
void acpigen_write_scope(const char *name)
void acpigen_write_byte(unsigned int data)
void acpigen_write_device(const char *name)
void acpigen_write_name_string(const char *name, const char *string)
void acpigen_ps2_keyboard_dsd(const char *scope, uint8_t num_top_row_keys, enum ps2_action_key action_keys[], bool can_send_function_keys, bool has_numeric_keypad, bool has_scrnlock_key)
@ PS2_KEY_PRIVACY_SCRN_TOGGLE
@ PS2_KEY_KBD_BKLIGHT_TOGGLE
@ PS2_KEY_KBD_BKLIGHT_DOWN
@ PS2_KEY_BRIGHTNESS_DOWN
void acpigen_write_typec_connector(const struct typec_connector_class_config *config, int port_number, add_custom_dsd_property_cb add_custom_dsd_property)
#define printk(level,...)
struct device * alloc_find_dev(struct bus *parent, struct device_path *path)
See if a device structure already exists and if not allocate it.
DEVTREE_CONST struct device * dev_find_path(DEVTREE_CONST struct device *prev_match, enum device_path_type path_type)
Given a Device Path Type, find the device structure.
int google_chromeec_get_pd_port_caps(int port, struct usb_pd_port_caps *port_caps)
Get role-based capabilities for a USB-PD port.
int google_chromeec_get_cmd_versions(int command, uint32_t *pmask)
Get available versions of the specified command.
int google_chromeec_get_num_pd_ports(unsigned int *num_ports)
Get number of PD-capable USB ports from EC.
int google_chromeec_get_keybd_config(struct ec_response_keybd_config *keybd)
Get the keyboard configuration / layout information from EC.
void ec_retimer_fw_update(uint8_t data)
#define GOOGLE_CHROMEEC_USBC_DEVICE_NAME
static const char * port_location_to_str(enum ec_pd_port_location port_location)
static struct device_operations ec_ops
static void fill_ssdt_typec_device(const struct device *dev)
static const char * ec_acpi_name(const struct device *dev)
const char * ec_retimer_fw_update_path(void)
static void fill_ssdt_ps2_keyboard(const struct device *dev)
static void add_port_location(struct acpi_dp *dsd, int port_number)
void google_chromeec_fill_ssdt_generator(const struct device *dev)
const char * google_chromeec_acpi_name(const struct device *dev)
static void get_pld_from_usb_ports(struct acpi_pld *pld, struct device *usb2_port, struct device *usb3_port, struct device *usb4_port)
#define GOOGLE_CHROMEEC_USBC_DEVICE_HID
static void get_usb_port_references(int port_number, struct device **usb2_port, struct device **usb3_port, struct device **usb4_port)
static struct usb_pd_port_caps port_caps
static enum ps2_action_key ps2_enum_val[]
#define KEYBD_CAP_NUMERIC_KEYPAD
#define EC_CMD_GET_PD_PORT_CAPS
#define KEYBD_CAP_SCRNLOCK_KEY
@ EC_PD_PORT_LOCATION_FRONT
@ EC_PD_PORT_LOCATION_RIGHT
@ EC_PD_PORT_LOCATION_UNKNOWN
@ EC_PD_PORT_LOCATION_RIGHT_BACK
@ EC_PD_PORT_LOCATION_BACK_RIGHT
@ EC_PD_PORT_LOCATION_LEFT
@ EC_PD_PORT_LOCATION_LEFT_BACK
@ EC_PD_PORT_LOCATION_LEFT_FRONT
@ EC_PD_PORT_LOCATION_BACK
@ EC_PD_PORT_LOCATION_BACK_LEFT
@ EC_PD_PORT_LOCATION_RIGHT_FRONT
#define KEYBD_CAP_FUNCTION_KEYS
void ec_fill_dptf_helpers(const struct device *ec)
@ UPC_TYPE_C_USB2_SS_SWITCH
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
int acpi_pld_fill_usb(struct acpi_pld *pld, enum acpi_upc_type type, struct acpi_pld_group *group)
struct generic_path generic
enum device_path_type type
struct device_operations * ops
DEVTREE_CONST struct bus * bus
DEVTREE_CONST void * chip_info
uint8_t action_keys[MAX_TOP_ROW_KEYS]
Configuration required to write out a Type-C Connector ACPI object.
const struct acpi_pld * pld
const struct device * usb2_port
const struct device * usb3_port
const struct device * usb4_port
enum usb_typec_power_role power_role
enum ec_pd_power_role_caps power_role_cap
enum ec_pd_try_power_role_caps try_power_role_cap
enum ec_pd_port_location port_location
enum ec_pd_data_role_caps data_role_cap