Skip to contentSkip to conversation

ASoC: nau8315: add codec driver

PATCH In review David Lin 2 participants 4 messages Oct 29, 2020 – Oct 30, 2020

Subsystems (3)
lore
Share & tools
lore

David Lin

author
#0 lore raw

PATCH 1/1 ASoC: nau8315: add codec driver

Add codec driver for Nuvoton NAU8315.

---
 .../devicetree/bindings/sound/nau8315.txt     |  18 ++
 sound/soc/codecs/Kconfig                      |   5 +
 sound/soc/codecs/Makefile                     |   2 +
 sound/soc/codecs/nau8315.c                    | 166 ++++++++++++++++++
 4 files changed, 191 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/nau8315.txt
 create mode 100644 sound/soc/codecs/nau8315.c
Documentation/devicetree/bindings/sound/nau8315.txt new file +18 -0
new file mode 100644
index 000000000000..6eaec46f384c
@@ -0,0 +1,18 @@
+Nuvoton NAU8315 Mono Class-D Amplifier
+
+Required properties:
+- compatible   : "nuvoton,nau8315"
+
+Optional properties:
+- enable-gpios : GPIO specifier for the chip's device enable input(EN) pin.
+        If this option is not specified then driver does not manage
+        the pin state (e.g. chip is always on).
+
+Example:
+
+#include <dt-bindings/gpio/gpio.h>
+
+nau8315 {
+       compatible = "nuvoton,nau8315";
+       enable-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+};
sound/soc/codecs/Kconfig +5 -0
index 5791b7056af6..2b6eceb3573c 100644
@@ -130,6 +130,7 @@ config SND_SOC_ALL_CODECS
        imply SND_SOC_MT6358
        imply SND_SOC_MT6359
        imply SND_SOC_MT6660
+       imply SND_SOC_NAU8315
        imply SND_SOC_NAU8540
        imply SND_SOC_NAU8810
        imply SND_SOC_NAU8822
@@ -1760,6 +1761,10 @@ config SND_SOC_MT6660
          Select N if you don't have MT6660 on board.
          Select M to build this as module.
 
+config SND_SOC_NAU8315
+       tristate "Nuvoton Technology Corporation NAU8315 CODEC"
+       depends on GPIOLIB
+
 config SND_SOC_NAU8540
        tristate "Nuvoton Technology Corporation NAU85L40 CODEC"
        depends on I2C
sound/soc/codecs/Makefile +2 -0
index 11ce98c25d6c..144d9256d4d5 100644
@@ -129,6 +129,7 @@ snd-soc-mt6351-objs := mt6351.o
 snd-soc-mt6358-objs := mt6358.o
 snd-soc-mt6359-objs := mt6359.o
 snd-soc-mt6660-objs := mt6660.o
+snd-soc-nau8315-objs := nau8315.o
 snd-soc-nau8540-objs := nau8540.o
 snd-soc-nau8810-objs := nau8810.o
 snd-soc-nau8822-objs := nau8822.o
@@ -438,6 +439,7 @@ obj-$(CONFIG_SND_SOC_MT6351)        += snd-soc-mt6351.o
 obj-$(CONFIG_SND_SOC_MT6358)   += snd-soc-mt6358.o
 obj-$(CONFIG_SND_SOC_MT6359)   += snd-soc-mt6359.o
 obj-$(CONFIG_SND_SOC_MT6660)   += snd-soc-mt6660.o
+obj-$(CONFIG_SND_SOC_NAU8315)   += snd-soc-nau8315.o
 obj-$(CONFIG_SND_SOC_NAU8540)   += snd-soc-nau8540.o
 obj-$(CONFIG_SND_SOC_NAU8810)   += snd-soc-nau8810.o
 obj-$(CONFIG_SND_SOC_NAU8822)   += snd-soc-nau8822.o
sound/soc/codecs/nau8315.c new file +166 -0

166 lines not on this page · raw message

--
2.25.1

===========================================================================================
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

maintainer
#1 lore raw
Quoted 1 line · David Lin

Add codec driver for Nuvoton NAU8315.

This doesn't apply against current code, please check and resend:

Applying: ASoC: nau8315: add codec driver Using index info to reconstruct a base tree...
error: patch failed: sound/soc/codecs/Kconfig:130
error: sound/soc/codecs/Kconfig: patch does not apply
error: patch failed: sound/soc/codecs/Makefile:438
error: sound/soc/codecs/Makefile: patch does not apply
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index. Patch failed at 0002 ASoC: nau8315: add codec driver

author
#2 lore raw
Quoted 4 lines · Mark Brown
Quoted 1 line · David Lin

Add codec driver for Nuvoton NAU8315.

This doesn't apply against current code, please check and resend:

Quoted 9 lines

Applying: ASoC: nau8315: add codec driver Using index info to reconstruct a base tree...
error: patch failed: sound/soc/codecs/Kconfig:130
error: sound/soc/codecs/Kconfig: patch does not apply
error: patch failed: sound/soc/codecs/Makefile:438
error: sound/soc/codecs/Makefile: patch does not apply
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index. Patch failed at 0002 ASoC: nau8315: add codec driver

Sorry. I feel a strange because of I can still git apply this patch to the latest branch even I create a new branch track to for-next.

Anyway, I will resend. If it doesn't still apply, maybe I will confirm with internal mail server whether the format is changed.

________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

maintainer
#3 lore raw
Quoted 7 lines · On Fri, Oct 30, 2020 at 01:00:25PM +0800, CTLIN0 wrote:
Quoted 4 lines · Mark Brown

error: sound/soc/codecs/Makefile: patch does not apply
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index. Patch failed at 0002 ASoC: nau8315: add codec driver

Quoted 5 lines

Sorry. I feel a strange because of I can still git apply this patch to the latest branch even I create a new branch track to for-next.

Anyway, I will resend. If it doesn't still apply, maybe I will confirm with internal mail server whether the format is changed.

I seem to recall that some of your colleagues had problems with your mail server corrupting their patches in the past - I'm not sure how they resolved that, but it might be worth asking around.