ASoC: ak4104: add DT bindings
authorDaniel Mack <zonque@gmail.com>
Sun, 7 Oct 2012 15:51:24 +0000 (17:51 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 15 Oct 2012 00:47:20 +0000 (09:47 +0900)
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Documentation/devicetree/bindings/sound/ak4104.txt [new file with mode: 0644]
sound/soc/codecs/ak4104.c

diff --git a/Documentation/devicetree/bindings/sound/ak4104.txt b/Documentation/devicetree/bindings/sound/ak4104.txt
new file mode 100644 (file)
index 0000000..1f8e506
--- /dev/null
@@ -0,0 +1,17 @@
+AK4104 S/PDIF transmitter
+
+This device supports SPI mode only.
+
+Required properties:
+
+  - compatible : "asahi-kasei,ak4104"
+
+  - reg : The chip select number on the SPI bus
+
+Example:
+
+spdif: ak4104@0 {
+       compatible = "asahi-kasei,ak4104";
+       reg = <0>;
+       spi-max-frequency = <5000000>;
+};
index d14163f..d4d4858 100644 (file)
@@ -258,10 +258,17 @@ static int __devexit ak4104_spi_remove(struct spi_device *spi)
        return 0;
 }
 
+static const struct of_device_id ak4104_of_match[] = {
+       { .compatible = "asahi-kasei,ak4104", },
+       { }
+};
+MODULE_DEVICE_TABLE(of, ak4104_of_match);
+
 static struct spi_driver ak4104_spi_driver = {
        .driver  = {
                .name   = DRV_NAME,
                .owner  = THIS_MODULE,
+               .of_match_table = ak4104_of_match,
        },
        .probe  = ak4104_spi_probe,
        .remove = __devexit_p(ak4104_spi_remove),