Skip to contentSkip to conversation

ASoC: Drop or replace of_gpio.h

PATCH Superseded Andy Shevchenko 4 participants 12 messages May 30, 2024 – May 31, 2024

Subsystems (10)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#7 lore raw

PATCH 3/6 ASoC: rockchip: Remove unused of_gpio.h

In reply to Andy Shevchenko

of_gpio.h is deprecated and subject to remove. The drivers in question don't use it, simply remove the unused header.

---
 sound/soc/rockchip/rockchip_i2s.c   | 1 -
 sound/soc/rockchip/rockchip_spdif.c | 1 -
 2 files changed, 2 deletions(-)
sound/soc/rockchip/rockchip_i2s.c +0 -1
index b0c3ef030e06..b378f870b3ad 100644
@@ -11,7 +11,6 @@
 #include <linux/mfd/syscon.h>
 #include <linux/delay.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/clk.h>
 #include <linux/pinctrl/consumer.h>
 #include <linux/pm_runtime.h>
sound/soc/rockchip/rockchip_spdif.c +0 -1
index 1a24b78e9e02..eb9d5dee196e 100644
@@ -11,7 +11,6 @@
 
 #include <linux/module.h>
 #include <linux/delay.h>
-#include <linux/of_gpio.h>
 #include <linux/clk.h>
 #include <linux/pm_runtime.h>
 #include <linux/mfd/syscon.h>
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#6 lore raw

PATCH 2/6 ASoC: fsl: Remove unused of_gpio.h

In reply to Andy Shevchenko

of_gpio.h is deprecated and subject to remove. The drivers in question don't use it, simply remove the unused header.

---
 sound/soc/fsl/imx-es8328.c | 1 -
 sound/soc/fsl/imx-rpmsg.c  | 2 --
 2 files changed, 3 deletions(-)
sound/soc/fsl/imx-es8328.c +0 -1
index 5b9648f3b087..3ef92f6dfc6b 100644
@@ -8,7 +8,6 @@
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/i2c.h>
-#include <linux/of_gpio.h>
 #include <sound/soc.h>
 #include <sound/jack.h>
 
sound/soc/fsl/imx-rpmsg.c +0 -2
index 0f1ad7ad7d27..ce98d2288193 100644
@@ -5,9 +5,7 @@
 #include <linux/of_platform.h>
 #include <linux/of_reserved_mem.h>
 #include <linux/i2c.h>
-#include <linux/of_gpio.h>
 #include <linux/slab.h>
-#include <linux/gpio.h>
 #include <linux/clk.h>
 #include <sound/soc.h>
 #include <sound/jack.h>
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#8 lore raw

PATCH 4/6 ASoC: codecs: Replace of_gpio.h by proper one

In reply to Andy Shevchenko

of_gpio.h is deprecated and subject to remove.
The driver doesn't use it directly, replace it
with what is really being used.

---
 sound/soc/codecs/aw88395/aw88395.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/aw88395/aw88395.c +1 -1
index 3c459a67ad0c..be6ebcb51cca 100644
@@ -8,9 +8,9 @@
 // Author: Weidong Wang <[email protected]>
 //
 
+#include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/firmware.h>
-#include <linux/of_gpio.h>
 #include <linux/regmap.h>
 #include <sound/soc.h>
 #include "aw88395.h"
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#0 lore raw

cover ASoC: Drop or replace of_gpio.h

Replace or drop the legacy header that is subject to remove. Not all of them were compile-tested, the series might have hidden compilation errors.

