Message ID | 1307814409-46282-2-git-send-email-corbet@lwn.net (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Tue, 14 Jun 2011 10:23:58 +0800 Kassey Lee <kassey1216@gmail.com> wrote: > Jon, Here is my comments. Thanks for having a look. > > +config VIDEO_CAFE_CCIC > > + tristate "Marvell 88ALP01 (Cafe) CMOS Camera Controller support" > > + depends on PCI && I2C && VIDEO_V4L2 > > + select VIDEO_OV7670 > > > why need binds with sensor ? suppose CCIC driver and sensor driver are > independent, even if your hardware only support OV7670 We all agree that needs to change. This particular patch, though, is concerned with moving a working driver into a new directory; making that sort of functional change would not be appropriate here. > > +#include <media/ov7670.h> > > > ccic would not be aware of the sensor name. Ditto. Thanks, jon -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Jon, if you agree to change it in another patch, and now just to keep it with the driver that works for years. that is OK. thanks. I am looking forward your patch based on VB2, because based on current cafe_ccic.c, it is hard to share with my driver. 2011/6/14 Jonathan Corbet <corbet@lwn.net>: > On Tue, 14 Jun 2011 10:23:58 +0800 > Kassey Lee <kassey1216@gmail.com> wrote: > >> Jon, Here is my comments. > > Thanks for having a look. > >> > +config VIDEO_CAFE_CCIC >> > + tristate "Marvell 88ALP01 (Cafe) CMOS Camera Controller support" >> > + depends on PCI && I2C && VIDEO_V4L2 >> > + select VIDEO_OV7670 >> > >> why need binds with sensor ? suppose CCIC driver and sensor driver are >> independent, even if your hardware only support OV7670 > > We all agree that needs to change. This particular patch, though, is > concerned with moving a working driver into a new directory; making that > sort of functional change would not be appropriate here. > >> > +#include <media/ov7670.h> >> > >> ccic would not be aware of the sensor name. > > Ditto. > > Thanks, > > jon >
Em 14-06-2011 23:01, Kassey Lee escreveu: > Jon, > if you agree to change it in another patch, and now just to keep > it with the driver that works for years. > that is OK. thanks. > I am looking forward your patch based on VB2, because based on > current cafe_ccic.c, it is hard to share with my driver. > > 2011/6/14 Jonathan Corbet <corbet@lwn.net>: >> On Tue, 14 Jun 2011 10:23:58 +0800 >> Kassey Lee <kassey1216@gmail.com> wrote: >> >>> Jon, Here is my comments. >> >> Thanks for having a look. >> >>>> +config VIDEO_CAFE_CCIC >>>> + tristate "Marvell 88ALP01 (Cafe) CMOS Camera Controller support" >>>> + depends on PCI && I2C && VIDEO_V4L2 >>>> + select VIDEO_OV7670 >>>> >>> why need binds with sensor ? suppose CCIC driver and sensor driver are >>> independent, even if your hardware only support OV7670 >> >> We all agree that needs to change. This particular patch, though, is >> concerned with moving a working driver into a new directory; making that >> sort of functional change would not be appropriate here. While cafe-ccic only supports ov7670, the above select is OK, as otherwise, the driver won't be operational. After adding new sensors, however, the above should be changed to: select VIDEO_OV7670 if VIDEO_HELPER_CHIPS_AUTO select VIDEO_FOO if VIDEO_HELPER_CHIPS_AUTO select VIDEO_BAR if VIDEO_HELPER_CHIPS_AUTO ... This way, if VIDEO_HELPER_CHIPS_AUTO is enabled, all the possible sensors used with cafe-ccic will be selected. >> >>>> +#include <media/ov7670.h> >>>> >>> ccic would not be aware of the sensor name. >> >> Ditto. >> >> Thanks, >> >> jon >> > > > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index bb53de7..4847c2c 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -707,6 +707,8 @@ source "drivers/media/video/cx18/Kconfig" source "drivers/media/video/saa7164/Kconfig" +source "drivers/media/video/marvell-ccic/Kconfig" + config VIDEO_M32R_AR tristate "AR devices" depends on M32R && VIDEO_V4L2 @@ -726,15 +728,6 @@ config VIDEO_M32R_AR_M64278 To compile this driver as a module, choose M here: the module will be called arv. -config VIDEO_CAFE_CCIC - tristate "Marvell 88ALP01 (Cafe) CMOS Camera Controller support" - depends on PCI && I2C && VIDEO_V4L2 - select VIDEO_OV7670 - ---help--- - This is a video4linux2 driver for the Marvell 88ALP01 integrated - CMOS camera controller. This is the controller found on first- - generation OLPC systems. - config VIDEO_SR030PC30 tristate "SR030PC30 VGA camera sensor support" depends on I2C && VIDEO_V4L2 diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile index f0fecd6..42b6a7a 100644 --- a/drivers/media/video/Makefile +++ b/drivers/media/video/Makefile @@ -127,7 +127,7 @@ obj-$(CONFIG_VIDEO_M32R_AR_M64278) += arv.o obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o -obj-$(CONFIG_VIDEO_CAFE_CCIC) += cafe_ccic.o +obj-$(CONFIG_VIDEO_CAFE_CCIC) += marvell-ccic/ obj-$(CONFIG_VIDEO_VIA_CAMERA) += via-camera.o diff --git a/drivers/media/video/marvell-ccic/Kconfig b/drivers/media/video/marvell-ccic/Kconfig new file mode 100644 index 0000000..80136a8 --- /dev/null +++ b/drivers/media/video/marvell-ccic/Kconfig @@ -0,0 +1,9 @@ +config VIDEO_CAFE_CCIC + tristate "Marvell 88ALP01 (Cafe) CMOS Camera Controller support" + depends on PCI && I2C && VIDEO_V4L2 + select VIDEO_OV7670 + ---help--- + This is a video4linux2 driver for the Marvell 88ALP01 integrated + CMOS camera controller. This is the controller found on first- + generation OLPC systems. + diff --git a/drivers/media/video/marvell-ccic/Makefile b/drivers/media/video/marvell-ccic/Makefile new file mode 100644 index 0000000..1234725 --- /dev/null +++ b/drivers/media/video/marvell-ccic/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_VIDEO_CAFE_CCIC) += cafe_ccic.o diff --git a/drivers/media/video/cafe_ccic-regs.h b/drivers/media/video/marvell-ccic/cafe_ccic-regs.h similarity index 100% rename from drivers/media/video/cafe_ccic-regs.h rename to drivers/media/video/marvell-ccic/cafe_ccic-regs.h diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/marvell-ccic/cafe_ccic.c similarity index 99% rename from drivers/media/video/cafe_ccic.c rename to drivers/media/video/marvell-ccic/cafe_ccic.c index 6647033..809964b 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/marvell-ccic/cafe_ccic.c @@ -36,6 +36,7 @@ #include <media/v4l2-device.h> #include <media/v4l2-ioctl.h> #include <media/v4l2-chip-ident.h> +#include <media/ov7670.h> #include <linux/device.h> #include <linux/wait.h> #include <linux/list.h> @@ -47,7 +48,6 @@ #include <asm/uaccess.h> #include <asm/io.h> -#include "ov7670.h" #include "cafe_ccic-regs.h" #define CAFE_VERSION 0x000002 diff --git a/drivers/media/video/ov7670.c b/drivers/media/video/ov7670.c index d4e7c11..8aa0585 100644 --- a/drivers/media/video/ov7670.c +++ b/drivers/media/video/ov7670.c @@ -19,8 +19,7 @@ #include <media/v4l2-device.h> #include <media/v4l2-chip-ident.h> #include <media/v4l2-mediabus.h> - -#include "ov7670.h" +#include <media/ov7670.h> MODULE_AUTHOR("Jonathan Corbet <corbet@lwn.net>"); MODULE_DESCRIPTION("A low-level driver for OmniVision ov7670 sensors");
This driver will soon become a family of drivers, so let's give it its own place to live. This move requires putting ov7670.h into include/media, but there are no code changes. Cc: Daniel Drake <dsd@laptop.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> --- drivers/media/video/Kconfig | 11 ++--------- drivers/media/video/Makefile | 2 +- drivers/media/video/marvell-ccic/Kconfig | 9 +++++++++ drivers/media/video/marvell-ccic/Makefile | 1 + .../video/{ => marvell-ccic}/cafe_ccic-regs.h | 0 drivers/media/video/{ => marvell-ccic}/cafe_ccic.c | 2 +- drivers/media/video/ov7670.c | 3 +-- {drivers/media/video => include/media}/ov7670.h | 0 8 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 drivers/media/video/marvell-ccic/Kconfig create mode 100644 drivers/media/video/marvell-ccic/Makefile rename drivers/media/video/{ => marvell-ccic}/cafe_ccic-regs.h (100%) rename drivers/media/video/{ => marvell-ccic}/cafe_ccic.c (99%) rename {drivers/media/video => include/media}/ov7670.h (100%) diff --git a/drivers/media/video/ov7670.h b/include/media/ov7670.h similarity index 100% rename from drivers/media/video/ov7670.h rename to include/media/ov7670.h