Lines Matching defs:mode
49 struct histb_combphy_mode mode;
73 static int is_mode_fixed(struct histb_combphy_mode *mode)
75 return (mode->fixed != PHY_NONE) ? true : false;
80 struct histb_combphy_mode *mode = &priv->mode;
84 if (is_mode_fixed(mode))
87 switch (mode->select) {
101 return regmap_update_bits(syscon, mode->reg, mode->mask,
102 hw_sel << mode->shift);
168 struct histb_combphy_mode *mode = &priv->mode;
175 mode->select = args->args[0];
177 if (mode->select < PHY_TYPE_SATA || mode->select > PHY_TYPE_USB3) {
178 dev_err(dev, "invalid phy mode select argument\n");
182 if (is_mode_fixed(mode) && mode->select != mode->fixed) {
183 dev_err(dev, "mode select %d mismatch fixed phy mode %d\n",
184 mode->select, mode->fixed);
197 struct histb_combphy_mode *mode;
217 mode = &priv->mode;
218 mode->fixed = PHY_NONE;
220 ret = of_property_read_u32(np, "hisilicon,fixed-mode", &mode->fixed);
222 dev_dbg(dev, "found fixed phy mode %d\n", mode->fixed);
224 ret = of_property_read_u32_array(np, "hisilicon,mode-select-bits",
227 if (is_mode_fixed(mode)) {
228 dev_err(dev, "found select bits for fixed mode phy\n");
232 mode->reg = vals[0];
233 mode->shift = vals[1];
234 mode->mask = vals[2];
235 dev_dbg(dev, "found mode select bits\n");
237 if (!is_mode_fixed(mode)) {