mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 21:39:35 -04:00
Replace the #include of <linux/mod_devicetable.h> by the more specific <linux/device-id/*.h> where applicable. For most cases the include can be dropped completely, only a few drivers need one or two headers added. Acked-by: Danilo Krummrich <dakr@kernel.org> Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/1a3f2007c5c5dcf555c09a4035ce3ae8ef1b6c49.1782808461.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
49 lines
1.2 KiB
C
49 lines
1.2 KiB
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* ADAU1977/ADAU1978/ADAU1979 driver
|
|
*
|
|
* Copyright 2014 Analog Devices Inc.
|
|
* Author: Lars-Peter Clausen <lars@metafoo.de>
|
|
*/
|
|
|
|
#include <linux/i2c.h>
|
|
#include <linux/module.h>
|
|
#include <linux/regmap.h>
|
|
#include <sound/soc.h>
|
|
|
|
#include "adau1977.h"
|
|
|
|
static int adau1977_i2c_probe(struct i2c_client *client)
|
|
{
|
|
struct regmap_config config;
|
|
|
|
config = adau1977_regmap_config;
|
|
config.val_bits = 8;
|
|
config.reg_bits = 8;
|
|
|
|
return adau1977_probe(&client->dev,
|
|
devm_regmap_init_i2c(client, &config),
|
|
(uintptr_t)i2c_get_match_data(client), NULL);
|
|
}
|
|
|
|
static const struct i2c_device_id adau1977_i2c_ids[] = {
|
|
{ .name = "adau1977", .driver_data = ADAU1977 },
|
|
{ .name = "adau1978", .driver_data = ADAU1978 },
|
|
{ .name = "adau1979", .driver_data = ADAU1978 },
|
|
{ }
|
|
};
|
|
MODULE_DEVICE_TABLE(i2c, adau1977_i2c_ids);
|
|
|
|
static struct i2c_driver adau1977_i2c_driver = {
|
|
.driver = {
|
|
.name = "adau1977",
|
|
},
|
|
.probe = adau1977_i2c_probe,
|
|
.id_table = adau1977_i2c_ids,
|
|
};
|
|
module_i2c_driver(adau1977_i2c_driver);
|
|
|
|
MODULE_DESCRIPTION("ASoC ADAU1977/ADAU1978/ADAU1979 driver");
|
|
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
|
|
MODULE_LICENSE("GPL");
|