summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/max98373-i2c.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2023-09-11 11:23:50 +0300
committerMark Brown <broonie@kernel.org>2023-09-11 14:50:07 +0300
commitd3091d09de46e7ea88fa943efd458094e6a6ceb6 (patch)
tree42bcd5526589ee7fe1422d5817b999ce5f20aad1 /sound/soc/codecs/max98373-i2c.c
parent02de898322869442cf6d6f4ba8f22cbdc5889f4b (diff)
downloadlinux-d3091d09de46e7ea88fa943efd458094e6a6ceb6.tar.xz
ASoC: max98373: Convert to use GPIO descriptors
Instead of relying on legacy interfaces, convert the driver to use GPIO descriptors. This is a straight-forward conversion, we support also sdw devices providing GPIO descriptor tables if they so desire. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230911-descriptors-asoc-max-v2-3-b9d793fb768e@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/max98373-i2c.c')
-rw-r--r--sound/soc/codecs/max98373-i2c.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/sound/soc/codecs/max98373-i2c.c b/sound/soc/codecs/max98373-i2c.c
index 0fa5ceca62a2..e7ec7875c4a9 100644
--- a/sound/soc/codecs/max98373-i2c.c
+++ b/sound/soc/codecs/max98373-i2c.c
@@ -3,12 +3,10 @@
#include <linux/acpi.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/of.h>
-#include <linux/of_gpio.h>
#include <linux/pm.h>
#include <linux/regmap.h>
#include <linux/slab.h>
@@ -560,21 +558,6 @@ static int max98373_i2c_probe(struct i2c_client *i2c)
/* voltage/current slot & gpio configuration */
max98373_slot_config(&i2c->dev, max98373);
- /* Power on device */
- if (gpio_is_valid(max98373->reset_gpio)) {
- ret = devm_gpio_request(&i2c->dev, max98373->reset_gpio,
- "MAX98373_RESET");
- if (ret) {
- dev_err(&i2c->dev, "%s: Failed to request gpio %d\n",
- __func__, max98373->reset_gpio);
- return -EINVAL;
- }
- gpio_direction_output(max98373->reset_gpio, 0);
- msleep(50);
- gpio_direction_output(max98373->reset_gpio, 1);
- msleep(20);
- }
-
/* Check Revision ID */
ret = regmap_read(max98373->regmap,
MAX98373_R21FF_REV_ID, &reg);