Andy Shevchenko (6):
ASoC: codecs: Remove unused of_gpio.h
ASoC: fsl: Remove unused of_gpio.h
ASoC: rockchip: Remove unused of_gpio.h
ASoC: codecs: Replace of_gpio.h by proper one
ASoC: generic: Replace of_gpio.h by proper one
ASoC: samsung: Replace of_gpio.h by proper one

 sound/soc/codecs/ak4118.c                           | 1 -
 sound/soc/codecs/ak4458.c                           | 1 -
 sound/soc/codecs/aw88395/aw88395.c                  | 2 +-
 sound/soc/codecs/aw88399.c                          | 1 -
 sound/soc/codecs/cs53l30.c                          | 1 -
 sound/soc/codecs/max98390.c                         | 1 -
 sound/soc/codecs/pcm3168a.c                         | 1 -
 sound/soc/codecs/rk817_codec.c                      | 1 -
 sound/soc/codecs/tas2552.c                          | 1 -
 sound/soc/codecs/tas2764.c                          | 1 -
 sound/soc/codecs/tas2770.c                          | 1 -
 sound/soc/codecs/tas2780.c                          | 1 -
 sound/soc/codecs/tas2781-comlib.c                   | 1 -
 sound/soc/codecs/tas2781-fmwlib.c                   | 1 -
 sound/soc/codecs/tas2781-i2c.c                      | 1 -
 sound/soc/codecs/tlv320adc3xxx.c                    | 1 -
 sound/soc/codecs/tlv320adcx140.c                    | 1 -
 sound/soc/codecs/tlv320aic31xx.c                    | 1 -
 sound/soc/codecs/ts3a227e.c                         | 1 -
 sound/soc/codecs/wsa883x.c                          | 1 -
 sound/soc/fsl/imx-es8328.c                          | 1 -
 sound/soc/fsl/imx-rpmsg.c                           | 2 --
 sound/soc/generic/audio-graph-card2-custom-sample.c | 3 ++-
 sound/soc/rockchip/rockchip_i2s.c                   | 1 -
 sound/soc/rockchip/rockchip_spdif.c                 | 1 -
 sound/soc/samsung/aries_wm8994.c                    | 2 +-
 26 files changed, 4 insertions(+), 27 deletions(-)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#1 lore raw

PATCH 1/6 ASoC: codecs: Remove unused of_gpio.h

of_gpio.h is deprecated and subject to remove. The drivers in question don't use it, simply remove the unused header.

---
 sound/soc/codecs/ak4118.c         | 1 -
 sound/soc/codecs/ak4458.c         | 1 -
 sound/soc/codecs/aw88399.c        | 1 -
 sound/soc/codecs/cs53l30.c        | 1 -
 sound/soc/codecs/max98390.c       | 1 -
 sound/soc/codecs/pcm3168a.c       | 1 -
 sound/soc/codecs/rk817_codec.c    | 1 -
 sound/soc/codecs/tas2552.c        | 1 -
 sound/soc/codecs/tas2764.c        | 1 -
 sound/soc/codecs/tas2770.c        | 1 -
 sound/soc/codecs/tas2780.c        | 1 -
 sound/soc/codecs/tas2781-comlib.c | 1 -
 sound/soc/codecs/tas2781-fmwlib.c | 1 -
 sound/soc/codecs/tas2781-i2c.c    | 1 -
 sound/soc/codecs/tlv320adc3xxx.c  | 1 -
 sound/soc/codecs/tlv320adcx140.c  | 1 -
 sound/soc/codecs/tlv320aic31xx.c  | 1 -
 sound/soc/codecs/ts3a227e.c       | 1 -
 sound/soc/codecs/wsa883x.c        | 1 -
 19 files changed, 19 deletions(-)
sound/soc/codecs/ak4118.c +0 -1
index 9a43235e6a11..23e868e4e3fb 100644
@@ -9,7 +9,6 @@
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
 
sound/soc/codecs/ak4458.c +0 -1
index 73cf482f104f..32cb802ad635 100644
@@ -10,7 +10,6 @@
 #include <linux/i2c.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/pm_runtime.h>
 #include <linux/regulator/consumer.h>
 #include <linux/reset.h>
sound/soc/codecs/aw88399.c +0 -1
index 9fcb805bf971..23e50d73b4c4 100644
@@ -10,7 +10,6 @@
 #include <linux/crc32.h>
 #include <linux/i2c.h>
 #include <linux/firmware.h>
-#include <linux/of_gpio.h>
 #include <linux/regmap.h>
 #include <sound/soc.h>
 #include "aw88399.h"
sound/soc/codecs/cs53l30.c +0 -1
index c0893146423b..2ee13d885fdc 100644
@@ -12,7 +12,6 @@
 #include <linux/delay.h>
 #include <linux/i2c.h>
 #include <linux/module.h>
-#include <linux/of_gpio.h>
 #include <linux/gpio/consumer.h>
 #include <linux/regulator/consumer.h>
 #include <sound/pcm_params.h>
sound/soc/codecs/max98390.c +0 -1
index 57fa2db1e148..1bae253618fd 100644
@@ -13,7 +13,6 @@
 #include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/module.h>
-#include <linux/of_gpio.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
 #include <linux/time.h>
sound/soc/codecs/pcm3168a.c +0 -1
index 9d6431338fb7..3c0e0fdbfc5c 100644
@@ -11,7 +11,6 @@
 #include <linux/delay.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
-#include <linux/of_gpio.h>
 #include <linux/pm_runtime.h>
 #include <linux/regulator/consumer.h>
 
sound/soc/codecs/rk817_codec.c +0 -1
index d4da98469f8b..5fea600bc3a4 100644
@@ -10,7 +10,6 @@
 #include <linux/mfd/rk808.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <sound/core.h>
sound/soc/codecs/tas2552.c +0 -1
index a7ed59ec49a6..9e68afc09897 100644
@@ -13,7 +13,6 @@
 #include <linux/device.h>
 #include <linux/i2c.h>
 #include <linux/gpio.h>
-#include <linux/of_gpio.h>
 #include <linux/pm_runtime.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
sound/soc/codecs/tas2764.c +0 -1
index 1dc719d726ab..5eaddf07aadc 100644
@@ -15,7 +15,6 @@
 #include <linux/regulator/consumer.h>
 #include <linux/regmap.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/slab.h>
 #include <sound/soc.h>
 #include <sound/pcm.h>
sound/soc/codecs/tas2770.c +0 -1
index 67bc1c8b0131..5601fba17c96 100644
@@ -20,7 +20,6 @@
 #include <linux/firmware.h>
 #include <linux/regmap.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/slab.h>
 #include <sound/soc.h>
 #include <sound/pcm.h>
sound/soc/codecs/tas2780.c +0 -1
index a18ccf5fb7ad..6902bfef185b 100644
@@ -11,7 +11,6 @@
 #include <linux/gpio/consumer.h>
 #include <linux/regmap.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <sound/soc.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
sound/soc/codecs/tas2781-comlib.c +0 -1
index 3aa81514dad7..2eb3b384f9e7 100644
@@ -14,7 +14,6 @@
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/of_irq.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
sound/soc/codecs/tas2781-fmwlib.c +0 -1
index 265a8ca25cbb..d6afab542da7 100644
@@ -13,7 +13,6 @@
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/of_irq.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
sound/soc/codecs/tas2781-i2c.c +0 -1
index 9350972dfefe..c9086fe42419 100644
@@ -21,7 +21,6 @@
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/of_irq.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
sound/soc/codecs/tlv320adc3xxx.c +0 -1
index e100cc9f5c19..eb180df9a72a 100644
@@ -25,7 +25,6 @@
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
 #include <linux/cdev.h>
-#include <linux/of_gpio.h>
 #include <linux/slab.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
sound/soc/codecs/tlv320adcx140.c +0 -1
index 41342b340680..d594bf166c0e 100644
@@ -12,7 +12,6 @@
 #include <linux/regulator/consumer.h>
 #include <linux/acpi.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/slab.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
