15 #include <linux/kernel.h>
16 #include <linux/module.h>
44 if (IS_ERR(wm831x->
regmap)) {
45 ret = PTR_ERR(wm831x->
regmap);
46 dev_err(wm831x->
dev,
"Failed to allocate register map: %d\n",
63 static int wm831x_spi_suspend(
struct device *
dev)
70 static void wm831x_spi_shutdown(
struct spi_device *spi)
77 static const struct dev_pm_ops wm831x_spi_pm = {
78 .freeze = wm831x_spi_suspend,
79 .suspend = wm831x_spi_suspend,
100 .id_table = wm831x_spi_ids,
101 .probe = wm831x_spi_probe,
103 .shutdown = wm831x_spi_shutdown,
106 static int __init wm831x_spi_init(
void)
112 pr_err(
"Failed to register WM831x SPI driver: %d\n", ret);
118 static void __exit wm831x_spi_exit(
void)
120 spi_unregister_driver(&wm831x_spi_driver);