Message ID | 1328148728-32258-9-git-send-email-richard.zhao@linaro.org |
---|---|
State | New |
Headers | show |
On Thu, Feb 02, 2012 at 10:12:07AM +0800, Richard Zhao wrote: > +Required properties: > +- compatible : "fsl,imx31-audmux". > + > +Example: > + > +audmux@021d8000 { > + compatible = "fsl,imx6q-audmux", "fsl,imx31-audmux"; > + reg = <0x021d8000 0x4000>; It's kind of obvious what it is but you should really document the reg property for completeness.
On Thu, Feb 02, 2012 at 12:10:20PM +0000, Mark Brown wrote: > On Thu, Feb 02, 2012 at 10:12:07AM +0800, Richard Zhao wrote: > > > +Required properties: > > +- compatible : "fsl,imx31-audmux". > > + > > +Example: > > + > > +audmux@021d8000 { > > + compatible = "fsl,imx6q-audmux", "fsl,imx31-audmux"; > > + reg = <0x021d8000 0x4000>; > > It's kind of obvious what it is but you should really document the reg > property for completeness. Right. Thanks Richard
diff --git a/Documentation/devicetree/bindings/sound/soc/imx/audmux-v2.txt b/Documentation/devicetree/bindings/sound/soc/imx/audmux-v2.txt new file mode 100644 index 0000000..b8ec5aa --- /dev/null +++ b/Documentation/devicetree/bindings/sound/soc/imx/audmux-v2.txt @@ -0,0 +1,11 @@ +* Freescale audmux device for imx3, imx5, imx6 etc. + +Required properties: +- compatible : "fsl,imx31-audmux". + +Example: + +audmux@021d8000 { + compatible = "fsl,imx6q-audmux", "fsl,imx31-audmux"; + reg = <0x021d8000 0x4000>; +}; diff --git a/sound/soc/imx/audmux-v2.c b/sound/soc/imx/audmux-v2.c index d53c029..af42fca 100644 --- a/sound/soc/imx/audmux-v2.c +++ b/sound/soc/imx/audmux-v2.c @@ -20,7 +20,9 @@ #include <linux/io.h> #include <linux/clk.h> #include <linux/debugfs.h> +#include <linux/platform_device.h> #include <linux/slab.h> +#include <linux/of.h> #include <mach/audmux.h> #include <mach/hardware.h> @@ -244,11 +246,17 @@ static int __exit mxc_audmux_v2_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id audmux_v2_dt_ids[] = { + { .compatible = "fsl,imx31-audmux", }, + { /* sentinel */ } +}; + static struct platform_driver mxc_audmux_v2_driver = { .remove = __exit_p(mxc_audmux_v2_remove), .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, + .of_match_table = audmux_v2_dt_ids, } };
Signed-off-by: Richard Zhao <richard.zhao@linaro.org> --- .../bindings/sound/soc/imx/audmux-v2.txt | 11 +++++++++++ sound/soc/imx/audmux-v2.c | 8 ++++++++ 2 files changed, 19 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/soc/imx/audmux-v2.txt