All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: rt5651: move definitions of dt-binding constants to include/dt-bindings
@ 2018-03-12 19:34 Hans de Goede
  2018-03-12 19:34 ` [PATCH 2/2] ASoC: rt5651: Fix jack-dectect typo in the dt-bindings documentation Hans de Goede
  2018-03-12 21:17 ` Applied "ASoC: rt5651: move definitions of dt-binding constants to include/dt-bindings" " Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Hans de Goede @ 2018-03-12 19:34 UTC (permalink / raw)
  To: Mark Brown, Bard Liao, Oder Chiou; +Cc: Hans de Goede, alsa-devel

Move the definitions of constants used in the dt-bindings from
include/sound/rt5651.h to include/dt-bindings/sound/rt5651.h.

As dt-bindings headers may also be parsed by the dt-compiler, they cannot
use enums, only defines, so this commit also changes the code declaring
the constants to use defines.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 include/dt-bindings/sound/rt5651.h | 15 +++++++++++++++
 include/sound/rt5651.h             | 36 ------------------------------------
 sound/soc/codecs/rt5651.h          |  4 ++--
 3 files changed, 17 insertions(+), 38 deletions(-)
 create mode 100644 include/dt-bindings/sound/rt5651.h
 delete mode 100644 include/sound/rt5651.h

diff --git a/include/dt-bindings/sound/rt5651.h b/include/dt-bindings/sound/rt5651.h
new file mode 100644
index 000000000000..2f2dac915168
--- /dev/null
+++ b/include/dt-bindings/sound/rt5651.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __DT_RT5651_H
+#define __DT_RT5651_H
+
+#define RT5651_JD_NULL			0
+#define RT5651_JD1_1			1
+#define RT5651_JD1_2			2
+#define RT5651_JD2			3
+
+#define RT5651_OVCD_SF_0P5		0
+#define RT5651_OVCD_SF_0P75		1
+#define RT5651_OVCD_SF_1P0		2
+#define RT5651_OVCD_SF_1P5		3
+
+#endif /* __DT_RT5651_H */
diff --git a/include/sound/rt5651.h b/include/sound/rt5651.h
deleted file mode 100644
index 6403b862fb9a..000000000000
--- a/include/sound/rt5651.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * linux/sound/rt286.h -- Platform data for RT286
- *
- * Copyright 2013 Realtek Microelectronics
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __LINUX_SND_RT5651_H
-#define __LINUX_SND_RT5651_H
-
-/*
- * Note these MUST match the values from the DT binding:
- * Documentation/devicetree/bindings/sound/rt5651.txt
- */
-enum rt5651_jd_src {
-	RT5651_JD_NULL,
-	RT5651_JD1_1,
-	RT5651_JD1_2,
-	RT5651_JD2,
-};
-
-/*
- * Note these MUST match the values from the DT binding:
- * Documentation/devicetree/bindings/sound/rt5651.txt
- */
-enum rt5651_ovcd_sf {
-	RT5651_OVCD_SF_0P5,
-	RT5651_OVCD_SF_0P75,
-	RT5651_OVCD_SF_1P0,
-	RT5651_OVCD_SF_1P5,
-};
-
-#endif
diff --git a/sound/soc/codecs/rt5651.h b/sound/soc/codecs/rt5651.h
index f20c9be94fb2..3a0968c53fde 100644
--- a/sound/soc/codecs/rt5651.h
+++ b/sound/soc/codecs/rt5651.h
@@ -12,7 +12,7 @@
 #ifndef __RT5651_H__
 #define __RT5651_H__
 
-#include <sound/rt5651.h>
+#include <dt-bindings/sound/rt5651.h>
 
 /* Info */
 #define RT5651_RESET				0x00
