diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2013-08-18 16:14:27 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-12-18 06:09:33 -0200 |
commit | f7074ab348e29c8068a2daaaf89920aebc903a98 (patch) | |
tree | d662893bf19ba9de493a57017126450dd753408e | |
parent | baaf046d8297cb1c777374341953833750a73131 (diff) |
[media] s5p-jpeg: Add initial device tree support for S5PV210/Exynos4210 SoCs
This patch enables the JPEG codec on S5PV210 and Exynos4210 SoCs. There are
some differences in newer versions of the JPEG codec IP on SoCs like Exynos4x12
and Exynos5 series and support for them will be added in subsequent patches.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt | 11 | ||||
-rw-r--r-- | drivers/media/platform/s5p-jpeg/jpeg-core.c | 12 |
2 files changed, 22 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt new file mode 100644 index 000000000000..937b755baf8f --- /dev/null +++ b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt @@ -0,0 +1,11 @@ +Samsung S5P/EXYNOS SoC series JPEG codec + +Required properties: + +- compatible : should be one of: + "samsung,s5pv210-jpeg", "samsung,exynos4210-jpeg"; +- reg : address and length of the JPEG codec IP register set; +- interrupts : specifies the JPEG codec IP interrupt; +- clocks : should contain the JPEG codec IP gate clock specifier, from the + common clock bindings; +- clock-names : should contain "jpeg" entry. diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 091b06af84ea..a4bff8ec982e 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -17,6 +17,7 @@ #include <linux/io.h> #include <linux/kernel.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> #include <linux/slab.h> @@ -1428,10 +1429,20 @@ static const struct dev_pm_ops s5p_jpeg_pm_ops = { .runtime_resume = s5p_jpeg_runtime_resume, }; +#ifdef CONFIG_OF +static const struct of_device_id s5p_jpeg_of_match[] = { + { .compatible = "samsung,s5pv210-jpeg" }, + { .compatible = "samsung,exynos4210-jpeg" }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, s5p_jpeg_of_match); +#endif + static struct platform_driver s5p_jpeg_driver = { .probe = s5p_jpeg_probe, .remove = s5p_jpeg_remove, .driver = { + .of_match_table = of_match_ptr(s5p_jpeg_of_match), .owner = THIS_MODULE, .name = S5P_JPEG_M2M_NAME, .pm = &s5p_jpeg_pm_ops, @@ -1443,4 +1454,3 @@ module_platform_driver(s5p_jpeg_driver); MODULE_AUTHOR("Andrzej Pietrasiewicz <andrzej.p@samsung.com>"); MODULE_DESCRIPTION("Samsung JPEG codec driver"); MODULE_LICENSE("GPL"); - |