aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs42l52.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/cs42l52.c')
-rw-r--r--sound/soc/codecs/cs42l52.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 460d35547a68..071fc77f2f06 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -50,11 +50,9 @@ struct cs42l52_private {
50 u8 mclksel; 50 u8 mclksel;
51 u32 mclk; 51 u32 mclk;
52 u8 flags; 52 u8 flags;
53#if IS_ENABLED(CONFIG_INPUT)
54 struct input_dev *beep; 53 struct input_dev *beep;
55 struct work_struct beep_work; 54 struct work_struct beep_work;
56 int beep_rate; 55 int beep_rate;
57#endif
58}; 56};
59 57
60static const struct reg_default cs42l52_reg_defaults[] = { 58static const struct reg_default cs42l52_reg_defaults[] = {
@@ -962,7 +960,6 @@ static int cs42l52_resume(struct snd_soc_codec *codec)
962 return 0; 960 return 0;
963} 961}
964 962
965#if IS_ENABLED(CONFIG_INPUT)
966static int beep_rates[] = { 963static int beep_rates[] = {
967 261, 522, 585, 667, 706, 774, 889, 1000, 964 261, 522, 585, 667, 706, 774, 889, 1000,
968 1043, 1200, 1333, 1412, 1600, 1714, 2000, 2182 965 1043, 1200, 1333, 1412, 1600, 1714, 2000, 2182
@@ -1096,15 +1093,6 @@ static void cs42l52_free_beep(struct snd_soc_codec *codec)
1096 snd_soc_update_bits(codec, CS42L52_BEEP_TONE_CTL, 1093 snd_soc_update_bits(codec, CS42L52_BEEP_TONE_CTL,
1097 CS42L52_BEEP_EN_MASK, 0); 1094 CS42L52_BEEP_EN_MASK, 0);
1098} 1095}
1099#else
1100static void cs42l52_init_beep(struct snd_soc_codec *codec)
1101{
1102}
1103
1104static void cs42l52_free_beep(struct snd_soc_codec *codec)
1105{
1106}
1107#endif
1108 1096
1109static int cs42l52_probe(struct snd_soc_codec *codec) 1097static int cs42l52_probe(struct snd_soc_codec *codec)
1110{ 1098{
@@ -1229,8 +1217,10 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client,
1229 } 1217 }
1230 1218
1231 if (cs42l52->pdata.reset_gpio) { 1219 if (cs42l52->pdata.reset_gpio) {
1232 ret = gpio_request_one(cs42l52->pdata.reset_gpio, 1220 ret = devm_gpio_request_one(&i2c_client->dev,
1233 GPIOF_OUT_INIT_HIGH, "CS42L52 /RST"); 1221 cs42l52->pdata.reset_gpio,
1222 GPIOF_OUT_INIT_HIGH,
1223 "CS42L52 /RST");
1234 if (ret < 0) { 1224 if (ret < 0) {
1235 dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n", 1225 dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n",
1236 cs42l52->pdata.reset_gpio, ret); 1226 cs42l52->pdata.reset_gpio, ret);