Lines Matching refs:si

60 	struct si521xx		*si;  member
195 struct si521xx *si = si_clk->si; in si521xx_diff_prepare() local
197 regmap_set_bits(si->regmap, SI521XX_REG_OE(si_clk->reg), si_clk->bit); in si521xx_diff_prepare()
205 struct si521xx *si = si_clk->si; in si521xx_diff_unprepare() local
207 regmap_clear_bits(si->regmap, SI521XX_REG_OE(si_clk->reg), si_clk->bit); in si521xx_diff_unprepare()
218 static int si521xx_get_common_config(struct si521xx *si) in si521xx_get_common_config() argument
220 struct i2c_client *client = si->client; in si521xx_get_common_config()
226 si->pll_amplitude = SI521XX_REG_DA_AMP(SI521XX_REG_DA_AMP_DEFAULT); in si521xx_get_common_config()
237 si->pll_amplitude = SI521XX_REG_DA_AMP(amp); in si521xx_get_common_config()
243 static void si521xx_update_config(struct si521xx *si) in si521xx_update_config() argument
246 if (si->pll_amplitude == SI521XX_REG_DA_AMP(SI521XX_REG_DA_AMP_DEFAULT)) in si521xx_update_config()
249 regmap_update_bits(si->regmap, SI521XX_REG_DA, in si521xx_update_config()
250 SI521XX_REG_DA_AMP_MASK, si->pll_amplitude); in si521xx_update_config()
274 struct si521xx *si = data; in si521xx_of_clk_get() local
277 return &si->clk_dif[idx].hw; in si521xx_of_clk_get()
287 struct si521xx *si; in si521xx_probe() local
293 si = devm_kzalloc(&client->dev, sizeof(*si), GFP_KERNEL); in si521xx_probe()
294 if (!si) in si521xx_probe()
297 i2c_set_clientdata(client, si); in si521xx_probe()
298 si->client = client; in si521xx_probe()
301 ret = si521xx_get_common_config(si); in si521xx_probe()
305 si->regmap = devm_regmap_init(&client->dev, NULL, client, in si521xx_probe()
307 if (IS_ERR(si->regmap)) in si521xx_probe()
308 return dev_err_probe(&client->dev, PTR_ERR(si->regmap), in si521xx_probe()
326 si->clk_dif[i].hw.init = &init; in si521xx_probe()
327 si->clk_dif[i].si = si; in si521xx_probe()
329 si521xx_diff_idx_to_reg_bit(chip_info, i, &si->clk_dif[i]); in si521xx_probe()
331 ret = devm_clk_hw_register(&client->dev, &si->clk_dif[i].hw); in si521xx_probe()
336 ret = devm_of_clk_add_hw_provider(&client->dev, si521xx_of_clk_get, si); in si521xx_probe()
338 si521xx_update_config(si); in si521xx_probe()
345 struct si521xx *si = dev_get_drvdata(dev); in si521xx_suspend() local
347 regcache_cache_only(si->regmap, true); in si521xx_suspend()
348 regcache_mark_dirty(si->regmap); in si521xx_suspend()
355 struct si521xx *si = dev_get_drvdata(dev); in si521xx_resume() local
358 regcache_cache_only(si->regmap, false); in si521xx_resume()
359 ret = regcache_sync(si->regmap); in si521xx_resume()