Skip to contentSkip to conversation

ASoC: rt712: add GPIOs for LED control

PATCH In review [email protected] 2 participants 2 messages Sep 17 – Sep 23

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ASoC: rt712: add GPIOs for LED control

From: Shuming Fan <[email protected]>

Certain platforms use the RT712 GPIOs to control the microphone mute LED and speaker mute LED. This patch lets the LED subsystem to handle the GPIO control.

---
 sound/soc/codecs/rt712-sdca-sdw.c |   1 +
 sound/soc/codecs/rt712-sdca-sdw.h |   3 +
 sound/soc/codecs/rt712-sdca.c     | 136 ++++++++++++++++++++++++++++++
 sound/soc/codecs/rt712-sdca.h     |   6 ++
 4 files changed, 146 insertions(+)
sound/soc/codecs/rt712-sdca-sdw.c +1 -0
index edba0367d9ce..f2f91dd087bf 100644
@@ -395,6 +395,7 @@ static void rt712_sdca_sdw_remove(struct sdw_slave *slave)
 
 	mutex_destroy(&rt712->calibrate_mutex);
 	mutex_destroy(&rt712->disable_irq_lock);
+	mutex_destroy(&rt712->gc_lock);
 }
 
 static const struct sdw_device_id rt712_sdca_id[] = {
sound/soc/codecs/rt712-sdca-sdw.h +3 -0
index 7ad25cc27f62..162d62234b68 100644
@@ -46,6 +46,9 @@ static const struct reg_default rt712_sdca_mbq_defaults[] = {
 	{ 0x5b00029, 0x3fff },
 	{ 0x5b0002a, 0xf000 },
 	{ 0x6100000, 0x04e4 },
+	{ 0x6100009, 0x0000 },
+	{ 0x610000a, 0x0000 },
+	{ 0x610000b, 0x0020 },
 	{ 0x610000e, 0x0007 },
 	{ 0x6100045, 0x0860 },
 	{ 0x6100046, 0x0029 },
sound/soc/codecs/rt712-sdca.c +136 -0

148 lines not on this page · raw message

sound/soc/codecs/rt712-sdca.h +6 -0
index 6229fe341bb5..7e6ee21c8a17 100644
@@ -14,6 +14,7 @@
 #include <linux/soundwire/sdw_type.h>
 #include <sound/soc.h>
 #include <linux/workqueue.h>
+#include <linux/gpio/driver.h>
 
 struct  rt712_sdca_priv {
 	struct regmap *regmap;
@@ -45,6 +46,8 @@ struct  rt712_sdca_priv {
 	bool fu05_dapm_mute;
 	bool fu05_mixer_l_mute;
 	bool fu05_mixer_r_mute;
+	struct gpio_chip gpio_chip;
+	struct mutex gc_lock;
 };
 
 struct rt712_dmic_kctrl_priv {
@@ -114,6 +117,9 @@ struct rt712_dmic_kctrl_priv {
 #define RT712_HDA_LEGACY_MUX_CTL0			0x00
 #define RT712_HDA_LEGACY_CONFIG_CTL0			0x06
 #define RT712_HDA_LEGACY_RESET_CTL			0x08
+#define RT712_HDA_GPIO_EN_CTL				0x09
+#define RT712_HDA_GPIO_DIRECTION_CTL			0x0a
+#define RT712_HDA_GPIO_SET_CTL				0x0b
 #define RT712_HDA_LEGACY_GPIO_WAKE_EN_CTL		0x0e
 #define RT712_DMIC_ENT_FLOAT_CTL			0x10
 #define RT712_DMIC_GAIN_ENT_FLOAT_CTL0			0x11
Signature · 1 line
2.54.0
maintainer
#1 lore raw
Quoted 1 line · On Thu, 17 Sep 2026 17:01:20 +0800, [email protected] wrote:

ASoC: rt712: add GPIOs for LED control

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4

Thanks!

[1/1] ASoC: rt712: add GPIOs for LED control

      https://git.kernel.org/broonie/sound/c/e845b86c58e8

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