Commit 1e1f2663 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Mark Brown

ASoC: ssm2518: drop support for platform data

There are currently no users of this driver's platform data in the
mainline kernel, so let's drop it.

Newer devices should use DT, ACPI, or static software properties to
describe the hardware.
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20220920025804.1788667-1-dmitry.torokhov@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent d508260e
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* SSM2518 amplifier audio driver
*
* Copyright 2013 Analog Devices Inc.
* Author: Lars-Peter Clausen <lars@metafoo.de>
*/
#ifndef __LINUX_PLATFORM_DATA_SSM2518_H__
#define __LINUX_PLATFORM_DATA_SSM2518_H__
/**
* struct ssm2518_platform_data - Platform data for the ssm2518 driver
* @enable_gpio: GPIO connected to the nSD pin. Set to -1 if the nSD pin is
* hardwired.
*/
struct ssm2518_platform_data {
int enable_gpio;
};
#endif
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/of_gpio.h> #include <linux/of_gpio.h>
#include <linux/platform_data/ssm2518.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/pcm.h> #include <sound/pcm.h>
#include <sound/pcm_params.h> #include <sound/pcm_params.h>
...@@ -736,7 +735,6 @@ static const struct regmap_config ssm2518_regmap_config = { ...@@ -736,7 +735,6 @@ static const struct regmap_config ssm2518_regmap_config = {
static int ssm2518_i2c_probe(struct i2c_client *i2c) static int ssm2518_i2c_probe(struct i2c_client *i2c)
{ {
struct ssm2518_platform_data *pdata = i2c->dev.platform_data;
struct ssm2518 *ssm2518; struct ssm2518 *ssm2518;
int ret; int ret;
...@@ -744,9 +742,7 @@ static int ssm2518_i2c_probe(struct i2c_client *i2c) ...@@ -744,9 +742,7 @@ static int ssm2518_i2c_probe(struct i2c_client *i2c)
if (ssm2518 == NULL) if (ssm2518 == NULL)
return -ENOMEM; return -ENOMEM;
if (pdata) { if (i2c->dev.of_node) {
ssm2518->enable_gpio = pdata->enable_gpio;
} else if (i2c->dev.of_node) {
ssm2518->enable_gpio = of_get_gpio(i2c->dev.of_node, 0); ssm2518->enable_gpio = of_get_gpio(i2c->dev.of_node, 0);
if (ssm2518->enable_gpio < 0 && ssm2518->enable_gpio != -ENOENT) if (ssm2518->enable_gpio < 0 && ssm2518->enable_gpio != -ENOENT)
return ssm2518->enable_gpio; return ssm2518->enable_gpio;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment