[PATCH v2 0/2] Remove reset GPIO for AW88261
The AW88261 chip doesn't have a reset gpio, so remove it from the bindings and from the driver.
Signed-off-by: Luca Weiss luca.weiss@fairphone.com --- Changes in v2: - Include dt-bindings change - Link to v1: https://lore.kernel.org/r/20230929-aw88261-reset-v1-1-fcbce194a823@fairphone...
--- Luca Weiss (2): ASoC: dt-bindings: awinic,aw88395: Remove reset-gpios from AW88261 ASoC: codecs: aw88261: Remove non-existing reset gpio
.../devicetree/bindings/sound/awinic,aw88395.yaml | 16 ++++++++++++---- sound/soc/codecs/aw88261.c | 15 --------------- 2 files changed, 12 insertions(+), 19 deletions(-) --- base-commit: df964ce9ef9fea10cf131bf6bad8658fde7956f6 change-id: 20230929-aw88261-reset-7e00d9e25952
Best regards,
The AW88261 chip doesn't have a reset GPIO, so disallow providing reset-gpios.
At the same time also don't keep reset-gpios required for AW88395. This is both because the Linux driver has it optional, and it also simplifies the bindings by not introducing another conditional.
Signed-off-by: Luca Weiss luca.weiss@fairphone.com --- .../devicetree/bindings/sound/awinic,aw88395.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml b/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml index b977d3de87cb..5d5ebc72b721 100644 --- a/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml +++ b/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml @@ -14,9 +14,6 @@ description: digital Smart K audio amplifier with an integrated 10.25V smart boost convert.
-allOf: - - $ref: dai-common.yaml# - properties: compatible: enum: @@ -49,9 +46,20 @@ required: - compatible - reg - '#sound-dai-cells' - - reset-gpios - awinic,audio-channel
+allOf: + - $ref: dai-common.yaml# + - if: + properties: + compatible: + contains: + enum: + - awinic,aw88261 + then: + properties: + reset-gpios: false + unevaluatedProperties: false
examples:
According to the AW88261 datasheet (V1.1) and device schematics I have access to, there is no reset gpio present on the AW88261. Remove it.
Signed-off-by: Luca Weiss luca.weiss@fairphone.com --- sound/soc/codecs/aw88261.c | 15 --------------- 1 file changed, 15 deletions(-)
diff --git a/sound/soc/codecs/aw88261.c b/sound/soc/codecs/aw88261.c index 45eaf931a69c..e7683f70c2ef 100644 --- a/sound/soc/codecs/aw88261.c +++ b/sound/soc/codecs/aw88261.c @@ -10,7 +10,6 @@
#include <linux/i2c.h> #include <linux/firmware.h> -#include <linux/of_gpio.h> #include <linux/regmap.h> #include <sound/soc.h> #include "aw88261.h" @@ -1175,14 +1174,6 @@ static const struct snd_soc_component_driver soc_codec_dev_aw88261 = { .remove = aw88261_codec_remove, };
-static void aw88261_hw_reset(struct aw88261 *aw88261) -{ - gpiod_set_value_cansleep(aw88261->reset_gpio, 0); - usleep_range(AW88261_1000_US, AW88261_1000_US + 10); - gpiod_set_value_cansleep(aw88261->reset_gpio, 1); - usleep_range(AW88261_1000_US, AW88261_1000_US + 10); -} - static void aw88261_parse_channel_dt(struct aw88261 *aw88261) { struct aw_device *aw_dev = aw88261->aw_pa; @@ -1254,12 +1245,6 @@ static int aw88261_i2c_probe(struct i2c_client *i2c)
i2c_set_clientdata(i2c, aw88261);
- aw88261->reset_gpio = devm_gpiod_get_optional(&i2c->dev, "reset", GPIOD_OUT_LOW); - if (IS_ERR(aw88261->reset_gpio)) - dev_info(&i2c->dev, "reset gpio not defined\n"); - else - aw88261_hw_reset(aw88261); - aw88261->regmap = devm_regmap_init_i2c(i2c, &aw88261_remap_config); if (IS_ERR(aw88261->regmap)) { ret = PTR_ERR(aw88261->regmap);
On Mon, 02 Oct 2023 16:00:10 +0200, Luca Weiss wrote:
The AW88261 chip doesn't have a reset gpio, so remove it from the bindings and from the driver.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: dt-bindings: awinic,aw88395: Remove reset-gpios from AW88261 commit: c7b94e8614e35f1919b51c23fe590884149ae341 [2/2] ASoC: codecs: aw88261: Remove non-existing reset gpio commit: 4eed047b76fa8f56af478ca7e6d56ca7e5330cf2
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (1)
-
Luca Weiss
-
Mark Brown