drivers/intel/pmc_mux: Rename con driver to conn

For historical reasons, Windows has issues with certain names being
used for files and directories, 'con' or 'CON' being one of
them. Therefore, rename the pmc_mux/con driver to pmc_mux/conn in
order to work around this issue.

TEST=built volteer (only user of this driver as of now)

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ia78dc4efe647c96a7169a3b95fc3b8944d052c83
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43090
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
This commit is contained in:
Tim Wawrzynczak 2020-07-03 09:36:11 -06:00
parent 54be395a9b
commit e414ce4532
8 changed files with 32 additions and 32 deletions

View File

@ -1,2 +1,2 @@
subdirs-y += con
subdirs-y += conn
ramstage-$(CONFIG_DRIVERS_INTEL_PMC) += mux.c

View File

@ -1 +0,0 @@
ramstage-$(CONFIG_DRIVERS_INTEL_PMC) += con.c

View File

@ -0,0 +1 @@
ramstage-$(CONFIG_DRIVERS_INTEL_PMC) += conn.c

View File

@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __DRIVERS_INTEL_PMC_MUX_CON_H__
#define __DRIVERS_INTEL_PMC_MUX_CON_H__
#ifndef __DRIVERS_INTEL_PMC_MUX_CONN_H__
#define __DRIVERS_INTEL_PMC_MUX_CONN_H__
enum typec_orientation {
/* The orientation of the signal follows the orientation of the CC lines. */
@ -12,7 +12,7 @@ enum typec_orientation {
TYPEC_ORIENTATION_REVERSE,
};
struct drivers_intel_pmc_mux_con_config {
struct drivers_intel_pmc_mux_conn_config {
/* 1-based port numbers (from SoC point of view) */
int usb2_port_number;
/* 1-based port numbers (from SoC point of view) */
@ -23,4 +23,4 @@ struct drivers_intel_pmc_mux_con_config {
enum typec_orientation hsl_orientation;
};
#endif /* __DRIVERS_INTEL_PMC_MUX_CON_H__ */
#endif /* __DRIVERS_INTEL_PMC_MUX_CONN_H__ */

View File

@ -5,7 +5,7 @@
#include <intelblocks/acpi.h>
#include "chip.h"
static const char *con_acpi_name(const struct device *dev)
static const char *conn_acpi_name(const struct device *dev)
{
static char name[5];
snprintf(name, sizeof(name), "CON%1X", dev->path.generic.id);
@ -25,9 +25,9 @@ static const char *orientation_to_str(enum typec_orientation ori)
}
}
static void con_fill_ssdt(const struct device *dev)
static void conn_fill_ssdt(const struct device *dev)
{
struct drivers_intel_pmc_mux_con_config *config = dev->chip_info;
struct drivers_intel_pmc_mux_conn_config *config = dev->chip_info;
struct acpi_dp *dsd;
const char *scope;
const char *name;
@ -72,19 +72,19 @@ static void con_fill_ssdt(const struct device *dev)
dev_path(dev));
}
static struct device_operations con_dev_ops = {
static struct device_operations conn_dev_ops = {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.acpi_name = con_acpi_name,
.acpi_fill_ssdt = con_fill_ssdt,
.acpi_name = conn_acpi_name,
.acpi_fill_ssdt = conn_fill_ssdt,
};
static void con_enable(struct device *dev)
static void conn_enable(struct device *dev)
{
dev->ops = &con_dev_ops;
dev->ops = &conn_dev_ops;
}
struct chip_operations drivers_intel_pmc_mux_con_ops = {
CHIP_NAME("Intel PMC MUX CON Driver")
.enable_dev = con_enable,
struct chip_operations drivers_intel_pmc_mux_conn_ops = {
CHIP_NAME("Intel PMC MUX CONN Driver")
.enable_dev = conn_enable,
};

View File

@ -124,17 +124,17 @@ static void add_port_location(struct acpi_dp *dsd, int port_number)
port_location_to_str(port_caps.port_location));
}
static int con_id_to_match;
static int conn_id_to_match;
/* A callback to match a port's connector for dev_find_matching_device_on_bus */
static bool match_connector(DEVTREE_CONST struct device *dev)
{
if (CONFIG(DRIVERS_INTEL_PMC)) {
extern struct chip_operations drivers_intel_pmc_mux_con_ops;
extern struct chip_operations drivers_intel_pmc_mux_conn_ops;
return (dev->chip_ops == &drivers_intel_pmc_mux_con_ops &&
return (dev->chip_ops == &drivers_intel_pmc_mux_conn_ops &&
dev->path.type == DEVICE_PATH_GENERIC &&
dev->path.generic.id == con_id_to_match);
dev->path.generic.id == conn_id_to_match);
}
return false;
@ -148,7 +148,7 @@ static void fill_ssdt_typec_device(const struct device *dev)
struct device *usb3_port;
struct device *usb4_port;
const struct device *mux;
const struct device *con;
const struct device *conn;
if (google_chromeec_get_num_pd_ports(&num_ports))
return;
@ -165,11 +165,11 @@ static void fill_ssdt_typec_device(const struct device *dev)
continue;
/* Get the MUX device, and find the matching connector on its bus */
con = NULL;
conn = NULL;
mux = soc_get_pmc_mux_device(i);
if (mux) {
con_id_to_match = i;
con = dev_find_matching_device_on_bus(mux->link_list, match_connector);
conn_id_to_match = i;
conn = dev_find_matching_device_on_bus(mux->link_list, match_connector);
}
usb2_port = NULL;
@ -184,9 +184,9 @@ static void fill_ssdt_typec_device(const struct device *dev)
.usb2_port = usb2_port,
.usb3_port = usb3_port,
.usb4_port = usb4_port,
.orientation_switch = con,
.usb_role_switch = con,
.mode_switch = con,
.orientation_switch = conn,
.usb_role_switch = conn,
.mode_switch = conn,
};
acpigen_write_typec_connector(&config, i, add_port_location);

View File

@ -145,13 +145,13 @@ chip soc/intel/tigerlake
# PMC.MUX device in the ACPI hierarchy.
chip drivers/intel/pmc_mux
device generic 0 on
chip drivers/intel/pmc_mux/con
chip drivers/intel/pmc_mux/conn
register "usb2_port_number" = "9"
register "usb3_port_number" = "1"
# SBU & HSL follow CC
device generic 0 on end
end
chip drivers/intel/pmc_mux/con
chip drivers/intel/pmc_mux/conn
register "usb2_port_number" = "4"
register "usb3_port_number" = "2"
# SBU is fixed, HSL follows CC

View File

@ -145,13 +145,13 @@ chip soc/intel/tigerlake
# PMC.MUX device in the ACPI hierarchy.
chip drivers/intel/pmc_mux
device generic 0 on
chip drivers/intel/pmc_mux/con
chip drivers/intel/pmc_mux/conn
register "usb2_port_number" = "9"
register "usb3_port_number" = "1"
# SBU & HSL follow CC
device generic 0 on end
end
chip drivers/intel/pmc_mux/con
chip drivers/intel/pmc_mux/conn
register "usb2_port_number" = "4"
register "usb3_port_number" = "2"
# SBU is fixed, HSL follows CC