Lines Matching full:mode

50 	struct histb_combphy_mode mode;  member
74 static int is_mode_fixed(struct histb_combphy_mode *mode) in is_mode_fixed() argument
76 return (mode->fixed != PHY_NONE) ? true : false; in is_mode_fixed()
81 struct histb_combphy_mode *mode = &priv->mode; in histb_combphy_set_mode() local
85 if (is_mode_fixed(mode)) in histb_combphy_set_mode()
88 switch (mode->select) { in histb_combphy_set_mode()
102 return regmap_update_bits(syscon, mode->reg, mode->mask, in histb_combphy_set_mode()
103 hw_sel << mode->shift); in histb_combphy_set_mode()
169 struct histb_combphy_mode *mode = &priv->mode; in histb_combphy_xlate() local
176 mode->select = args->args[0]; in histb_combphy_xlate()
178 if (mode->select < PHY_TYPE_SATA || mode->select > PHY_TYPE_USB3) { in histb_combphy_xlate()
179 dev_err(dev, "invalid phy mode select argument\n"); in histb_combphy_xlate()
183 if (is_mode_fixed(mode) && mode->select != mode->fixed) { in histb_combphy_xlate()
184 dev_err(dev, "mode select %d mismatch fixed phy mode %d\n", in histb_combphy_xlate()
185 mode->select, mode->fixed); in histb_combphy_xlate()
198 struct histb_combphy_mode *mode; in histb_combphy_probe() local
218 mode = &priv->mode; in histb_combphy_probe()
219 mode->fixed = PHY_NONE; in histb_combphy_probe()
221 ret = of_property_read_u32(np, "hisilicon,fixed-mode", &mode->fixed); in histb_combphy_probe()
223 dev_dbg(dev, "found fixed phy mode %d\n", mode->fixed); in histb_combphy_probe()
225 ret = of_property_read_u32_array(np, "hisilicon,mode-select-bits", in histb_combphy_probe()
228 if (is_mode_fixed(mode)) { in histb_combphy_probe()
229 dev_err(dev, "found select bits for fixed mode phy\n"); in histb_combphy_probe()
233 mode->reg = vals[0]; in histb_combphy_probe()
234 mode->shift = vals[1]; in histb_combphy_probe()
235 mode->mask = vals[2]; in histb_combphy_probe()
236 dev_dbg(dev, "found mode select bits\n"); in histb_combphy_probe()
238 if (!is_mode_fixed(mode)) { in histb_combphy_probe()