Lines Matching refs:state
49 static int __set_phy_state(struct exynos_mipi_video_phy *state, in __set_phy_state() argument
61 spin_lock(&state->slock); in __set_phy_state()
63 if (!IS_ERR(state->regmap)) { in __set_phy_state()
64 regmap_read(state->regmap, offset, &val); in __set_phy_state()
69 regmap_write(state->regmap, offset, val); in __set_phy_state()
74 regmap_write(state->regmap, offset, val); in __set_phy_state()
76 addr = state->regs + EXYNOS_MIPI_PHY_CONTROL(id / 2); in __set_phy_state()
93 spin_unlock(&state->slock); in __set_phy_state()
103 struct exynos_mipi_video_phy *state = to_mipi_video_phy(phy_desc); in exynos_mipi_video_phy_power_on() local
105 return __set_phy_state(state, phy_desc->index, 1); in exynos_mipi_video_phy_power_on()
111 struct exynos_mipi_video_phy *state = to_mipi_video_phy(phy_desc); in exynos_mipi_video_phy_power_off() local
113 return __set_phy_state(state, phy_desc->index, 0); in exynos_mipi_video_phy_power_off()
119 struct exynos_mipi_video_phy *state = dev_get_drvdata(dev); in exynos_mipi_video_phy_xlate() local
124 return state->phys[args->args[0]].phy; in exynos_mipi_video_phy_xlate()
135 struct exynos_mipi_video_phy *state; in exynos_mipi_video_phy_probe() local
140 state = devm_kzalloc(dev, sizeof(*state), GFP_KERNEL); in exynos_mipi_video_phy_probe()
141 if (!state) in exynos_mipi_video_phy_probe()
144 state->regmap = syscon_regmap_lookup_by_phandle(dev->of_node, "syscon"); in exynos_mipi_video_phy_probe()
145 if (IS_ERR(state->regmap)) { in exynos_mipi_video_phy_probe()
149 PTR_ERR(state->regmap)); in exynos_mipi_video_phy_probe()
152 state->regs = devm_ioremap_resource(dev, res); in exynos_mipi_video_phy_probe()
153 if (IS_ERR(state->regs)) in exynos_mipi_video_phy_probe()
154 return PTR_ERR(state->regs); in exynos_mipi_video_phy_probe()
157 dev_set_drvdata(dev, state); in exynos_mipi_video_phy_probe()
158 spin_lock_init(&state->slock); in exynos_mipi_video_phy_probe()
168 state->phys[i].phy = phy; in exynos_mipi_video_phy_probe()
169 state->phys[i].index = i; in exynos_mipi_video_phy_probe()
170 phy_set_drvdata(phy, &state->phys[i]); in exynos_mipi_video_phy_probe()