sound/soc/codecs/tlv320aic31xx.c +0 -1
index 4d7c5a80c6ed..2f94cfda0e33 100644
@@ -23,7 +23,6 @@
 #include <linux/regulator/consumer.h>
 #include <linux/acpi.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/slab.h>
 #include <sound/core.h>
 #include <sound/jack.h>
sound/soc/codecs/ts3a227e.c +0 -1
index dbf448dd8864..b9eb59e3bfa0 100644
@@ -10,7 +10,6 @@
 #include <linux/init.h>
 #include <linux/input.h>
 #include <linux/module.h>
-#include <linux/of_gpio.h>
 #include <linux/regmap.h>
 #include <linux/acpi.h>
 
sound/soc/codecs/wsa883x.c +0 -1
index a2e86ef7d18f..8abce2160d65 100644
@@ -9,7 +9,6 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_gpio.h>
 #include <linux/pm_runtime.h>
 #include <linux/printk.h>
 #include <linux/regmap.h>
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#11 lore raw

PATCH 6/6 ASoC: samsung: Replace of_gpio.h by proper one

In reply to Andy Shevchenko

of_gpio.h is deprecated and subject to remove.
The driver doesn't use it directly, replace it
with what is really being used.

---
 sound/soc/samsung/aries_wm8994.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/samsung/aries_wm8994.c +1 -1
index a548ac33dd94..01716df0c842 100644
@@ -1,11 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0+
 #include <linux/extcon.h>
+#include <linux/gpio/consumer.h>
 #include <linux/iio/consumer.h>
 #include <linux/input-event-codes.h>
 #include <linux/mfd/wm8994/registers.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/regulator/consumer.h>
 #include <sound/jack.h>
 #include <sound/pcm_params.h>
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#9 lore raw

PATCH 5/6 ASoC: generic: Replace of_gpio.h by proper one

In reply to Andy Shevchenko

of_gpio.h is deprecated and subject to remove.
The driver doesn't use it directly, replace it
with what is really being used.

---
 sound/soc/generic/audio-graph-card2-custom-sample.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/generic/audio-graph-card2-custom-sample.c +2 -1
index 1b6ccd2de964..8e5a51098490 100644
@@ -5,8 +5,9 @@
 // Copyright (C) 2020 Renesas Electronics Corp.
 // Copyright (C) 2020 Kuninori Morimoto <[email protected]>
 //
+#include <linux/device.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/of_gpio.h>
 #include <linux/platform_device.h>
 #include <sound/graph_card.h>
 
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
maintainer Acked-by on v1 5/6
#10 lore raw

Re: [PATCH v1 5/6] ASoC: generic: Replace of_gpio.h by proper one

Hi

Quoted 6 lines

of_gpio.h is deprecated and subject to remove.
The driver doesn't use it directly, replace it
with what is really being used.

---

Quoted 21 lines
 sound/soc/generic/audio-graph-card2-custom-sample.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/generic/audio-graph-card2-custom-sample.c +2 -1
index 1b6ccd2de964..8e5a51098490 100644
@@ -5,8 +5,9 @@
 // Copyright (C) 2020 Renesas Electronics Corp.
 // Copyright (C) 2020 Kuninori Morimoto <[email protected]>
 //
+#include <linux/device.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/of_gpio.h>
 #include <linux/platform_device.h>
 #include <sound/graph_card.h>
 
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
maintainer Reviewed-by on v1 1/6
#2 lore raw

Re: [PATCH v1 1/6] ASoC: codecs: Remove unused of_gpio.h

In reply to Andy Shevchenko

Hi

Quoted 17 lines

of_gpio.h is deprecated and subject to remove. The drivers in question don't use it, simply remove the unused header.

---
 sound/soc/codecs/ak4118.c         | 1 -
 sound/soc/codecs/ak4458.c         | 1 -
 sound/soc/codecs/aw88399.c        | 1 -
 sound/soc/codecs/cs53l30.c        | 1 -
 sound/soc/codecs/max98390.c       | 1 -
 sound/soc/codecs/pcm3168a.c       | 1 -
 sound/soc/codecs/rk817_codec.c    | 1 -
 sound/soc/codecs/tas2552.c        | 1 -
 sound/soc/codecs/tas2764.c        | 1 -
 sound/soc/codecs/tas2770.c        | 1 -
 sound/soc/codecs/tas2780.c        | 1 -
 sound/soc/codecs/tas2781-comlib.c | 1 -
