On Wed, Apr 09, 2014 at 08:19:49PM +0800, Oder Chiou wrote:
index 0000000..d63c662 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/rt5639.txt @@ -0,0 +1,48 @@ +RT5639 audio CODEC
This doesn't really need to be a separate document, just add the information to the rt5640 document.
+#if defined(CONFIG_OF) +static const struct of_device_id rt5640_of_match[] = {
- { .compatible = "realtek,rt5640", },
- {},
+}; +MODULE_DEVICE_TABLE(of, rt5640_of_match);
+static const struct of_device_id rt5639_of_match[] = {
- { .compatible = "realtek,rt5639", },
- {},
+}; +MODULE_DEVICE_TABLE(of, rt5639_of_match); +#endif
This looks broken - you should have one driver with one table.
+#if defined(CONFIG_OF)
.of_match_table = of_match_ptr(rt5640_of_match),
+#endif
Drop the ifdef, the whole point with of_match_ptr() is that you don't need it.
+static struct i2c_driver rt5639_i2c_driver = {
- .driver = {
.name = "rt5639",
.owner = THIS_MODULE,
No, add an ID table to the I2C driver - look at wm8904 for an example.