Lines Matching refs:wm831x
26 struct wm831x *wm831x; in wm831x_spi_probe() local
41 wm831x = devm_kzalloc(&spi->dev, sizeof(struct wm831x), GFP_KERNEL); in wm831x_spi_probe()
42 if (wm831x == NULL) in wm831x_spi_probe()
47 spi_set_drvdata(spi, wm831x); in wm831x_spi_probe()
48 wm831x->dev = &spi->dev; in wm831x_spi_probe()
49 wm831x->type = type; in wm831x_spi_probe()
51 wm831x->regmap = devm_regmap_init_spi(spi, &wm831x_regmap_config); in wm831x_spi_probe()
52 if (IS_ERR(wm831x->regmap)) { in wm831x_spi_probe()
53 ret = PTR_ERR(wm831x->regmap); in wm831x_spi_probe()
54 dev_err(wm831x->dev, "Failed to allocate register map: %d\n", in wm831x_spi_probe()
60 memcpy(&wm831x->pdata, pdata, sizeof(*pdata)); in wm831x_spi_probe()
62 return wm831x_device_init(wm831x, spi->irq); in wm831x_spi_probe()
67 struct wm831x *wm831x = dev_get_drvdata(dev); in wm831x_spi_suspend() local
69 return wm831x_device_suspend(wm831x); in wm831x_spi_suspend()
74 struct wm831x *wm831x = dev_get_drvdata(dev); in wm831x_spi_poweroff() local
76 wm831x_device_shutdown(wm831x); in wm831x_spi_poweroff()