Quoted 8 lines
 sound/soc/codecs/tas2781-fmwlib.c | 1 -
 sound/soc/codecs/tas2781-i2c.c    | 1 -
 sound/soc/codecs/tlv320adc3xxx.c  | 1 -
 sound/soc/codecs/tlv320adcx140.c  | 1 -
 sound/soc/codecs/tlv320aic31xx.c  | 1 -
 sound/soc/codecs/ts3a227e.c       | 1 -
 sound/soc/codecs/wsa883x.c        | 1 -
 19 files changed, 19 deletions(-)

For pcm3168a

Quoted 231 lines
sound/soc/codecs/ak4118.c +0 -1
index 9a43235e6a11..23e868e4e3fb 100644
@@ -9,7 +9,6 @@
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
 
sound/soc/codecs/ak4458.c +0 -1
index 73cf482f104f..32cb802ad635 100644
@@ -10,7 +10,6 @@
 #include <linux/i2c.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/pm_runtime.h>
 #include <linux/regulator/consumer.h>
 #include <linux/reset.h>
sound/soc/codecs/aw88399.c +0 -1
index 9fcb805bf971..23e50d73b4c4 100644
@@ -10,7 +10,6 @@
 #include <linux/crc32.h>
 #include <linux/i2c.h>
 #include <linux/firmware.h>
-#include <linux/of_gpio.h>
 #include <linux/regmap.h>
 #include <sound/soc.h>
 #include "aw88399.h"
sound/soc/codecs/cs53l30.c +0 -1
index c0893146423b..2ee13d885fdc 100644
@@ -12,7 +12,6 @@
 #include <linux/delay.h>
 #include <linux/i2c.h>
 #include <linux/module.h>
-#include <linux/of_gpio.h>
 #include <linux/gpio/consumer.h>
 #include <linux/regulator/consumer.h>
 #include <sound/pcm_params.h>
sound/soc/codecs/max98390.c +0 -1
index 57fa2db1e148..1bae253618fd 100644
@@ -13,7 +13,6 @@
 #include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/module.h>
-#include <linux/of_gpio.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
 #include <linux/time.h>
sound/soc/codecs/pcm3168a.c +0 -1
index 9d6431338fb7..3c0e0fdbfc5c 100644
@@ -11,7 +11,6 @@
 #include <linux/delay.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
-#include <linux/of_gpio.h>
 #include <linux/pm_runtime.h>
 #include <linux/regulator/consumer.h>
 
sound/soc/codecs/rk817_codec.c +0 -1
index d4da98469f8b..5fea600bc3a4 100644
@@ -10,7 +10,6 @@
 #include <linux/mfd/rk808.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <sound/core.h>
sound/soc/codecs/tas2552.c +0 -1
index a7ed59ec49a6..9e68afc09897 100644
@@ -13,7 +13,6 @@
 #include <linux/device.h>
 #include <linux/i2c.h>
 #include <linux/gpio.h>
-#include <linux/of_gpio.h>
 #include <linux/pm_runtime.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
sound/soc/codecs/tas2764.c +0 -1
index 1dc719d726ab..5eaddf07aadc 100644
@@ -15,7 +15,6 @@
 #include <linux/regulator/consumer.h>
 #include <linux/regmap.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/slab.h>
 #include <sound/soc.h>
 #include <sound/pcm.h>
sound/soc/codecs/tas2770.c +0 -1
index 67bc1c8b0131..5601fba17c96 100644
@@ -20,7 +20,6 @@
 #include <linux/firmware.h>
 #include <linux/regmap.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/slab.h>
 #include <sound/soc.h>
 #include <sound/pcm.h>
sound/soc/codecs/tas2780.c +0 -1
index a18ccf5fb7ad..6902bfef185b 100644
@@ -11,7 +11,6 @@
 #include <linux/gpio/consumer.h>
 #include <linux/regmap.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <sound/soc.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
sound/soc/codecs/tas2781-comlib.c +0 -1
index 3aa81514dad7..2eb3b384f9e7 100644
@@ -14,7 +14,6 @@
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/of_irq.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
sound/soc/codecs/tas2781-fmwlib.c +0 -1
index 265a8ca25cbb..d6afab542da7 100644
@@ -13,7 +13,6 @@
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/of_irq.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
sound/soc/codecs/tas2781-i2c.c +0 -1
index 9350972dfefe..c9086fe42419 100644
@@ -21,7 +21,6 @@
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/of_irq.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
sound/soc/codecs/tlv320adc3xxx.c +0 -1
index e100cc9f5c19..eb180df9a72a 100644
@@ -25,7 +25,6 @@
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
 #include <linux/cdev.h>
-#include <linux/of_gpio.h>
 #include <linux/slab.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
sound/soc/codecs/tlv320adcx140.c +0 -1
index 41342b340680..d594bf166c0e 100644
@@ -12,7 +12,6 @@
 #include <linux/regulator/consumer.h>
 #include <linux/acpi.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/slab.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
sound/soc/codecs/tlv320aic31xx.c +0 -1
index 4d7c5a80c6ed..2f94cfda0e33 100644
@@ -23,7 +23,6 @@
 #include <linux/regulator/consumer.h>
 #include <linux/acpi.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/slab.h>
 #include <sound/core.h>
 #include <sound/jack.h>
sound/soc/codecs/ts3a227e.c +0 -1
index dbf448dd8864..b9eb59e3bfa0 100644
@@ -10,7 +10,6 @@
 #include <linux/init.h>
 #include <linux/input.h>
 #include <linux/module.h>
-#include <linux/of_gpio.h>
 #include <linux/regmap.h>
 #include <linux/acpi.h>
 
sound/soc/codecs/wsa883x.c +0 -1
index a2e86ef7d18f..8abce2160d65 100644
@@ -9,7 +9,6 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_gpio.h>
 #include <linux/pm_runtime.h>
 #include <linux/printk.h>
 #include <linux/regmap.h>
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#3 lore raw

Re: [PATCH v1 1/6] ASoC: codecs: Remove unused of_gpio.h

