* [OMAPZOOM][PATCH] OMAP34XXCAM: PM: Fix ifdefs to CONFIG_OMAP3_PM
@ 2009-01-13 16:16 Aguirre Rodriguez, Sergio Alberto
2009-01-14 12:54 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Aguirre Rodriguez, Sergio Alberto @ 2009-01-13 16:16 UTC (permalink / raw)
To: linux-omap@vger.kernel.org; +Cc: Pandita, Vikram
>From 61698ca9a061f99c8f1d970a0a13c6f4d61b8e61 Mon Sep 17 00:00:00 2001
From: Sergio Aguirre <saaguirre@ti.com>
Date: Tue, 13 Jan 2009 10:06:49 -0600
Subject: [PATCH] OMAP34XXCAM: PM: Fix ifdefs to CONFIG_OMAP3_PM
This patch fixes ifdef checking around PM constraints for
OMAP3. This fixes compilation without TI PM.
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Reported-by: Anand Gadiyar <gadiyar@ti.com>
---
drivers/media/video/omap34xxcam.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/media/video/omap34xxcam.c b/drivers/media/video/omap34xxcam.c
index 818ec6e..43eeb1c 100644
--- a/drivers/media/video/omap34xxcam.c
+++ b/drivers/media/video/omap34xxcam.c
@@ -34,7 +34,7 @@
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
-#ifdef CONFIG_PM
+#ifdef CONFIG_OMAP3_PM
#include <mach/resource.h>
#endif
@@ -48,7 +48,7 @@
/* global variables */
static struct omap34xxcam_device *omap34xxcam;
-#ifdef CONFIG_PM
+#ifdef CONFIG_OMAP3_PM
struct constraint_handle *co_opp_camera_vdd1;
struct constraint_handle *co_opp_camera_vdd2;
struct constraint_handle *co_opp_camera_latency;
@@ -61,7 +61,7 @@ static int omap34xxcam_remove(struct platform_device *pdev);
struct omap34xxcam_fh *camfh_saved;
/* constraint */
-#ifdef CONFIG_PM
+#ifdef CONFIG_OMAP3_PM
static struct constraint_id cnstr_id_vdd1 = {
.type = RES_OPP_CO,
.data = (void *)"vdd1_opp",
@@ -725,7 +725,7 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
isp_af_notify(0);
isp_sgdma_init();
-#ifdef CONFIG_PM
+#ifdef CONFIG_OMAP3_PM
if (system_rev >= OMAP3430_REV_ES2_0) {
if (ofh->pix.width >= 640 && ofh->pix.height >= 480) {
/* Setting constraint for VDD1 */
@@ -786,7 +786,7 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)
omap34xxcam_slave_power_set(vdev, V4L2_POWER_STANDBY);
-#ifdef CONFIG_PM
+#ifdef CONFIG_OMAP3_PM
if (system_rev >= OMAP3430_REV_ES2_0) {
if (ofh->pix.width >= 640 && ofh->pix.height >= 480) {
/* Removing constraint for VDD1 */
@@ -1456,7 +1456,7 @@ static int omap34xxcam_release(struct inode *inode, struct file *file)
}
mutex_unlock(&vdev->mutex);
-#ifdef CONFIG_PM
+#ifdef CONFIG_OMAP3_PM
if (system_rev >= OMAP3430_REV_ES2_0) {
if (remove_constraints) {
if (fh->pix.width >= 640 && fh->pix.height >= 480) {
@@ -1828,7 +1828,7 @@ static int omap34xxcam_probe(struct platform_device *pdev)
omap34xxcam = cam;
-#ifdef CONFIG_PM
+#ifdef CONFIG_OMAP3_PM
if (system_rev >= OMAP3430_REV_ES2_0) {
/* Getting constraint for VDD1 and VDD2 */
co_opp_camera_latency = constraint_get("omap34xxcam",
@@ -1882,7 +1882,7 @@ static int omap34xxcam_remove(struct platform_device *pdev)
cam->mmio_base_phys = 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_OMAP3_PM
if (system_rev >= OMAP3430_REV_ES2_0) {
constraint_put(co_opp_camera_vdd1);
constraint_put(co_opp_camera_vdd2);
--
1.5.6.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [OMAPZOOM][PATCH] OMAP34XXCAM: PM: Fix ifdefs to CONFIG_OMAP3_PM
2009-01-13 16:16 [OMAPZOOM][PATCH] OMAP34XXCAM: PM: Fix ifdefs to CONFIG_OMAP3_PM Aguirre Rodriguez, Sergio Alberto
@ 2009-01-14 12:54 ` Tony Lindgren
2009-01-14 15:02 ` Pandita, Vikram
0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2009-01-14 12:54 UTC (permalink / raw)
To: Aguirre Rodriguez, Sergio Alberto
Cc: linux-omap@vger.kernel.org, Pandita, Vikram
* Aguirre Rodriguez, Sergio Alberto <saaguirre@ti.com> [090114 12:06]:
> From 61698ca9a061f99c8f1d970a0a13c6f4d61b8e61 Mon Sep 17 00:00:00 2001
> From: Sergio Aguirre <saaguirre@ti.com>
> Date: Tue, 13 Jan 2009 10:06:49 -0600
> Subject: [PATCH] OMAP34XXCAM: PM: Fix ifdefs to CONFIG_OMAP3_PM
>
> This patch fixes ifdef checking around PM constraints for
> OMAP3. This fixes compilation without TI PM.
These ifdefs are completely getting out of control in the omap-zoom
tree. There should be absolutely no need for CONFIG_OMAP3_PM.
Any ifdefs like that just make it harder to test the code properly
and further increases the diff from the mainline kernel.
It will also create a nightmare for you trying merge back code from
the mainline kernel. The same for trying create patches to send
upstream.
Tony
> Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
> Reported-by: Anand Gadiyar <gadiyar@ti.com>
> ---
> drivers/media/video/omap34xxcam.c | 16 ++++++++--------
> 1 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/video/omap34xxcam.c b/drivers/media/video/omap34xxcam.c
> index 818ec6e..43eeb1c 100644
> --- a/drivers/media/video/omap34xxcam.c
> +++ b/drivers/media/video/omap34xxcam.c
> @@ -34,7 +34,7 @@
> #include <media/v4l2-common.h>
> #include <media/v4l2-ioctl.h>
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_OMAP3_PM
> #include <mach/resource.h>
> #endif
>
> @@ -48,7 +48,7 @@
> /* global variables */
> static struct omap34xxcam_device *omap34xxcam;
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_OMAP3_PM
> struct constraint_handle *co_opp_camera_vdd1;
> struct constraint_handle *co_opp_camera_vdd2;
> struct constraint_handle *co_opp_camera_latency;
> @@ -61,7 +61,7 @@ static int omap34xxcam_remove(struct platform_device *pdev);
> struct omap34xxcam_fh *camfh_saved;
>
> /* constraint */
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_OMAP3_PM
> static struct constraint_id cnstr_id_vdd1 = {
> .type = RES_OPP_CO,
> .data = (void *)"vdd1_opp",
> @@ -725,7 +725,7 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
> isp_af_notify(0);
> isp_sgdma_init();
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_OMAP3_PM
> if (system_rev >= OMAP3430_REV_ES2_0) {
> if (ofh->pix.width >= 640 && ofh->pix.height >= 480) {
> /* Setting constraint for VDD1 */
> @@ -786,7 +786,7 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)
>
> omap34xxcam_slave_power_set(vdev, V4L2_POWER_STANDBY);
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_OMAP3_PM
> if (system_rev >= OMAP3430_REV_ES2_0) {
> if (ofh->pix.width >= 640 && ofh->pix.height >= 480) {
> /* Removing constraint for VDD1 */
> @@ -1456,7 +1456,7 @@ static int omap34xxcam_release(struct inode *inode, struct file *file)
> }
> mutex_unlock(&vdev->mutex);
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_OMAP3_PM
> if (system_rev >= OMAP3430_REV_ES2_0) {
> if (remove_constraints) {
> if (fh->pix.width >= 640 && fh->pix.height >= 480) {
> @@ -1828,7 +1828,7 @@ static int omap34xxcam_probe(struct platform_device *pdev)
>
> omap34xxcam = cam;
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_OMAP3_PM
> if (system_rev >= OMAP3430_REV_ES2_0) {
> /* Getting constraint for VDD1 and VDD2 */
> co_opp_camera_latency = constraint_get("omap34xxcam",
> @@ -1882,7 +1882,7 @@ static int omap34xxcam_remove(struct platform_device *pdev)
> cam->mmio_base_phys = 0;
> }
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_OMAP3_PM
> if (system_rev >= OMAP3430_REV_ES2_0) {
> constraint_put(co_opp_camera_vdd1);
> constraint_put(co_opp_camera_vdd2);
> --
> 1.5.6.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [OMAPZOOM][PATCH] OMAP34XXCAM: PM: Fix ifdefs to CONFIG_OMAP3_PM
2009-01-14 12:54 ` Tony Lindgren
@ 2009-01-14 15:02 ` Pandita, Vikram
2009-02-03 18:37 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Pandita, Vikram @ 2009-01-14 15:02 UTC (permalink / raw)
To: Tony Lindgren, Aguirre Rodriguez, Sergio Alberto
Cc: linux-omap@vger.kernel.org
>From: Tony Lindgren [mailto:tony@atomide.com]
>Sent: Wednesday, January 14, 2009 6:55 AM
>To: Aguirre Rodriguez, Sergio Alberto
>Cc: linux-omap@vger.kernel.org; Pandita, Vikram
>Subject: Re: [OMAPZOOM][PATCH] OMAP34XXCAM: PM: Fix ifdefs to CONFIG_OMAP3_PM
>
>
>These ifdefs are completely getting out of control in the omap-zoom
>tree. There should be absolutely no need for CONFIG_OMAP3_PM.
There is an absolute need for such an ifdef.
This is an old discussion happened so many times and has been a trigger for the omapzoom.org TI tree.
In l-o tree we do not have complete PM functionality and there are customers that want to go to actual "Products" in market. Eg: Latest Palm Pre and others
The current PM code shaping up on L-O tree is no doubt clean but what about the functionality complete aspect and Time to market.
Till then #ifdefs are the only option.
>
>
>
>
>> Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
>> Reported-by: Anand Gadiyar <gadiyar@ti.com>
>> ---
>> drivers/media/video/omap34xxcam.c | 16 ++++++++--------
>> 1 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/media/video/omap34xxcam.c b/drivers/media/video/omap34xxcam.c
>> index 818ec6e..43eeb1c 100644
>> --- a/drivers/media/video/omap34xxcam.c
>> +++ b/drivers/media/video/omap34xxcam.c
>> @@ -34,7 +34,7 @@
>> #include <media/v4l2-common.h>
>> #include <media/v4l2-ioctl.h>
>>
>> -#ifdef CONFIG_PM
>> +#ifdef CONFIG_OMAP3_PM
>> #include <mach/resource.h>
>> #endif
>>
>> @@ -48,7 +48,7 @@
>> /* global variables */
>> static struct omap34xxcam_device *omap34xxcam;
>>
>> -#ifdef CONFIG_PM
>> +#ifdef CONFIG_OMAP3_PM
>> struct constraint_handle *co_opp_camera_vdd1;
>> struct constraint_handle *co_opp_camera_vdd2;
>> struct constraint_handle *co_opp_camera_latency;
>> @@ -61,7 +61,7 @@ static int omap34xxcam_remove(struct platform_device *pdev);
>> struct omap34xxcam_fh *camfh_saved;
>>
>> /* constraint */
>> -#ifdef CONFIG_PM
>> +#ifdef CONFIG_OMAP3_PM
>> static struct constraint_id cnstr_id_vdd1 = {
>> .type = RES_OPP_CO,
>> .data = (void *)"vdd1_opp",
>> @@ -725,7 +725,7 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
>> isp_af_notify(0);
>> isp_sgdma_init();
>>
>> -#ifdef CONFIG_PM
>> +#ifdef CONFIG_OMAP3_PM
>> if (system_rev >= OMAP3430_REV_ES2_0) {
>> if (ofh->pix.width >= 640 && ofh->pix.height >= 480) {
>> /* Setting constraint for VDD1 */
>> @@ -786,7 +786,7 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)
>>
>> omap34xxcam_slave_power_set(vdev, V4L2_POWER_STANDBY);
>>
>> -#ifdef CONFIG_PM
>> +#ifdef CONFIG_OMAP3_PM
>> if (system_rev >= OMAP3430_REV_ES2_0) {
>> if (ofh->pix.width >= 640 && ofh->pix.height >= 480) {
>> /* Removing constraint for VDD1 */
>> @@ -1456,7 +1456,7 @@ static int omap34xxcam_release(struct inode *inode, struct file *file)
>> }
>> mutex_unlock(&vdev->mutex);
>>
>> -#ifdef CONFIG_PM
>> +#ifdef CONFIG_OMAP3_PM
>> if (system_rev >= OMAP3430_REV_ES2_0) {
>> if (remove_constraints) {
>> if (fh->pix.width >= 640 && fh->pix.height >= 480) {
>> @@ -1828,7 +1828,7 @@ static int omap34xxcam_probe(struct platform_device *pdev)
>>
>> omap34xxcam = cam;
>>
>> -#ifdef CONFIG_PM
>> +#ifdef CONFIG_OMAP3_PM
>> if (system_rev >= OMAP3430_REV_ES2_0) {
>> /* Getting constraint for VDD1 and VDD2 */
>> co_opp_camera_latency = constraint_get("omap34xxcam",
>> @@ -1882,7 +1882,7 @@ static int omap34xxcam_remove(struct platform_device *pdev)
>> cam->mmio_base_phys = 0;
>> }
>>
>> -#ifdef CONFIG_PM
>> +#ifdef CONFIG_OMAP3_PM
>> if (system_rev >= OMAP3430_REV_ES2_0) {
>> constraint_put(co_opp_camera_vdd1);
>> constraint_put(co_opp_camera_vdd2);
>> --
>> 1.5.6.5
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OMAPZOOM][PATCH] OMAP34XXCAM: PM: Fix ifdefs to CONFIG_OMAP3_PM
2009-01-14 15:02 ` Pandita, Vikram
@ 2009-02-03 18:37 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2009-02-03 18:37 UTC (permalink / raw)
To: Pandita, Vikram
Cc: Aguirre Rodriguez, Sergio Alberto, linux-omap@vger.kernel.org
* Pandita, Vikram <vikram.pandita@ti.com> [090114 07:02]:
>
> >From: Tony Lindgren [mailto:tony@atomide.com]
> >Sent: Wednesday, January 14, 2009 6:55 AM
> >To: Aguirre Rodriguez, Sergio Alberto
> >Cc: linux-omap@vger.kernel.org; Pandita, Vikram
> >Subject: Re: [OMAPZOOM][PATCH] OMAP34XXCAM: PM: Fix ifdefs to CONFIG_OMAP3_PM
> >
> >
> >These ifdefs are completely getting out of control in the omap-zoom
> >tree. There should be absolutely no need for CONFIG_OMAP3_PM.
>
> There is an absolute need for such an ifdef.
> This is an old discussion happened so many times and has been a trigger for the omapzoom.org TI tree.
>
> In l-o tree we do not have complete PM functionality and there are customers that want to go to actual "Products" in market. Eg: Latest Palm Pre and others
>
> The current PM code shaping up on L-O tree is no doubt clean but what about the functionality complete aspect and Time to market.
>
> Till then #ifdefs are the only option.
Yet the other platforms don't need silly ifdefs like that?
Believe me writing code based on ifdefs makes it unmaintainable
within months.
Tony
>
>
> >
> >
> >
> >
> >> Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
> >> Reported-by: Anand Gadiyar <gadiyar@ti.com>
> >> ---
> >> drivers/media/video/omap34xxcam.c | 16 ++++++++--------
> >> 1 files changed, 8 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/drivers/media/video/omap34xxcam.c b/drivers/media/video/omap34xxcam.c
> >> index 818ec6e..43eeb1c 100644
> >> --- a/drivers/media/video/omap34xxcam.c
> >> +++ b/drivers/media/video/omap34xxcam.c
> >> @@ -34,7 +34,7 @@
> >> #include <media/v4l2-common.h>
> >> #include <media/v4l2-ioctl.h>
> >>
> >> -#ifdef CONFIG_PM
> >> +#ifdef CONFIG_OMAP3_PM
> >> #include <mach/resource.h>
> >> #endif
> >>
> >> @@ -48,7 +48,7 @@
> >> /* global variables */
> >> static struct omap34xxcam_device *omap34xxcam;
> >>
> >> -#ifdef CONFIG_PM
> >> +#ifdef CONFIG_OMAP3_PM
> >> struct constraint_handle *co_opp_camera_vdd1;
> >> struct constraint_handle *co_opp_camera_vdd2;
> >> struct constraint_handle *co_opp_camera_latency;
> >> @@ -61,7 +61,7 @@ static int omap34xxcam_remove(struct platform_device *pdev);
> >> struct omap34xxcam_fh *camfh_saved;
> >>
> >> /* constraint */
> >> -#ifdef CONFIG_PM
> >> +#ifdef CONFIG_OMAP3_PM
> >> static struct constraint_id cnstr_id_vdd1 = {
> >> .type = RES_OPP_CO,
> >> .data = (void *)"vdd1_opp",
> >> @@ -725,7 +725,7 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
> >> isp_af_notify(0);
> >> isp_sgdma_init();
> >>
> >> -#ifdef CONFIG_PM
> >> +#ifdef CONFIG_OMAP3_PM
> >> if (system_rev >= OMAP3430_REV_ES2_0) {
> >> if (ofh->pix.width >= 640 && ofh->pix.height >= 480) {
> >> /* Setting constraint for VDD1 */
> >> @@ -786,7 +786,7 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)
> >>
> >> omap34xxcam_slave_power_set(vdev, V4L2_POWER_STANDBY);
> >>
> >> -#ifdef CONFIG_PM
> >> +#ifdef CONFIG_OMAP3_PM
> >> if (system_rev >= OMAP3430_REV_ES2_0) {
> >> if (ofh->pix.width >= 640 && ofh->pix.height >= 480) {
> >> /* Removing constraint for VDD1 */
> >> @@ -1456,7 +1456,7 @@ static int omap34xxcam_release(struct inode *inode, struct file *file)
> >> }
> >> mutex_unlock(&vdev->mutex);
> >>
> >> -#ifdef CONFIG_PM
> >> +#ifdef CONFIG_OMAP3_PM
> >> if (system_rev >= OMAP3430_REV_ES2_0) {
> >> if (remove_constraints) {
> >> if (fh->pix.width >= 640 && fh->pix.height >= 480) {
> >> @@ -1828,7 +1828,7 @@ static int omap34xxcam_probe(struct platform_device *pdev)
> >>
> >> omap34xxcam = cam;
> >>
> >> -#ifdef CONFIG_PM
> >> +#ifdef CONFIG_OMAP3_PM
> >> if (system_rev >= OMAP3430_REV_ES2_0) {
> >> /* Getting constraint for VDD1 and VDD2 */
> >> co_opp_camera_latency = constraint_get("omap34xxcam",
> >> @@ -1882,7 +1882,7 @@ static int omap34xxcam_remove(struct platform_device *pdev)
> >> cam->mmio_base_phys = 0;
> >> }
> >>
> >> -#ifdef CONFIG_PM
> >> +#ifdef CONFIG_OMAP3_PM
> >> if (system_rev >= OMAP3430_REV_ES2_0) {
> >> constraint_put(co_opp_camera_vdd1);
> >> constraint_put(co_opp_camera_vdd2);
> >> --
> >> 1.5.6.5
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-02-03 18:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-13 16:16 [OMAPZOOM][PATCH] OMAP34XXCAM: PM: Fix ifdefs to CONFIG_OMAP3_PM Aguirre Rodriguez, Sergio Alberto
2009-01-14 12:54 ` Tony Lindgren
2009-01-14 15:02 ` Pandita, Vikram
2009-02-03 18:37 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox