Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1311643 > unrolled thread

[PATCH 0/2] ASoC: ads117x: Add device tree support for TI ADS117x

Started byFlorian Vaussard <florian.vaussard@gmail.com>
First post2016-01-18 17:10 +0100
Last post2016-01-18 17:10 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] ASoC: ads117x: Add device tree support for TI ADS117x Florian Vaussard <florian.vaussard@gmail.com> - 2016-01-18 17:10 +0100
    [PATCH 2/2] ASoC: ads117x: Add device tree compatible string Florian Vaussard <florian.vaussard@gmail.com> - 2016-01-18 17:10 +0100

#1311643 — [PATCH 0/2] ASoC: ads117x: Add device tree support for TI ADS117x

FromFlorian Vaussard <florian.vaussard@gmail.com>
Date2016-01-18 17:10 +0100
Subject[PATCH 0/2] ASoC: ads117x: Add device tree support for TI ADS117x
Message-ID<qSkxr-2ZZ-3@gated-at.bofh.it>
Hello,

This series adds device tree support for the Texas Instruments ADS117x
ADC chip. The first patch adds the binding documentation, while the second
patch adds the compatible string into the driver.

Best regards,

Florian

Florian Vaussard (2):
  dt/bindings: Add bindings documentation for TI ADS117x ADC
  ASoC: ads117x: Add device tree compatible string

 Documentation/devicetree/bindings/sound/ti,ads117x.txt | 11 +++++++++++
 sound/soc/codecs/ads117x.c                             | 11 +++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/ti,ads117x.txt

-- 
2.1.0

[toc] | [next] | [standalone]


#1311646 — [PATCH 2/2] ASoC: ads117x: Add device tree compatible string

FromFlorian Vaussard <florian.vaussard@gmail.com>
Date2016-01-18 17:10 +0100
Subject[PATCH 2/2] ASoC: ads117x: Add device tree compatible string
Message-ID<qSkxr-2ZZ-17@gated-at.bofh.it>
In reply to#1311643
This patch adds the necessary device tree compatible string to allow
DT probing.

Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
---
 sound/soc/codecs/ads117x.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sound/soc/codecs/ads117x.c b/sound/soc/codecs/ads117x.c
index 1222282..b3f6618 100644
--- a/sound/soc/codecs/ads117x.c
+++ b/sound/soc/codecs/ads117x.c
@@ -20,6 +20,8 @@
 #include <sound/initval.h>
 #include <sound/soc.h>
 
+#include <linux/of.h>
+
 #define ADS117X_RATES (SNDRV_PCM_RATE_8000_48000)
 #define ADS117X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE)
 
@@ -75,9 +77,18 @@ static int ads117x_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#if defined(CONFIG_OF)
+static const struct of_device_id ads117x_dt_ids[] = {
+	{ .compatible = "ti,ads117x" },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, ads117x_dt_ids);
+#endif
+
 static struct platform_driver ads117x_codec_driver = {
 	.driver = {
 			.name = "ads117x-codec",
+			.of_match_table = of_match_ptr(ads117x_dt_ids),
 	},
 
 	.probe = ads117x_probe,
-- 
2.1.0

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web