Lines Matching refs:wl2868c

72 struct wl2868c {  struct
188 static void wl2868c_reset(struct wl2868c *wl2868c) in wl2868c_reset() argument
190 gpiod_set_value_cansleep(wl2868c->reset_gpio, 0); in wl2868c_reset()
192 gpiod_set_value_cansleep(wl2868c->reset_gpio, 1); in wl2868c_reset()
194 gpiod_set_value_cansleep(wl2868c->reset_gpio, 0); in wl2868c_reset()
204 struct wl2868c *wl2868c; in wl2868c_i2c_probe() local
207 wl2868c = devm_kzalloc(dev, sizeof(struct wl2868c), GFP_KERNEL); in wl2868c_i2c_probe()
208 if (!wl2868c) in wl2868c_i2c_probe()
211 wl2868c->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in wl2868c_i2c_probe()
212 if (IS_ERR(wl2868c->reset_gpio)) { in wl2868c_i2c_probe()
213 ret = PTR_ERR(wl2868c->reset_gpio); in wl2868c_i2c_probe()
218 wl2868c_reset(wl2868c); in wl2868c_i2c_probe()
220 i2c_set_clientdata(client, wl2868c); in wl2868c_i2c_probe()
221 wl2868c->dev = dev; in wl2868c_i2c_probe()
222 wl2868c->regmap = devm_regmap_init_i2c(client, &wl2868c_regmap_config); in wl2868c_i2c_probe()
223 if (IS_ERR(wl2868c->regmap)) { in wl2868c_i2c_probe()
224 ret = PTR_ERR(wl2868c->regmap); in wl2868c_i2c_probe()
230 config.regmap = wl2868c->regmap; in wl2868c_i2c_probe()
248 struct wl2868c *wl2868c = i2c_get_clientdata(client); in wl2868c_regulator_shutdown() local
251 regmap_write(wl2868c->regmap, WL2868C_LDO_EN, 0x80); in wl2868c_regulator_shutdown()
257 struct wl2868c *wl2868c = i2c_get_clientdata(client); in wl2868c_suspend() local
260 regmap_read(wl2868c->regmap, WL2868C_LDO_EN, &wl2868c->ldo_en); in wl2868c_suspend()
261 for (i = 0; i < ARRAY_SIZE(wl2868c->ldo_vout); i++) in wl2868c_suspend()
262 regmap_read(wl2868c->regmap, WL2868C_LDO1_VOUT + i, in wl2868c_suspend()
263 &wl2868c->ldo_vout[i]); in wl2868c_suspend()
271 struct wl2868c *wl2868c = i2c_get_clientdata(client); in wl2868c_resume() local
274 wl2868c_reset(wl2868c); in wl2868c_resume()
275 for (i = 0; i < ARRAY_SIZE(wl2868c->ldo_vout); i++) in wl2868c_resume()
276 regmap_write(wl2868c->regmap, WL2868C_LDO1_VOUT + i, in wl2868c_resume()
277 wl2868c->ldo_vout[i]); in wl2868c_resume()
278 regmap_write(wl2868c->regmap, WL2868C_LDO_EN, wl2868c->ldo_en); in wl2868c_resume()