In reply to Andy Shevchenko
kernel test robot noticed the following build errors:

Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on broonie-sound/for-next]
[also build test ERROR on shawnguo/for-next rockchip/for-next linus/master v6.10-rc1 next-20240529] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/ASoC-codecs-Remove-unused-of_gpio-h/20240531-070350
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link:    https://lore.kernel.org/r/20240530230037.1156253-2-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 1/6] ASoC: codecs: Remove unused of_gpio.h
config: i386-buildonly-randconfig-006-20240531 (https://download.01.org/0day-ci/archive/20240531/[email protected]/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240531/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> sound/soc/codecs/tas2781-comlib.c:408:6: error: call to undeclared function 'gpio_is_valid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     408 |         if (gpio_is_valid(tas_priv->irq_info.irq_gpio))
         |             ^
   sound/soc/codecs/tas2781-comlib.c:408:6: note: did you mean 'uuid_is_valid'?
   include/linux/uuid.h:102:19: note: 'uuid_is_valid' declared here
     102 | bool __must_check uuid_is_valid(const char *uuid);
         |                   ^
>> sound/soc/codecs/tas2781-comlib.c:409:3: error: call to undeclared function 'gpio_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     409 |                 gpio_free(tas_priv->irq_info.irq_gpio);
         |                 ^

sound/soc/codecs/tas2781-comlib.c:409:3: note: did you mean 'pmd_free'? include/asm-generic/pgtable-nopmd.h:63:20: note: 'pmd_free' declared here
63 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
| ^
2 errors generated.
--

>> sound/soc/codecs/tas2781-i2c.c:664:6: error: call to undeclared function 'gpio_is_valid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     664 |         if (gpio_is_valid(tas_priv->irq_info.irq_gpio)) {
         |             ^
   sound/soc/codecs/tas2781-i2c.c:664:6: note: did you mean 'uuid_is_valid'?
   include/linux/uuid.h:102:19: note: 'uuid_is_valid' declared here
     102 | bool __must_check uuid_is_valid(const char *uuid);
         |                   ^
>> sound/soc/codecs/tas2781-i2c.c:665:8: error: call to undeclared function 'gpio_request'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     665 |                 rc = gpio_request(tas_priv->irq_info.irq_gpio,
         |                      ^
>> sound/soc/codecs/tas2781-i2c.c:668:4: error: call to undeclared function 'gpio_direction_input'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     668 |                         gpio_direction_input(
         |                         ^
   sound/soc/codecs/tas2781-i2c.c:668:4: note: did you mean 'gpiod_direction_input'?
   include/linux/gpio/consumer.h:110:5: note: 'gpiod_direction_input' declared here
     110 | int gpiod_direction_input(struct gpio_desc *desc);
         |     ^
>> sound/soc/codecs/tas2781-i2c.c:672:5: error: call to undeclared function 'gpio_to_irq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     672 |                                 gpio_to_irq(tas_priv->irq_info.irq_gpio);
         |                                 ^
   sound/soc/codecs/tas2781-i2c.c:672:5: note: did you mean 'gpiod_to_irq'?
   include/linux/gpio/consumer.h:167:5: note: 'gpiod_to_irq' declared here
     167 | int gpiod_to_irq(const struct gpio_desc *desc);
         |     ^

4 errors generated.

vim +/gpio_is_valid +408 sound/soc/codecs/tas2781-comlib.c

ef3bcde75d06d6 Shenghao Ding 2023-06-18  405  
ef3bcde75d06d6 Shenghao Ding 2023-06-18  406  void tasdevice_remove(struct tasdevice_priv *tas_priv)
ef3bcde75d06d6 Shenghao Ding 2023-06-18  407  {
ef3bcde75d06d6 Shenghao Ding 2023-06-18 @408  	if (gpio_is_valid(tas_priv->irq_info.irq_gpio))
ef3bcde75d06d6 Shenghao Ding 2023-06-18 @409  		gpio_free(tas_priv->irq_info.irq_gpio);
ef3bcde75d06d6 Shenghao Ding 2023-06-18  410  	mutex_destroy(&tas_priv->codec_lock);
ef3bcde75d06d6 Shenghao Ding 2023-06-18  411  }
ef3bcde75d06d6 Shenghao Ding 2023-06-18  412  EXPORT_SYMBOL_GPL(tasdevice_remove);

ef3bcde75d06d6 Shenghao Ding 2023-06-18 413

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#4 lore raw

Re: [PATCH v1 1/6] ASoC: codecs: Remove unused of_gpio.h

Quoted 18 lines · kernel test robot

Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on broonie-sound/for-next]
[also build test ERROR on shawnguo/for-next rockchip/for-next linus/master v6.10-rc1 next-20240529] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/ASoC-codecs-Remove-unused-of_gpio-h/20240531-070350
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link:    https://lore.kernel.org/r/20240530230037.1156253-2-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 1/6] ASoC: codecs: Remove unused of_gpio.h
config: i386-buildonly-randconfig-006-20240531 (https://download.01.org/0day-ci/archive/20240531/[email protected]/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240531/[email protected]/reproduce)
Quoted 4 lines

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

My gosh, the whoever wrote the GPIO code in that driver has no clue what they are doing. It's a pure mess.

Signature · 2 lines
With Best Regards,
Andy Shevchenko