thunderbolt: Expand controller name in tb_switch_is_xy()

For a casual reader tb_switch_is_cr() does not tell much so instead
spell out the full controller name in the function name. For example
tb_switch_is_cr() becomes tb_switch_is_cactus_ridge() which is easier
to understand.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
Mika Westerberg 2019-10-08 16:42:47 +03:00
parent 0d46c08d1e
commit 17a8f815a0
3 changed files with 9 additions and 9 deletions

View File

@ -33,9 +33,9 @@ static int tb_port_enable_tmu(struct tb_port *port, bool enable)
* Legacy devices need to have TMU access enabled before port
* space can be fully accessed.
*/
if (tb_switch_is_lr(sw))
if (tb_switch_is_light_ridge(sw))
offset = 0x26;
else if (tb_switch_is_er(sw))
else if (tb_switch_is_eagle_ridge(sw))
offset = 0x2a;
else
return 0;
@ -60,7 +60,7 @@ static void tb_port_dummy_read(struct tb_port *port)
* reading stale data on next read perform one dummy read after
* port capabilities are walked.
*/
if (tb_switch_is_lr(port->sw)) {
if (tb_switch_is_light_ridge(port->sw)) {
u32 dummy;
tb_port_read(port, &dummy, TB_CFG_PORT, 0, 1);

View File

@ -342,9 +342,9 @@ static struct tb_port *tb_find_pcie_down(struct tb_switch *sw,
* Hard-coded Thunderbolt port to PCIe down port mapping
* per controller.
*/
if (tb_switch_is_cr(sw))
if (tb_switch_is_cactus_ridge(sw))
index = !phy_port ? 6 : 7;
else if (tb_switch_is_fr(sw))
else if (tb_switch_is_falcon_ridge(sw))
index = !phy_port ? 6 : 8;
else
goto out;

View File

@ -576,17 +576,17 @@ static inline struct tb_switch *tb_switch_parent(struct tb_switch *sw)
return tb_to_switch(sw->dev.parent);
}
static inline bool tb_switch_is_lr(const struct tb_switch *sw)
static inline bool tb_switch_is_light_ridge(const struct tb_switch *sw)
{
return sw->config.device_id == PCI_DEVICE_ID_INTEL_LIGHT_RIDGE;
}
static inline bool tb_switch_is_er(const struct tb_switch *sw)
static inline bool tb_switch_is_eagle_ridge(const struct tb_switch *sw)
{
return sw->config.device_id == PCI_DEVICE_ID_INTEL_EAGLE_RIDGE;
}
static inline bool tb_switch_is_cr(const struct tb_switch *sw)
static inline bool tb_switch_is_cactus_ridge(const struct tb_switch *sw)
{
switch (sw->config.device_id) {
case PCI_DEVICE_ID_INTEL_CACTUS_RIDGE_2C:
@ -597,7 +597,7 @@ static inline bool tb_switch_is_cr(const struct tb_switch *sw)
}
}
static inline bool tb_switch_is_fr(const struct tb_switch *sw)
static inline bool tb_switch_is_falcon_ridge(const struct tb_switch *sw)
{
switch (sw->config.device_id) {
case PCI_DEVICE_ID_INTEL_FALCON_RIDGE_2C_BRIDGE: