]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ASoC: codec: cs42l56: Drop cs42l56.h
authorPeng Fan <peng.fan@nxp.com>
Tue, 6 May 2025 07:29:32 +0000 (15:29 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 6 May 2025 13:48:12 +0000 (22:48 +0900)
There is no in-tree user of "include/sound/cs42l56.h", so move
'struct cs42l56_platform_data' to cs42l56.c and remove the header file.
And platform data is mostly for platforms that create
devices non using device tree. CS42L56 is a discontinued product,
there is less possibility that new users will use legacy method
to create devices. So drop cs42l56.h to prepare using GPIOD API.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20250506-csl42x-v3-2-e9496db544c4@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/cs42l56.h [deleted file]
sound/soc/codecs/cs42l56.c

diff --git a/include/sound/cs42l56.h b/include/sound/cs42l56.h
deleted file mode 100644 (file)
index 62e9f7a..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * linux/sound/cs42l56.h -- Platform data for CS42L56
- *
- * Copyright (c) 2014 Cirrus Logic Inc.
- */
-
-#ifndef __CS42L56_H
-#define __CS42L56_H
-
-struct cs42l56_platform_data {
-
-       /* GPIO for Reset */
-       unsigned int gpio_nreset;
-
-       /* MICBIAS Level. Check datasheet Pg48 */
-       unsigned int micbias_lvl;
-
-       /* Analog Input 1A Reference 0=Single 1=Pseudo-Differential */
-       unsigned int ain1a_ref_cfg;
-
-       /* Analog Input 2A Reference 0=Single 1=Pseudo-Differential */
-       unsigned int ain2a_ref_cfg;
-
-       /* Analog Input 1B Reference 0=Single 1=Pseudo-Differential */
-       unsigned int ain1b_ref_cfg;
-
-       /* Analog Input 2B Reference 0=Single 1=Pseudo-Differential */
-       unsigned int ain2b_ref_cfg;
-
-       /* Charge Pump Freq. Check datasheet Pg62 */
-       unsigned int chgfreq;
-
-       /* HighPass Filter Right Channel Corner Frequency */
-       unsigned int hpfb_freq;
-
-       /* HighPass Filter Left Channel Corner Frequency */
-       unsigned int hpfa_freq;
-
-       /* Adaptive Power Control for LO/HP */
-       unsigned int adaptive_pwr;
-
-};
-
-#endif /* __CS42L56_H */
index 0201206518cd9ea8ecfb823a96fb59cae37c36f4..9c58d4f08692871c5baf2702c73367287735cf24 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/slab.h>
 #include <linux/workqueue.h>
 #include <sound/core.h>
-#include <sound/cs42l56.h>
 #include <sound/initval.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include "cs42l56.h"
 
 #define CS42L56_NUM_SUPPLIES 3
+
+struct cs42l56_platform_data {
+       /* GPIO for Reset */
+       unsigned int gpio_nreset;
+
+       /* MICBIAS Level. Check datasheet Pg48 */
+       unsigned int micbias_lvl;
+
+       /* Analog Input 1A Reference 0=Single 1=Pseudo-Differential */
+       unsigned int ain1a_ref_cfg;
+
+       /* Analog Input 2A Reference 0=Single 1=Pseudo-Differential */
+       unsigned int ain2a_ref_cfg;
+
+       /* Analog Input 1B Reference 0=Single 1=Pseudo-Differential */
+       unsigned int ain1b_ref_cfg;
+
+       /* Analog Input 2B Reference 0=Single 1=Pseudo-Differential */
+       unsigned int ain2b_ref_cfg;
+
+       /* Charge Pump Freq. Check datasheet Pg62 */
+       unsigned int chgfreq;
+
+       /* HighPass Filter Right Channel Corner Frequency */
+       unsigned int hpfb_freq;
+
+       /* HighPass Filter Left Channel Corner Frequency */
+       unsigned int hpfa_freq;
+
+       /* Adaptive Power Control for LO/HP */
+       unsigned int adaptive_pwr;
+};
+
 static const char *const cs42l56_supply_names[CS42L56_NUM_SUPPLIES] = {
        "VA",
        "VCP",
@@ -1169,8 +1201,6 @@ static int cs42l56_handle_of_data(struct i2c_client *i2c_client,
 static int cs42l56_i2c_probe(struct i2c_client *i2c_client)
 {
        struct cs42l56_private *cs42l56;
-       struct cs42l56_platform_data *pdata =
-               dev_get_platdata(&i2c_client->dev);
        int ret, i;
        unsigned int devid;
        unsigned int alpha_rev, metal_rev;
@@ -1188,15 +1218,10 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client)
                return ret;
        }
 
-       if (pdata) {
-               cs42l56->pdata = *pdata;
-       } else {
-               if (i2c_client->dev.of_node) {
-                       ret = cs42l56_handle_of_data(i2c_client,
-                                                    &cs42l56->pdata);
-                       if (ret != 0)
-                               return ret;
-               }
+       if (i2c_client->dev.of_node) {
+               ret = cs42l56_handle_of_data(i2c_client, &cs42l56->pdata);
+               if (ret != 0)
+                       return ret;
        }
 
        if (cs42l56->pdata.gpio_nreset) {