* [PATCH] s5p-jpeg: Enable instantiation from device tree
@ 2013-05-09 12:39 Sylwester Nawrocki
2013-05-09 14:50 ` Sachin Kamat
0 siblings, 1 reply; 4+ messages in thread
From: Sylwester Nawrocki @ 2013-05-09 12:39 UTC (permalink / raw)
To: linux-media
Cc: a.hajda, hj210.choi, sw0312.kim, devicetree-discuss,
Sylwester Nawrocki, Andrzej Pietrasiewicz, Kyungmin Park
This patch adds device tree support for the S5P/Exynos SoC
JPEG codec IP block.
Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
.../devicetree/bindings/media/samsung-s5p-jpeg.txt | 12 ++++++++++++
drivers/media/platform/s5p-jpeg/jpeg-core.c | 13 ++++++++++++-
2 files changed, 24 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/media/samsung-s5p-jpeg.txt
diff --git a/Documentation/devicetree/bindings/media/samsung-s5p-jpeg.txt b/Documentation/devicetree/bindings/media/samsung-s5p-jpeg.txt
new file mode 100644
index 0000000..bc0938a
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/samsung-s5p-jpeg.txt
@@ -0,0 +1,12 @@
+Samsung S5P/EXYNOS SoC series JPEG codec
+
+Required properties:
+
+- compatible : "samsung,<soc_name>-jpeg", must be one of:
+ "samsung,s5pv210-jpeg", "samsung,exynos4210-jpeg",
+ "samsung,exynos4212-jpeg";
+- reg : address and length of the JPEG codec register set;
+- interrupts : should contain the JPEG codec interrupt; format of the
+ interrupt specifier depends on the interrupt controller;
+- clocks : jpeg clock specifier, as covered by common clock bindings.
+- clock-names : must contain "jpeg" entry.
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
index 15d2396..cd4461c 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>
@@ -1513,10 +1514,21 @@ 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" },
+ { .compatible = "samsung,exynos4212-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,
@@ -1528,4 +1540,3 @@ module_platform_driver(s5p_jpeg_driver);
MODULE_AUTHOR("Andrzej Pietrasiewicz <andrzej.p@samsung.com>");
MODULE_DESCRIPTION("Samsung JPEG codec driver");
MODULE_LICENSE("GPL");
-
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] s5p-jpeg: Enable instantiation from device tree
2013-05-09 12:39 [PATCH] s5p-jpeg: Enable instantiation from device tree Sylwester Nawrocki
@ 2013-05-09 14:50 ` Sachin Kamat
2013-05-09 15:51 ` Sylwester Nawrocki
0 siblings, 1 reply; 4+ messages in thread
From: Sachin Kamat @ 2013-05-09 14:50 UTC (permalink / raw)
To: Sylwester Nawrocki
Cc: linux-media, a.hajda, hj210.choi, sw0312.kim, devicetree-discuss,
Andrzej Pietrasiewicz, Kyungmin Park, George Joseph, aditya.ps,
sunil joshi
Hi Sylwester,
George from my team is working on adding JPEG IP support for 4412 and
5250 SoCs which is quite different from 4210.
In this regard he has refactored the driver to accomodate the changes
required for the new IP and also added DT support.
The patches are almost ready and would be submitted in the next couple
of days. This is FYI :)
On 9 May 2013 18:09, Sylwester Nawrocki <s.nawrocki@samsung.com> wrote:
> This patch adds device tree support for the S5P/Exynos SoC
> JPEG codec IP block.
>
> Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] s5p-jpeg: Enable instantiation from device tree
2013-05-09 14:50 ` Sachin Kamat
@ 2013-05-09 15:51 ` Sylwester Nawrocki
2013-05-10 3:43 ` Sachin Kamat
0 siblings, 1 reply; 4+ messages in thread
From: Sylwester Nawrocki @ 2013-05-09 15:51 UTC (permalink / raw)
To: Sachin Kamat
Cc: linux-media, a.hajda, hj210.choi, sw0312.kim, devicetree-discuss,
Andrzej Pietrasiewicz, Kyungmin Park, George Joseph, aditya.ps,
sunil joshi
Hi Sachin,
On 05/09/2013 04:50 PM, Sachin Kamat wrote:
> George from my team is working on adding JPEG IP support for 4412 and
> 5250 SoCs which is quite different from 4210.
> In this regard he has refactored the driver to accomodate the changes
> required for the new IP and also added DT support.
> The patches are almost ready and would be submitted in the next couple
> of days. This is FYI :)
That's greats news, since on our side currently nobody has been working
on the Exynos4x12+ JPEG codec support. I just prepared a patch adding
DT matching table and checked the driver gets initialized on Exynos4x12.
So it is at least usable on Exynos4210 in 3.11. I should not have listed
"samsung,exynos4212-jpeg" in the driver, since it is missing adaptations
for Exynos4x12 SoCs.
We have plenty time to add proper support for the JPEG IP in 3.11. I'm
looking forward to review and test your patches. Can you use the $subject
patch as a base of your work ? ;-) Or is it rather useless ?
FYI, I will be mostly offline for next 2 weeks.
Thanks,
Sylwester
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] s5p-jpeg: Enable instantiation from device tree
2013-05-09 15:51 ` Sylwester Nawrocki
@ 2013-05-10 3:43 ` Sachin Kamat
0 siblings, 0 replies; 4+ messages in thread
From: Sachin Kamat @ 2013-05-10 3:43 UTC (permalink / raw)
To: Sylwester Nawrocki
Cc: linux-media, a.hajda, hj210.choi, sw0312.kim, devicetree-discuss,
Andrzej Pietrasiewicz, Kyungmin Park, George Joseph, aditya.ps,
sunil joshi
Hi Sylwester,
On 9 May 2013 21:21, Sylwester Nawrocki <s.nawrocki@samsung.com> wrote:
> Hi Sachin,
>
> On 05/09/2013 04:50 PM, Sachin Kamat wrote:
>> George from my team is working on adding JPEG IP support for 4412 and
>> 5250 SoCs which is quite different from 4210.
>> In this regard he has refactored the driver to accomodate the changes
>> required for the new IP and also added DT support.
>> The patches are almost ready and would be submitted in the next couple
>> of days. This is FYI :)
>
> That's greats news, since on our side currently nobody has been working
> on the Exynos4x12+ JPEG codec support. I just prepared a patch adding
> DT matching table and checked the driver gets initialized on Exynos4x12.
> So it is at least usable on Exynos4210 in 3.11. I should not have listed
> "samsung,exynos4212-jpeg" in the driver, since it is missing adaptations
> for Exynos4x12 SoCs.
Right.
> We have plenty time to add proper support for the JPEG IP in 3.11. I'm
> looking forward to review and test your patches.
Thanks.
>Can you use the $subject
> patch as a base of your work ? ;-) Or is it rather useless ?
It is not useless per se. But I am afraid it might not apply directly
due to the refactoring.
However we will be happy to use your documentation for the bindings :)
>
> FYI, I will be mostly offline for next 2 weeks.
OK.
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-10 3:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-09 12:39 [PATCH] s5p-jpeg: Enable instantiation from device tree Sylwester Nawrocki
2013-05-09 14:50 ` Sachin Kamat
2013-05-09 15:51 ` Sylwester Nawrocki
2013-05-10 3:43 ` Sachin Kamat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).