• Home
  • Raw
  • Download

Lines Matching full:mode

52 	struct histb_combphy_mode mode;  member
76 static int is_mode_fixed(struct histb_combphy_mode *mode) in is_mode_fixed() argument
78 return (mode->fixed != PHY_NONE) ? true : false; in is_mode_fixed()
83 struct histb_combphy_mode *mode = &priv->mode; in histb_combphy_set_mode() local
87 if (is_mode_fixed(mode)) in histb_combphy_set_mode()
90 switch (mode->select) { in histb_combphy_set_mode()
104 return regmap_update_bits(syscon, mode->reg, mode->mask, in histb_combphy_set_mode()
105 hw_sel << mode->shift); in histb_combphy_set_mode()
171 struct histb_combphy_mode *mode = &priv->mode; in histb_combphy_xlate() local
178 mode->select = args->args[0]; in histb_combphy_xlate()
180 if (mode->select < PHY_TYPE_SATA || mode->select > PHY_TYPE_USB3) { in histb_combphy_xlate()
181 dev_err(dev, "invalid phy mode select argument\n"); in histb_combphy_xlate()
185 if (is_mode_fixed(mode) && mode->select != mode->fixed) { in histb_combphy_xlate()
186 dev_err(dev, "mode select %d mismatch fixed phy mode %d\n", in histb_combphy_xlate()
187 mode->select, mode->fixed); in histb_combphy_xlate()
200 struct histb_combphy_mode *mode; in histb_combphy_probe() local
222 mode = &priv->mode; in histb_combphy_probe()
223 mode->fixed = PHY_NONE; in histb_combphy_probe()
225 ret = of_property_read_u32(np, "hisilicon,fixed-mode", &mode->fixed); in histb_combphy_probe()
227 dev_dbg(dev, "found fixed phy mode %d\n", mode->fixed); in histb_combphy_probe()
229 ret = of_property_read_u32_array(np, "hisilicon,mode-select-bits", in histb_combphy_probe()
232 if (is_mode_fixed(mode)) { in histb_combphy_probe()
233 dev_err(dev, "found select bits for fixed mode phy\n"); in histb_combphy_probe()
237 mode->reg = vals[0]; in histb_combphy_probe()
238 mode->shift = vals[1]; in histb_combphy_probe()
239 mode->mask = vals[2]; in histb_combphy_probe()
240 dev_dbg(dev, "found mode select bits\n"); in histb_combphy_probe()
242 if (!is_mode_fixed(mode)) { in histb_combphy_probe()