| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * wm831x-spi.c -- SPI access for Wolfson WM831x PMICs |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright 2009,2010 Wolfson Microelectronics PLC. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 9 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 10 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 11 | | - * option) any later version. |
|---|
| 12 | | - * |
|---|
| 13 | 8 | */ |
|---|
| 14 | 9 | |
|---|
| 15 | 10 | #include <linux/kernel.h> |
|---|
| 16 | | -#include <linux/module.h> |
|---|
| 11 | +#include <linux/init.h> |
|---|
| 17 | 12 | #include <linux/of.h> |
|---|
| 18 | 13 | #include <linux/of_device.h> |
|---|
| 19 | 14 | #include <linux/pm.h> |
|---|
| .. | .. |
|---|
| 67 | 62 | return wm831x_device_init(wm831x, spi->irq); |
|---|
| 68 | 63 | } |
|---|
| 69 | 64 | |
|---|
| 70 | | -static int wm831x_spi_remove(struct spi_device *spi) |
|---|
| 71 | | -{ |
|---|
| 72 | | - struct wm831x *wm831x = spi_get_drvdata(spi); |
|---|
| 73 | | - |
|---|
| 74 | | - wm831x_device_exit(wm831x); |
|---|
| 75 | | - |
|---|
| 76 | | - return 0; |
|---|
| 77 | | -} |
|---|
| 78 | | - |
|---|
| 79 | 65 | static int wm831x_spi_suspend(struct device *dev) |
|---|
| 80 | 66 | { |
|---|
| 81 | 67 | struct wm831x *wm831x = dev_get_drvdata(dev); |
|---|
| .. | .. |
|---|
| 108 | 94 | { "wm8326", WM8326 }, |
|---|
| 109 | 95 | { }, |
|---|
| 110 | 96 | }; |
|---|
| 111 | | -MODULE_DEVICE_TABLE(spi, wm831x_spi_ids); |
|---|
| 112 | 97 | |
|---|
| 113 | 98 | static struct spi_driver wm831x_spi_driver = { |
|---|
| 114 | 99 | .driver = { |
|---|
| 115 | 100 | .name = "wm831x", |
|---|
| 116 | 101 | .pm = &wm831x_spi_pm, |
|---|
| 117 | 102 | .of_match_table = of_match_ptr(wm831x_of_match), |
|---|
| 103 | + .suppress_bind_attrs = true, |
|---|
| 118 | 104 | }, |
|---|
| 119 | 105 | .id_table = wm831x_spi_ids, |
|---|
| 120 | 106 | .probe = wm831x_spi_probe, |
|---|
| 121 | | - .remove = wm831x_spi_remove, |
|---|
| 122 | 107 | }; |
|---|
| 123 | 108 | |
|---|
| 124 | 109 | static int __init wm831x_spi_init(void) |
|---|
| .. | .. |
|---|
| 132 | 117 | return 0; |
|---|
| 133 | 118 | } |
|---|
| 134 | 119 | subsys_initcall(wm831x_spi_init); |
|---|
| 135 | | - |
|---|
| 136 | | -static void __exit wm831x_spi_exit(void) |
|---|
| 137 | | -{ |
|---|
| 138 | | - spi_unregister_driver(&wm831x_spi_driver); |
|---|
| 139 | | -} |
|---|
| 140 | | -module_exit(wm831x_spi_exit); |
|---|
| 141 | | - |
|---|
| 142 | | -MODULE_DESCRIPTION("SPI support for WM831x/2x AudioPlus PMICs"); |
|---|
| 143 | | -MODULE_LICENSE("GPL"); |
|---|
| 144 | | -MODULE_AUTHOR("Mark Brown"); |
|---|