media: V4L2: add temporary clock helpers
Subsystems (2)
Hi Guennadi,
Quoted 11 lines
Typical video devices like camera sensors require an external clock source. Many such devices cannot even access their hardware registers without a running clock. These clock sources should be controlled by their consumers. This should be performed, using the generic clock framework. Unfortunately so far only very few systems have been ported to that framework. This patch adds a set of temporary helpers, mimicking the generic clock API, to V4L2. Platforms, adopting the clock API, should switch to using it. Eventually this temporary API should be removed.
Signed-off-by Guennadi Liakhovetski <g.liakhovetski@xxxxxx>---
for your patch 1/8 and 3/8, i think it makes a lot of senses to let the object manages its own clock by itself.
is it possible for us to implement v4l2-clk.c directly as an instance of standard clk driver for those systems which don't have generic clock, and remove the V4L2 clock APIs like v4l2_clk_get, v4l2_clk_enable from the first day? i mean v4l2-clk.c becomes a temp and fake clock controller driver. finally, after people have generically clk, remove it.
drivers/media/v4l2-core/v4l2-clk.c
Quoted 28 lines
v8: Updated both (C) dates
drivers/media/v4l2-core/Makefile | 2 +- drivers/media/v4l2-core/v4l2-clk.c | 177 ++++++++++++++++++++++++++++++++++++ include/media/v4l2-clk.h | 54 +++++++++++ 3 files changed, 232 insertions(+), 1 deletions(-) create mode 100644 drivers/media/v4l2-core/v4l2-clk.c create mode 100644 include/media/v4l2-clk.hdrivers/media/v4l2-core/Makefile +1
-1@@ -5,7 +5,7 @@ tuner-objs := tuner-core.o videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \ - v4l2-event.o v4l2-ctrls.o v4l2-subdev.o + v4l2-event.o v4l2-ctrls.o v4l2-subdev.o v4l2-clk.o ifeq ($(CONFIG_COMPAT),y) videodev-objs += v4l2-compat-ioctl32.o endifdrivers/media/v4l2-core/v4l2-clk.c new file +0
-0@@ -0,0 +1,177 @@
-barry
Hi Barry
Quoted 14 lines · Barry Song
Hi Guennadi,
Quoted 11 lines
Typical video devices like camera sensors require an external clock source. Many such devices cannot even access their hardware registers without a running clock. These clock sources should be controlled by their consumers. This should be performed, using the generic clock framework. Unfortunately so far only very few systems have been ported to that framework. This patch adds a set of temporary helpers, mimicking the generic clock API, to V4L2. Platforms, adopting the clock API, should switch to using it. Eventually this temporary API should be removed.
Signed-off-by Guennadi Liakhovetski <g.liakhovetski@xxxxxx>---
Quoted 8 lines
for your patch 1/8 and 3/8, i think it makes a lot of senses to let the object manages its own clock by itself.
is it possible for us to implementv4l2-clk.cdirectly as an instance of standard clk driver for those systems which don't have generic clock, and remove the V4L2 clock APIs likev4l2_clk_get,v4l2_clk_enablefrom the first day? i meanv4l2-clk.cbecomes a temp and fake clock controller driver. finally, after people have generically clk, remove it.
I don't think you can force-enable the CFF on systems, that don't support it, e.g. PXA.
Thanks
Guennadi
Quoted 16 lines
Quoted 15 lines
v8: Updated both (C) dates
drivers/media/v4l2-core/Makefile | 2 +- drivers/media/v4l2-core/v4l2-clk.c | 177 ++++++++++++++++++++++++++++++++++++ include/media/v4l2-clk.h | 54 +++++++++++ 3 files changed, 232 insertions(+), 1 deletions(-) create mode 100644 drivers/media/v4l2-core/v4l2-clk.c create mode 100644 include/media/v4l2-clk.hdrivers/media/v4l2-core/Makefile +0
-0@@ -5,7 +5,7 @@ tuner-objs := tuner-core.o
Quoted 15 lines
drivers/media/v4l2-core/v4l2-clk.c
Quoted 12 lines
drivers/media/v4l2-core/Makefile +1
-1videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \ - v4l2-event.o v4l2-ctrls.o v4l2-subdev.o + v4l2-event.o v4l2-ctrls.o v4l2-subdev.o v4l2-clk.o ifeq ($(CONFIG_COMPAT),y) videodev-objs += v4l2-compat-ioctl32.o endifdrivers/media/v4l2-core/v4l2-clk.c new file +0
-0@@ -0,0 +1,177 @@-barry
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
PATCH v8 1/7 media: V4L2: add temporary clock helpers
2013/4/11 Guennadi Liakhovetski <[email protected]>:
Quoted 27 lines
Hi Barry
Quoted 14 lines · Barry Song
Hi Guennadi,
Quoted 11 lines
Typical video devices like camera sensors require an external clock source. Many such devices cannot even access their hardware registers without a running clock. These clock sources should be controlled by their consumers. This should be performed, using the generic clock framework. Unfortunately so far only very few systems have been ported to that framework. This patch adds a set of temporary helpers, mimicking the generic clock API, to V4L2. Platforms, adopting the clock API, should switch to using it. Eventually this temporary API should be removed.
Signed-off-by Guennadi Liakhovetski <g.liakhovetski@xxxxxx>---
Quoted 8 lines
for your patch 1/8 and 3/8, i think it makes a lot of senses to let the object manages its own clock by itself.
is it possible for us to implementv4l2-clk.cdirectly as an instance of standard clk driver for those systems which don't have generic clock, and remove the V4L2 clock APIs likev4l2_clk_get,v4l2_clk_enablefrom the first day? i meanv4l2-clk.cbecomes a temp and fake clock controller driver. finally, after people have generically clk, remove it.
Quoted 2 lines
I don't think you can force-enable the CFF on systems, that don't support it, e.g. PXA.
yes. we can. clock is only a framework, has it any limitation to implement a driver instance on any platform?
people have tried to move to common clk and generic framework for a long time, now you still try to provide a v4l2 specific clock APIs, it just makes v4l2 unacceptable and much complex.
Quoted 34 lines
Thanks
GuennadiQuoted 30 lines
drivers/media/v4l2-core/v4l2-clk.c
Quoted 28 lines
v8: Updated both (C) dates
drivers/media/v4l2-core/Makefile | 2 +- drivers/media/v4l2-core/v4l2-clk.c | 177 ++++++++++++++++++++++++++++++++++++ include/media/v4l2-clk.h | 54 +++++++++++ 3 files changed, 232 insertions(+), 1 deletions(-) create mode 100644 drivers/media/v4l2-core/v4l2-clk.c create mode 100644 include/media/v4l2-clk.hdrivers/media/v4l2-core/Makefile +1
-1@@ -5,7 +5,7 @@ tuner-objs := tuner-core.o videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \ - v4l2-event.o v4l2-ctrls.o v4l2-subdev.o + v4l2-event.o v4l2-ctrls.o v4l2-subdev.o v4l2-clk.o ifeq ($(CONFIG_COMPAT),y) videodev-objs += v4l2-compat-ioctl32.o endifdrivers/media/v4l2-core/v4l2-clk.c new file +0
-0@@ -0,0 +1,177 @@-barry
-barry
PATCH v8 1/7 media: V4L2: add temporary clock helpers
Quoted 28 lines · Barry Song
2013/4/11 Guennadi Liakhovetski <[email protected]>:
Quoted 27 lines
Hi Barry
Quoted 22 lines · Barry Song
Hi Guennadi,
Quoted 11 lines
Typical video devices like camera sensors require an external clock source. Many such devices cannot even access their hardware registers without a running clock. These clock sources should be controlled by their consumers. This should be performed, using the generic clock framework. Unfortunately so far only very few systems have been ported to that framework. This patch adds a set of temporary helpers, mimicking the generic clock API, to V4L2. Platforms, adopting the clock API, should switch to using it. Eventually this temporary API should be removed.
Signed-off-by Guennadi Liakhovetski <g.liakhovetski@xxxxxx>---
for your patch 1/8 and 3/8, i think it makes a lot of senses to let the object manages its own clock by itself.
is it possible for us to implementv4l2-clk.cdirectly as an instance of standard clk driver for those systems which don't have generic clock, and remove the V4L2 clock APIs likev4l2_clk_get,v4l2_clk_enablefrom the first day? i meanv4l2-clk.cbecomes a temp and fake clock controller driver. finally, after people have generically clk, remove it.
Quoted 5 lines
Quoted 2 lines
I don't think you can force-enable the CFF on systems, that don't support it, e.g. PXA.
yes. we can. clock is only a framework, has it any limitation to implement a driver instance on any platform?
So, you enable CFF, it provides its own clk_* implementation like clk_get_rate() etc. Now, PXA already has it defined in arch/arm/mach-pxa/clock.c. Don't think this is going to fly.
Thanks
Guennadi
Quoted 39 lines
people have tried to move to common clk and generic framework for a long time, now you still try to provide a v4l2 specific clock APIs, it just makes v4l2 unacceptable and much complex.
Quoted 34 lines
Thanks
GuennadiQuoted 30 lines
drivers/media/v4l2-core/v4l2-clk.c
Quoted 28 lines
v8: Updated both (C) dates
drivers/media/v4l2-core/Makefile | 2 +- drivers/media/v4l2-core/v4l2-clk.c | 177 ++++++++++++++++++++++++++++++++++++ include/media/v4l2-clk.h | 54 +++++++++++ 3 files changed, 232 insertions(+), 1 deletions(-) create mode 100644 drivers/media/v4l2-core/v4l2-clk.c create mode 100644 include/media/v4l2-clk.hdrivers/media/v4l2-core/Makefile +1
-1@@ -5,7 +5,7 @@ tuner-objs := tuner-core.o videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \ - v4l2-event.o v4l2-ctrls.o v4l2-subdev.o + v4l2-event.o v4l2-ctrls.o v4l2-subdev.o v4l2-clk.o ifeq ($(CONFIG_COMPAT),y) videodev-objs += v4l2-compat-ioctl32.o endifdrivers/media/v4l2-core/v4l2-clk.c new file +0
-0@@ -0,0 +1,177 @@-barry
Quoted 2 lines
-barry
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
PATCH v8 1/7 media: V4L2: add temporary clock helpers
2013/4/11 Guennadi Liakhovetski <[email protected]>:
Quoted 33 lines · Barry Song
Quoted 32 lines
2013/4/11 Guennadi Liakhovetski <[email protected]>:
Quoted 29 lines
Hi Barry
Quoted 14 lines · Barry Song
Hi Guennadi,
Quoted 11 lines
Typical video devices like camera sensors require an external clock source. Many such devices cannot even access their hardware registers without a running clock. These clock sources should be controlled by their consumers. This should be performed, using the generic clock framework. Unfortunately so far only very few systems have been ported to that framework. This patch adds a set of temporary helpers, mimicking the generic clock API, to V4L2. Platforms, adopting the clock API, should switch to using it. Eventually this temporary API should be removed.
Signed-off-by Guennadi Liakhovetski <g.liakhovetski@xxxxxx>---
Quoted 8 lines
for your patch 1/8 and 3/8, i think it makes a lot of senses to let the object manages its own clock by itself.
is it possible for us to implementv4l2-clk.cdirectly as an instance of standard clk driver for those systems which don't have generic clock, and remove the V4L2 clock APIs likev4l2_clk_get,v4l2_clk_enablefrom the first day? i meanv4l2-clk.cbecomes a temp and fake clock controller driver. finally, after people have generically clk, remove it.I don't think you can force-enable the CFF on systems, that don't support it, e.g. PXA.
Quoted 6 lines
Quoted 2 lines
yes. we can. clock is only a framework, has it any limitation to implement a driver instance on any platform?
So, you enable CFF, it provides its own clk_* implementation like
clk_get_rate()etc. Now, PXA already has it defined inarch/arm/mach-pxa/clock.c. Don't think this is going to fly.
agree.
Quoted 42 lines
Thanks
GuennadiQuoted 38 lines
people have tried to move to common clk and generic framework for a long time, now you still try to provide a v4l2 specific clock APIs, it just makes v4l2 unacceptable and much complex.
Quoted 34 lines
Thanks
GuennadiQuoted 30 lines
drivers/media/v4l2-core/v4l2-clk.c
Quoted 28 lines
v8: Updated both (C) dates
drivers/media/v4l2-core/Makefile | 2 +- drivers/media/v4l2-core/v4l2-clk.c | 177 ++++++++++++++++++++++++++++++++++++ include/media/v4l2-clk.h | 54 +++++++++++ 3 files changed, 232 insertions(+), 1 deletions(-) create mode 100644 drivers/media/v4l2-core/v4l2-clk.c create mode 100644 include/media/v4l2-clk.hdrivers/media/v4l2-core/Makefile +1
-1@@ -5,7 +5,7 @@ tuner-objs := tuner-core.o videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \ - v4l2-event.o v4l2-ctrls.o v4l2-subdev.o + v4l2-event.o v4l2-ctrls.o v4l2-subdev.o v4l2-clk.o ifeq ($(CONFIG_COMPAT),y) videodev-objs += v4l2-compat-ioctl32.o endifdrivers/media/v4l2-core/v4l2-clk.c new file +0
-0@@ -0,0 +1,177 @@-barry
-barry
PATCH v8 1/7 media: V4L2: add temporary clock helpers
Quoting Barry Song (2013-04-11 01:59:28)
Quoted 34 lines
2013/4/11 Guennadi Liakhovetski <[email protected]>:
Quoted 33 lines · Barry Song
Quoted 32 lines
2013/4/11 Guennadi Liakhovetski <[email protected]>:
Quoted 29 lines
Hi Barry
Quoted 14 lines · Barry Song
Hi Guennadi,
Quoted 11 lines
Typical video devices like camera sensors require an external clock source. Many such devices cannot even access their hardware registers without a running clock. These clock sources should be controlled by their consumers. This should be performed, using the generic clock framework. Unfortunately so far only very few systems have been ported to that framework. This patch adds a set of temporary helpers, mimicking the generic clock API, to V4L2. Platforms, adopting the clock API, should switch to using it. Eventually this temporary API should be removed.
Signed-off-by Guennadi Liakhovetski <g.liakhovetski@xxxxxx>---
Quoted 8 lines
for your patch 1/8 and 3/8, i think it makes a lot of senses to let the object manages its own clock by itself.
is it possible for us to implementv4l2-clk.cdirectly as an instance of standard clk driver for those systems which don't have generic clock, and remove the V4L2 clock APIs likev4l2_clk_get,v4l2_clk_enablefrom the first day? i meanv4l2-clk.cbecomes a temp and fake clock controller driver. finally, after people have generically clk, remove it.I don't think you can force-enable the CFF on systems, that don't support it, e.g. PXA.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
yes. we can. clock is only a framework, has it any limitation to implement a driver instance on any platform?
So, you enable CFF, it provides its own clk_* implementation like
clk_get_rate()etc. Now, PXA already has it defined inarch/arm/mach-pxa/clock.c. Don't think this is going to fly.agree.
Hi,
I came into this thread late and don't have the actual patches in my inbox for review. That said, I don't understand why V4L2 cares about the clk framework *implementation*? The clk.h api is the same for platforms using the common struct clk and those still using the legacy method of defining their own struct clk. If drivers are only consumers of the clk.h api then the implementation underneath should not matter.
Regards,
Mike
Quoted 49 lines
Quoted 42 lines
Thanks
GuennadiQuoted 38 lines
people have tried to move to common clk and generic framework for a long time, now you still try to provide a v4l2 specific clock APIs, it just makes v4l2 unacceptable and much complex.
Quoted 34 lines
Thanks
GuennadiQuoted 30 lines
drivers/media/v4l2-core/v4l2-clk.c
Quoted 28 lines
v8: Updated both (C) dates
drivers/media/v4l2-core/Makefile | 2 +- drivers/media/v4l2-core/v4l2-clk.c | 177 ++++++++++++++++++++++++++++++++++++ include/media/v4l2-clk.h | 54 +++++++++++ 3 files changed, 232 insertions(+), 1 deletions(-) create mode 100644 drivers/media/v4l2-core/v4l2-clk.c create mode 100644 include/media/v4l2-clk.hdrivers/media/v4l2-core/Makefile +1
-1@@ -5,7 +5,7 @@ tuner-objs := tuner-core.o videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \ - v4l2-event.o v4l2-ctrls.o v4l2-subdev.o + v4l2-event.o v4l2-ctrls.o v4l2-subdev.o v4l2-clk.o ifeq ($(CONFIG_COMPAT),y) videodev-objs += v4l2-compat-ioctl32.o endifdrivers/media/v4l2-core/v4l2-clk.c new file +0
-0@@ -0,0 +1,177 @@-barry
-barry
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v8 1/7 media: V4L2: add temporary clock helpers
Hi,
On 04/11/2013 08:52 PM, Mike Turquette wrote:
[...]
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
So, you enable CFF, it provides its own clk_* implementation like
clk_get_rate()etc. Now, PXA already has it defined inarch/arm/mach-pxa/clock.c. Don't think this is going to fly.agree.
Quoted 8 lines
Hi,
I came into this thread late and don't have the actual patches in my inbox for review. That said, I don't understand why V4L2 cares about the clk framework *implementation*? The
clk.hapi is the same for platforms using the common struct clk and those still using the legacy method of defining their own struct clk. If drivers are only consumers of theclk.hapi then the implementation underneath should not matter.
I came to similar conclusions previously, but in case when one of the two drivers is the clock provider I think there is still an issue there.
The drivers are supposed to be platform agnostic, but the clock provider would have to include mach specific declarations of struct clk, wouldn't it ?
Regards,
Sylwester
PATCH v8 1/7 media: V4L2: add temporary clock helpers
In reply to Mike TurquetteHi Mike,
Quoted 39 lines · On Thursday 11 April 2013 11:52:58 Mike Turquette wrote:
Quoting Barry Song (2013-04-11 01:59:28)
Quoted 38 lines
2013/4/11 Guennadi Liakhovetski <[email protected]>:
Quoted 36 lines · Barry Song
Quoted 26 lines
2013/4/11 Guennadi Liakhovetski <[email protected]>:
Quoted 25 lines · Barry Song
Quoted 23 lines
Hi Guennadi,
Quoted 10 lines
Typical video devices like camera sensors require an external clock source. Many such devices cannot even access their hardware registers without a running clock. These clock sources should be controlled by their consumers. This should be performed, using the generic clock framework. Unfortunately so far only very few systems have been ported to that framework. This patch adds a set of temporary helpers, mimicking the generic clock API, to V4L2. Platforms, adopting the clock API, should switch to using it. Eventually this temporary API should be removed.
Quoted 2 lines
Signed-off-by Guennadi Liakhovetski <g.liakhovetski@xxxxxx>---
for your patch 1/8 and 3/8, i think it makes a lot of senses to let the object manages its own clock by itself.
is it possible for us to implementv4l2-clk.cdirectly as an instance of standard clk driver for those systems which don't have generic clock, and remove the V4L2 clock APIs likev4l2_clk_get,v4l2_clk_enablefrom the first day? i meanv4l2-clk.cbecomes a temp and fake clock controller driver. finally, after people have generically clk, remove it.Quoted 5 lines
Quoted 2 lines
I don't think you can force-enable the CFF on systems, that don't support it, e.g. PXA.
yes. we can. clock is only a framework, has it any limitation to implement a driver instance on any platform?
So, you enable CFF, it provides its own clk_* implementation like
clk_get_rate()etc. Now, PXA already has it defined inarch/arm/mach-pxa/clock.c. Don't think this is going to fly.
Quoted 8 lines
Quoted 1 line
agree.
I came into this thread late and don't have the actual patches in my inbox for review. That said, I don't understand why V4L2 cares about the clk framework *implementation*? The
clk.hapi is the same for platforms using the common struct clk and those still using the legacy method of defining their own struct clk. If drivers are only consumers of theclk.hapi then the implementation underneath should not matter.
The issue on non-CCF systems is that devices usually can't register clocks dynamically. (Most of) those systems provide system clocks only through their clock API, without a way for the camera IP core to hook up the clock(s) it can provide to the camera sensor. On the consumer side we don't care much about the clock framework implementation, but on the provider side we need a framework that allows registering non-system clocks at runtime.
Signature · 3 lines
Regards, Laurent Pinchart
PATCH v8 1/7 media: V4L2: add temporary clock helpers
Quoting Laurent Pinchart (2013-04-11 15:35:38)
Quoted 51 lines
Hi Mike,
Quoted 39 lines · On Thursday 11 April 2013 11:52:58 Mike Turquette wrote:
Quoting Barry Song (2013-04-11 01:59:28)
Quoted 38 lines
2013/4/11 Guennadi Liakhovetski <[email protected]>:
Quoted 36 lines · Barry Song
Quoted 26 lines
2013/4/11 Guennadi Liakhovetski <[email protected]>:
Quoted 25 lines · Barry Song
Quoted 23 lines
Hi Guennadi,
Quoted 10 lines
Typical video devices like camera sensors require an external clock source. Many such devices cannot even access their hardware registers without a running clock. These clock sources should be controlled by their consumers. This should be performed, using the generic clock framework. Unfortunately so far only very few systems have been ported to that framework. This patch adds a set of temporary helpers, mimicking the generic clock API, to V4L2. Platforms, adopting the clock API, should switch to using it. Eventually this temporary API should be removed.
Quoted 2 lines
Signed-off-by Guennadi Liakhovetski <g.liakhovetski@xxxxxx>---
for your patch 1/8 and 3/8, i think it makes a lot of senses to let the object manages its own clock by itself.
is it possible for us to implementv4l2-clk.cdirectly as an instance of standard clk driver for those systems which don't have generic clock, and remove the V4L2 clock APIs likev4l2_clk_get,v4l2_clk_enablefrom the first day? i meanv4l2-clk.cbecomes a temp and fake clock controller driver. finally, after people have generically clk, remove it.Quoted 5 lines
Quoted 2 lines
I don't think you can force-enable the CFF on systems, that don't support it, e.g. PXA.
yes. we can. clock is only a framework, has it any limitation to implement a driver instance on any platform?
So, you enable CFF, it provides its own clk_* implementation like
clk_get_rate()etc. Now, PXA already has it defined inarch/arm/mach-pxa/clock.c. Don't think this is going to fly.Quoted 8 lines
Quoted 1 line
agree.
I came into this thread late and don't have the actual patches in my inbox for review. That said, I don't understand why V4L2 cares about the clk framework *implementation*? The
clk.hapi is the same for platforms using the common struct clk and those still using the legacy method of defining their own struct clk. If drivers are only consumers of theclk.hapi then the implementation underneath should not matter.
Quoted 7 lines
The issue on non-CCF systems is that devices usually can't register clocks dynamically. (Most of) those systems provide system clocks only through their clock API, without a way for the camera IP core to hook up the clock(s) it can provide to the camera sensor. On the consumer side we don't care much about the clock framework implementation, but on the provider side we need a framework that allows registering non-system clocks at runtime.
Yes, you do care about the clock framework implementation if you are a clock provider. I still haven't gone through the archives to find these patches but I hope that any dependency on CONFIG_COMMON_CLK is conditionalized to have the smallest impact possible. Making v4l2 as a whole depend on COMMON_CLK might be a bit overkill compared to just making individual camera drivers depend on it.
Regards,
Mike
Quoted 4 lines
Signature · 3 lines
Regards, Laurent Pinchart
PATCH v8 1/7 media: V4L2: add temporary clock helpers
Hi Mike,
Quoted 2 lines · On Thursday 11 April 2013 16:19:23 Mike Turquette wrote:
Quoting Laurent Pinchart (2013-04-11 15:35:38)
Quoted 1 line · On Thursday 11 April 2013 11:52:58 Mike Turquette wrote:
[snip]
Quoted 15 lines
Quoted 7 lines
Quoted 6 lines
I came into this thread late and don't have the actual patches in my inbox for review. That said, I don't understand why V4L2 cares about the clk framework *implementation*? The
clk.hapi is the same for platforms using the common struct clk and those still using the legacy method of defining their own struct clk. If drivers are only consumers of theclk.hapi then the implementation underneath should not matter.Quoted 7 lines
The issue on non-CCF systems is that devices usually can't register clocks dynamically. (Most of) those systems provide system clocks only through their clock API, without a way for the camera IP core to hook up the clock(s) it can provide to the camera sensor. On the consumer side we don't care much about the clock framework implementation, but on the provider side we need a framework that allows registering non-system clocks at runtime.
Quoted 6 lines
Yes, you do care about the clock framework implementation if you are a clock provider. I still haven't gone through the archives to find these patches but I hope that any dependency on
CONFIG_COMMON_CLKis conditionalized to have the smallest impact possible. Making v4l2 as a whole depend onCOMMON_CLKmight be a bit overkill compared to just making individual camera drivers depend on it.
The basic idea is to push the dependency on CONFIG_COMMON_CLK to individual drivers, and provide a V4L2-specific clock framework (that looks like a stripped-down version of CCF) for platforms that don't implement CCF yet.
Signature · 3 lines
Regards, Laurent Pinchart