tunnel_reg
u8 drv_id = tunnel_reg(regs, DP_USB4_DRIVER_ID) & DP_USB4_DRIVER_ID_MASK;
u8 group_id = tunnel_reg(regs, DP_IN_ADAPTER_TUNNEL_INFORMATION) & DP_GROUP_ID_MASK;
int gr = tunnel_reg(regs, DP_BW_GRANULARITY) & DP_BW_GRANULARITY_MASK;
u8 bw_code = tunnel_reg(regs, DP_TUNNELING_MAX_LINK_RATE);
return tunnel_reg(regs, DP_TUNNELING_MAX_LANE_COUNT) &
if ((tunnel_reg(regs, DP_TUNNELING_CAPABILITIES) & cap_mask) != cap_mask)
return tunnel_reg(regs, DP_USB4_DRIVER_BW_CAPABILITY) &
return tunnel_reg(regs, DP_DPTX_BW_ALLOCATION_MODE_CONTROL) &
tunnel->adapter_id = tunnel_reg(regs, DP_IN_ADAPTER_INFO) & DP_IN_ADAPTER_NUMBER_MASK;
tunnel->allocated_bw = tunnel_reg(regs, DP_ALLOCATED_BW) *
tunnel->pr_optimization_support = tunnel_reg(regs, DP_TUNNELING_CAPABILITIES) &
if (tunnel_reg(regs, DP_ALLOCATED_BW)) {
if (tunnel_reg(regs, DP_ALLOCATED_BW) > tunnel_reg(regs, DP_ESTIMATED_BW)) {
DPTUN_BW_ARG(tunnel_reg(regs, DP_ALLOCATED_BW) *
DPTUN_BW_ARG(tunnel_reg(regs, DP_ESTIMATED_BW) *
tunnel_reg(regs, DP_ALLOCATED_BW) * tunnel->bw_granularity) {
DPTUN_BW_ARG(tunnel_reg(regs, DP_ALLOCATED_BW) * tunnel->bw_granularity));
if (!(tunnel_reg(®s, DP_TUNNELING_CAPABILITIES) &
(tunnel_reg(®s, DP_TUNNELING_HW_REV) & DP_TUNNELING_HW_REV_MAJOR_MASK) >>
(tunnel_reg(®s, DP_TUNNELING_HW_REV) & DP_TUNNELING_HW_REV_MINOR_MASK) >>
tunnel_reg(®s, DP_TUNNELING_SW_REV_MAJOR),
tunnel_reg(®s, DP_TUNNELING_SW_REV_MINOR),
str_yes_no(tunnel_reg(®s, DP_TUNNELING_CAPABILITIES) &
tunnel->estimated_bw = tunnel_reg(regs, DP_ESTIMATED_BW) * tunnel->bw_granularity;