ASoC: codec: tpa6130a2: Remove tpa6130a2_platform_data

There is no in-tree user to create the device using platform data
'struct tpa6130a2_platform_data', so drop the dead code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20250414-asoc-tpa6130a2-v1-2-5f4052e656a0@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Peng Fan 2025-04-14 16:34:24 +08:00 committed by Mark Brown
parent b194e82b28
commit 63a9362c71
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
3 changed files with 1 additions and 31 deletions

View File

@ -23890,7 +23890,6 @@ F: Documentation/devicetree/bindings/sound/ti,tlv320*.yaml
F: Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml
F: include/sound/tas2*.h
F: include/sound/tlv320*.h
F: include/sound/tpa6130a2-plat.h
F: sound/pci/hda/tas2781_hda_i2c.c
F: sound/soc/codecs/pcm1681.c
F: sound/soc/codecs/pcm1789*.*

View File

@ -1,17 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* TPA6130A2 driver platform header
*
* Copyright (C) Nokia Corporation
*
* Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
*/
#ifndef TPA6130A2_PLAT_H
#define TPA6130A2_PLAT_H
struct tpa6130a2_platform_data {
int power_gpio;
};
#endif

View File

@ -19,7 +19,6 @@
#include <linux/slab.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#include <sound/tpa6130a2-plat.h>
#include "tpa6130a2.h"
@ -209,18 +208,10 @@ static const struct regmap_config tpa6130a2_regmap_config = {
.cache_type = REGCACHE_RBTREE,
};
static const struct i2c_device_id tpa6130a2_id[] = {
{ "tpa6130a2", TPA6130A2 },
{ "tpa6140a2", TPA6140A2 },
{ }
};
MODULE_DEVICE_TABLE(i2c, tpa6130a2_id);
static int tpa6130a2_probe(struct i2c_client *client)
{
struct device *dev;
struct tpa6130a2_data *data;
struct tpa6130a2_platform_data *pdata = client->dev.platform_data;
struct device_node *np = client->dev.of_node;
const char *regulator;
unsigned int version;
@ -238,9 +229,7 @@ static int tpa6130a2_probe(struct i2c_client *client)
if (IS_ERR(data->regmap))
return PTR_ERR(data->regmap);
if (pdata) {
data->power_gpio = pdata->power_gpio;
} else if (np) {
if (np) {
data->power_gpio = of_get_named_gpio(np, "power-gpio", 0);
} else {
dev_err(dev, "Platform data not set\n");
@ -318,7 +307,6 @@ static struct i2c_driver tpa6130a2_i2c_driver = {
.of_match_table = of_match_ptr(tpa6130a2_of_match),
},
.probe = tpa6130a2_probe,
.id_table = tpa6130a2_id,
};
module_i2c_driver(tpa6130a2_i2c_driver);