From dd99ba8f0792ba0567f064eeee18bc98501b40f7 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Fri, 22 Jul 2011 00:28:51 +0800 Subject: [PATCH] --- yaml --- r: 270463 b: refs/heads/master c: 58e494247a9f09f0ae8d9867fcfb672a9bcdd6ae h: refs/heads/master i: 270461: b7ca4fa5802c351ade397204c975921606ea3006 270459: b786c644f0cd117e6d3b41a4d2500519ce44c3a5 270455: 31a6184c60695f21af636213421bb2fa03f6c216 270447: 8818eaecc6c8b4cd47a21b9c7fa74c65c808ce6e 270431: 88ec6899b078982bf3e0c02150b72409e8997ec2 270399: 05855c6fd7350b203d7d72df3497f4c7f1bf6f51 270335: 472def92e9592e05ff1119c884c22b591f8415ba v: v3 --- [refs] | 2 +- .../bindings/sound/soc/codecs/fsl-sgtl5000.txt | 11 +++++++++++ trunk/sound/soc/codecs/sgtl5000.c | 8 ++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 trunk/Documentation/devicetree/bindings/sound/soc/codecs/fsl-sgtl5000.txt diff --git a/[refs] b/[refs] index 9ebc5af18692..12b6ec2cebcc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a7f96e4dc6bb5f45d0612782419e6a63032a2ac0 +refs/heads/master: 58e494247a9f09f0ae8d9867fcfb672a9bcdd6ae diff --git a/trunk/Documentation/devicetree/bindings/sound/soc/codecs/fsl-sgtl5000.txt b/trunk/Documentation/devicetree/bindings/sound/soc/codecs/fsl-sgtl5000.txt new file mode 100644 index 000000000000..2c3cd413f042 --- /dev/null +++ b/trunk/Documentation/devicetree/bindings/sound/soc/codecs/fsl-sgtl5000.txt @@ -0,0 +1,11 @@ +* Freescale SGTL5000 Stereo Codec + +Required properties: +- compatible : "fsl,sgtl5000". + +Example: + +codec: sgtl5000@0a { + compatible = "fsl,sgtl5000"; + reg = <0x0a>; +}; diff --git a/trunk/sound/soc/codecs/sgtl5000.c b/trunk/sound/soc/codecs/sgtl5000.c index 76258f2a2ffb..cf6eea8b458e 100644 --- a/trunk/sound/soc/codecs/sgtl5000.c +++ b/trunk/sound/soc/codecs/sgtl5000.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1494,10 +1495,17 @@ static const struct i2c_device_id sgtl5000_id[] = { MODULE_DEVICE_TABLE(i2c, sgtl5000_id); +static const struct of_device_id sgtl5000_dt_ids[] = { + { .compatible = "fsl,sgtl5000", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(i2c, sgtl5000_dt_ids); + static struct i2c_driver sgtl5000_i2c_driver = { .driver = { .name = "sgtl5000", .owner = THIS_MODULE, + .of_match_table = sgtl5000_dt_ids, }, .probe = sgtl5000_i2c_probe, .remove = __devexit_p(sgtl5000_i2c_remove),