@@ -2073,7 +2073,7 @@ struct rt5651_priv {
 	struct regmap *regmap;
 	struct snd_soc_jack *hp_jack;
 	struct work_struct jack_detect_work;
-	enum rt5651_jd_src jd_src;
+	unsigned int jd_src;
 	unsigned int ovcd_th;
 	unsigned int ovcd_sf;
 
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ASoC: rt5651: Fix jack-dectect typo in the dt-bindings documentation
  2018-03-12 19:34 [PATCH 1/2] ASoC: rt5651: move definitions of dt-binding constants to include/dt-bindings Hans de Goede
@ 2018-03-12 19:34 ` Hans de Goede
  2018-03-12 21:17   ` Applied "ASoC: rt5651: Fix jack-dectect typo in the dt-bindings documentation" to the asoc tree Mark Brown
  2018-03-12 21:17 ` Applied "ASoC: rt5651: move definitions of dt-binding constants to include/dt-bindings" " Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2018-03-12 19:34 UTC (permalink / raw)
  To: Mark Brown, Bard Liao, Oder Chiou; +Cc: Hans de Goede, alsa-devel

Fix the jack-dectect typo in the dt-bindings documentation.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 Documentation/devicetree/bindings/sound/rt5651.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/rt5651.txt b/Documentation/devicetree/bindings/sound/rt5651.txt
index 7890aa9477f8..b85221864cec 100644
--- a/Documentation/devicetree/bindings/sound/rt5651.txt
+++ b/Documentation/devicetree/bindings/sound/rt5651.txt
@@ -18,9 +18,9 @@ Optional properties:
 
 - realtek,jack-detect-source
   u32. Valid values:
-  1: Use JD1_1 pin for jack-dectect
-  2: Use JD1_2 pin for jack-dectect
-  3: Use JD2 pin for jack-dectect
+  1: Use JD1_1 pin for jack-detect
+  2: Use JD1_2 pin for jack-detect
+  3: Use JD2 pin for jack-detect
 
 - realtek,over-current-threshold-microamp
   u32, micbias over-current detection threshold in µA, valid values are
-- 
2.14.3

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Applied "ASoC: rt5651: Fix jack-dectect typo in the dt-bindings documentation" to the asoc tree
  2018-03-12 19:34 ` [PATCH 2/2] ASoC: rt5651: Fix jack-dectect typo in the dt-bindings documentation Hans de Goede
@ 2018-03-12 21:17   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2018-03-12 21:17 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Oder Chiou, Bard Liao, alsa-devel, Mark Brown

[-- Attachment #1: Type: text/plain, Size: 2185 bytes --]

The patch

   ASoC: rt5651: Fix jack-dectect typo in the dt-bindings documentation

has been applied to the asoc tree at

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

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

>From 6b2d99247b62d288b5b320fcea46c164ab733e49 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 12 Mar 2018 20:34:36 +0100
Subject: [PATCH] ASoC: rt5651: Fix jack-dectect typo in the dt-bindings
 documentation

Fix the jack-dectect typo in the dt-bindings documentation.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 Documentation/devicetree/bindings/sound/rt5651.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/rt5651.txt b/Documentation/devicetree/bindings/sound/rt5651.txt
index 7890aa9477f8..b85221864cec 100644
--- a/Documentation/devicetree/bindings/sound/rt5651.txt
+++ b/Documentation/devicetree/bindings/sound/rt5651.txt
@@ -18,9 +18,9 @@ Optional properties:
 
 - realtek,jack-detect-source
   u32. Valid values:
-  1: Use JD1_1 pin for jack-dectect
-  2: Use JD1_2 pin for jack-dectect
-  3: Use JD2 pin for jack-dectect
+  1: Use JD1_1 pin for jack-detect
+  2: Use JD1_2 pin for jack-detect
+  3: Use JD2 pin for jack-detect
 
 - realtek,over-current-threshold-microamp
   u32, micbias over-current detection threshold in µA, valid values are
-- 
2.16.2


[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Applied "ASoC: rt5651: move definitions of dt-binding constants to include/dt-bindings" to the asoc tree
  2018-03-12 19:34 [PATCH 1/2] ASoC: rt5651: move definitions of dt-binding constants to include/dt-bindings Hans de Goede
  2018-03-12 19:34 ` [PATCH 2/2] ASoC: rt5651: Fix jack-dectect typo in the dt-bindings documentation Hans de Goede
@ 2018-03-12 21:17 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2018-03-12 21:17 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Oder Chiou, Bard Liao, alsa-devel, Mark Brown

The patch

   ASoC: rt5651: move definitions of dt-binding constants to include/dt-bindings

has been applied to the asoc tree at

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

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

>From 0f2d4f162f4f54b431420df23122901a6ccd641e Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 12 Mar 2018 20:34:35 +0100
Subject: [PATCH] ASoC: rt5651: move definitions of dt-binding constants to
 include/dt-bindings

Move the definitions of constants used in the dt-bindings from
include/sound/rt5651.h to include/dt-bindings/sound/rt5651.h.

As dt-bindings headers may also be parsed by the dt-compiler, they cannot
use enums, only defines, so this commit also changes the code declaring
the constants to use defines.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/dt-bindings/sound/rt5651.h | 15 +++++++++++++++
 include/sound/rt5651.h             | 36 ------------------------------------
 sound/soc/codecs/rt5651.h          |  4 ++--
 3 files changed, 17 insertions(+), 38 deletions(-)
 create mode 100644 include/dt-bindings/sound/rt5651.h
 delete mode 100644 include/sound/rt5651.h

diff --git a/include/dt-bindings/sound/rt5651.h b/include/dt-bindings/sound/rt5651.h
new file mode 100644
index 000000000000..2f2dac915168
--- /dev/null
+++ b/include/dt-bindings/sound/rt5651.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __DT_RT5651_H
+#define __DT_RT5651_H
+
+#define RT5651_JD_NULL			0
+#define RT5651_JD1_1			1
+#define RT5651_JD1_2			2
+#define RT5651_JD2			3
+
+#define RT5651_OVCD_SF_0P5		0
+#define RT5651_OVCD_SF_0P75		1
+#define RT5651_OVCD_SF_1P0		2
+#define RT5651_OVCD_SF_1P5		3
+
+#endif /* __DT_RT5651_H */
diff --git a/include/sound/rt5651.h b/include/sound/rt5651.h
deleted file mode 100644
index 6403b862fb9a..000000000000
--- a/include/sound/rt5651.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * linux/sound/rt286.h -- Platform data for RT286
- *
- * Copyright 2013 Realtek Microelectronics
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __LINUX_SND_RT5651_H
-#define __LINUX_SND_RT5651_H
-
-/*
- * Note these MUST match the values from the DT binding:
- * Documentation/devicetree/bindings/sound/rt5651.txt
- */
-enum rt5651_jd_src {
-	RT5651_JD_NULL,
-	RT5651_JD1_1,
-	RT5651_JD1_2,
-	RT5651_JD2,
-};
-
-/*
- * Note these MUST match the values from the DT binding:
- * Documentation/devicetree/bindings/sound/rt5651.txt
- */
-enum rt5651_ovcd_sf {
-	RT5651_OVCD_SF_0P5,
-	RT5651_OVCD_SF_0P75,
-	RT5651_OVCD_SF_1P0,
-	RT5651_OVCD_SF_1P5,
-};
-
-#endif
diff --git a/sound/soc/codecs/rt5651.h b/sound/soc/codecs/rt5651.h
index f20c9be94fb2..3a0968c53fde 100644
--- a/sound/soc/codecs/rt5651.h
+++ b/sound/soc/codecs/rt5651.h
@@ -12,7 +12,7 @@
 #ifndef __RT5651_H__
 #define __RT5651_H__
 
-#include <sound/rt5651.h>
+#include <dt-bindings/sound/rt5651.h>
 
 /* Info */
 #define RT5651_RESET				0x00
@@ -2073,7 +2073,7 @@ struct rt5651_priv {
 	struct regmap *regmap;
 	struct snd_soc_jack *hp_jack;
 	struct work_struct jack_detect_work;
-	enum rt5651_jd_src jd_src;
+	unsigned int jd_src;
 	unsigned int ovcd_th;
 	unsigned int ovcd_sf;
 
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-12 21:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 19:34 [PATCH 1/2] ASoC: rt5651: move definitions of dt-binding constants to include/dt-bindings Hans de Goede
2018-03-12 19:34 ` [PATCH 2/2] ASoC: rt5651: Fix jack-dectect typo in the dt-bindings documentation Hans de Goede
2018-03-12 21:17   ` Applied "ASoC: rt5651: Fix jack-dectect typo in the dt-bindings documentation" to the asoc tree Mark Brown
2018-03-12 21:17 ` Applied "ASoC: rt5651: move definitions of dt-binding constants to include/dt-bindings" " Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.