Lines Matching refs:wm831x
29 struct wm831x *wm831x; in wm831x_i2c_probe() local
44 wm831x = devm_kzalloc(&i2c->dev, sizeof(struct wm831x), GFP_KERNEL); in wm831x_i2c_probe()
45 if (wm831x == NULL) in wm831x_i2c_probe()
48 i2c_set_clientdata(i2c, wm831x); in wm831x_i2c_probe()
49 wm831x->dev = &i2c->dev; in wm831x_i2c_probe()
50 wm831x->type = type; in wm831x_i2c_probe()
52 wm831x->regmap = devm_regmap_init_i2c(i2c, &wm831x_regmap_config); in wm831x_i2c_probe()
53 if (IS_ERR(wm831x->regmap)) { in wm831x_i2c_probe()
54 ret = PTR_ERR(wm831x->regmap); in wm831x_i2c_probe()
55 dev_err(wm831x->dev, "Failed to allocate register map: %d\n", in wm831x_i2c_probe()
61 memcpy(&wm831x->pdata, pdata, sizeof(*pdata)); in wm831x_i2c_probe()
63 return wm831x_device_init(wm831x, i2c->irq); in wm831x_i2c_probe()
68 struct wm831x *wm831x = dev_get_drvdata(dev); in wm831x_i2c_suspend() local
70 return wm831x_device_suspend(wm831x); in wm831x_i2c_suspend()
75 struct wm831x *wm831x = dev_get_drvdata(dev); in wm831x_i2c_poweroff() local
77 wm831x_device_shutdown(wm831x); in wm831x_i2c_poweroff()