* [PATCH] mt9m111: add support for mt9m112 since sensors seem identical
@ 2008-11-25 8:59 Mike Rapoport
2008-11-25 18:46 ` Robert Jarzmik
2008-11-25 21:30 ` Guennadi Liakhovetski
0 siblings, 2 replies; 10+ messages in thread
From: Mike Rapoport @ 2008-11-25 8:59 UTC (permalink / raw)
To: robert.jarzmik; +Cc: video4linux-list
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
---
drivers/media/video/mt9m111.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
index da0b2d5..49c1167 100644
--- a/drivers/media/video/mt9m111.c
+++ b/drivers/media/video/mt9m111.c
@@ -841,7 +841,8 @@ static int mt9m111_video_probe(struct soc_camera_device *icd)
data = reg_read(CHIP_VERSION);
switch (data) {
- case 0x143a:
+ case 0x143a: /* MT9M111 */
+ case 0x148c: /* MT9M112 */
mt9m111->model = V4L2_IDENT_MT9M111;
icd->formats = mt9m111_colour_formats;
icd->num_formats = ARRAY_SIZE(mt9m111_colour_formats);
--
1.5.6.4
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] mt9m111: add support for mt9m112 since sensors seem identical
2008-11-25 8:59 [PATCH] mt9m111: add support for mt9m112 since sensors seem identical Mike Rapoport
@ 2008-11-25 18:46 ` Robert Jarzmik
2008-11-25 21:30 ` Guennadi Liakhovetski
1 sibling, 0 replies; 10+ messages in thread
From: Robert Jarzmik @ 2008-11-25 18:46 UTC (permalink / raw)
To: Mike Rapoport; +Cc: video4linux-list
Mike Rapoport <mike@compulab.co.il> writes:
> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
> ---
> drivers/media/video/mt9m111.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
Yes, only sensor size and version seem different. I presume you have checked
that the I2C addresses are the same (0x5d or 0x48), and the datasheets match ?
Then, would be please make me a favor : modify the Kconfig and mt9m111 comments
to reflect that mt9m112 support is provided, please ?
Cheers.
--
Robert
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mt9m111: add support for mt9m112 since sensors seem identical
2008-11-25 8:59 [PATCH] mt9m111: add support for mt9m112 since sensors seem identical Mike Rapoport
2008-11-25 18:46 ` Robert Jarzmik
@ 2008-11-25 21:30 ` Guennadi Liakhovetski
2008-11-26 9:43 ` Mike Rapoport
1 sibling, 1 reply; 10+ messages in thread
From: Guennadi Liakhovetski @ 2008-11-25 21:30 UTC (permalink / raw)
To: Mike Rapoport; +Cc: video4linux-list
On Tue, 25 Nov 2008, Mike Rapoport wrote:
>
> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
> ---
> drivers/media/video/mt9m111.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
> index da0b2d5..49c1167 100644
> --- a/drivers/media/video/mt9m111.c
> +++ b/drivers/media/video/mt9m111.c
> @@ -841,7 +841,8 @@ static int mt9m111_video_probe(struct soc_camera_device *icd)
> data = reg_read(CHIP_VERSION);
>
> switch (data) {
> - case 0x143a:
> + case 0x143a: /* MT9M111 */
> + case 0x148c: /* MT9M112 */
> mt9m111->model = V4L2_IDENT_MT9M111;
Wouldn't it be better to add a new chip ID? Are there any differences
between the two models, that the user might want to know about?
Thanks
Guennadi
> icd->formats = mt9m111_colour_formats;
> icd->num_formats = ARRAY_SIZE(mt9m111_colour_formats);
> --
> 1.5.6.4
>
> --
> video4linux-list mailing list
> Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/video4linux-list
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mt9m111: add support for mt9m112 since sensors seem identical
2008-11-25 21:30 ` Guennadi Liakhovetski
@ 2008-11-26 9:43 ` Mike Rapoport
2008-11-30 7:38 ` Mike Rapoport
0 siblings, 1 reply; 10+ messages in thread
From: Mike Rapoport @ 2008-11-26 9:43 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: video4linux-list
Guennadi Liakhovetski wrote:
> On Tue, 25 Nov 2008, Mike Rapoport wrote:
>
>> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
>> ---
>> drivers/media/video/mt9m111.c | 3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
>> index da0b2d5..49c1167 100644
>> --- a/drivers/media/video/mt9m111.c
>> +++ b/drivers/media/video/mt9m111.c
>> @@ -841,7 +841,8 @@ static int mt9m111_video_probe(struct soc_camera_device *icd)
>> data = reg_read(CHIP_VERSION);
>>
>> switch (data) {
>> - case 0x143a:
>> + case 0x143a: /* MT9M111 */
>> + case 0x148c: /* MT9M112 */
>> mt9m111->model = V4L2_IDENT_MT9M111;
>
> Wouldn't it be better to add a new chip ID? Are there any differences
> between the two models, that the user might want to know about?
I don't have mt9m111 datasheet, I can only judge by "feature comparison" table
in the mt9m112 datasheet. It seems that sensors differ in there advanced image
processing and low power mode capabilities.
If you think it's worse adding new chip ID, I'll prepare the patches.
> Thanks
> Guennadi
>
>> icd->formats = mt9m111_colour_formats;
>> icd->num_formats = ARRAY_SIZE(mt9m111_colour_formats);
>> --
>> 1.5.6.4
>>
>> --
>> video4linux-list mailing list
>> Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
>> https://www.redhat.com/mailman/listinfo/video4linux-list
>>
>
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
>
--
Sincerely yours,
Mike.
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mt9m111: add support for mt9m112 since sensors seem identical
2008-11-26 9:43 ` Mike Rapoport
@ 2008-11-30 7:38 ` Mike Rapoport
2008-12-01 8:30 ` Guennadi Liakhovetski
0 siblings, 1 reply; 10+ messages in thread
From: Mike Rapoport @ 2008-11-30 7:38 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: video4linux-list
Guennadi, Robert,
Mike Rapoport wrote:
>
> Guennadi Liakhovetski wrote:
>> On Tue, 25 Nov 2008, Mike Rapoport wrote:
>>
>>> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
>>> ---
>>> drivers/media/video/mt9m111.c | 3 ++-
>>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
>>> index da0b2d5..49c1167 100644
>>> --- a/drivers/media/video/mt9m111.c
>>> +++ b/drivers/media/video/mt9m111.c
>>> @@ -841,7 +841,8 @@ static int mt9m111_video_probe(struct soc_camera_device *icd)
>>> data = reg_read(CHIP_VERSION);
>>>
>>> switch (data) {
>>> - case 0x143a:
>>> + case 0x143a: /* MT9M111 */
>>> + case 0x148c: /* MT9M112 */
>>> mt9m111->model = V4L2_IDENT_MT9M111;
>> Wouldn't it be better to add a new chip ID? Are there any differences
>> between the two models, that the user might want to know about?
>
> I don't have mt9m111 datasheet, I can only judge by "feature comparison" table
> in the mt9m112 datasheet. It seems that sensors differ in there advanced image
> processing and low power mode capabilities.
> If you think it's worse adding new chip ID, I'll prepare the patches.
Any comments? Should I add a new chip ID, or modifying Kconfig and comments would
be enough?
>> Thanks
>> Guennadi
>>
>>> icd->formats = mt9m111_colour_formats;
>>> icd->num_formats = ARRAY_SIZE(mt9m111_colour_formats);
>>> --
>>> 1.5.6.4
>>>
>>> --
>>> video4linux-list mailing list
>>> Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
>>> https://www.redhat.com/mailman/listinfo/video4linux-list
>>>
>> ---
>> Guennadi Liakhovetski, Ph.D.
>> Freelance Open-Source Software Developer
>>
>
--
Sincerely yours,
Mike.
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mt9m111: add support for mt9m112 since sensors seem identical
2008-11-30 7:38 ` Mike Rapoport
@ 2008-12-01 8:30 ` Guennadi Liakhovetski
2008-12-03 8:01 ` [PATCH 1/2] " Mike Rapoport
2008-12-03 8:02 ` [PATCH 2/2] " Mike Rapoport
0 siblings, 2 replies; 10+ messages in thread
From: Guennadi Liakhovetski @ 2008-12-01 8:30 UTC (permalink / raw)
To: Mike Rapoport; +Cc: video4linux-list
On Sun, 30 Nov 2008, Mike Rapoport wrote:
> Guennadi, Robert,
>
> Mike Rapoport wrote:
> >
> > Guennadi Liakhovetski wrote:
> >> On Tue, 25 Nov 2008, Mike Rapoport wrote:
> >>
> >>> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
> >>> ---
> >>> drivers/media/video/mt9m111.c | 3 ++-
> >>> 1 files changed, 2 insertions(+), 1 deletions(-)
> >>>
> >>> diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
> >>> index da0b2d5..49c1167 100644
> >>> --- a/drivers/media/video/mt9m111.c
> >>> +++ b/drivers/media/video/mt9m111.c
> >>> @@ -841,7 +841,8 @@ static int mt9m111_video_probe(struct soc_camera_device *icd)
> >>> data = reg_read(CHIP_VERSION);
> >>>
> >>> switch (data) {
> >>> - case 0x143a:
> >>> + case 0x143a: /* MT9M111 */
> >>> + case 0x148c: /* MT9M112 */
> >>> mt9m111->model = V4L2_IDENT_MT9M111;
> >> Wouldn't it be better to add a new chip ID? Are there any differences
> >> between the two models, that the user might want to know about?
> >
> > I don't have mt9m111 datasheet, I can only judge by "feature comparison" table
> > in the mt9m112 datasheet. It seems that sensors differ in there advanced image
> > processing and low power mode capabilities.
> > If you think it's worse adding new chip ID, I'll prepare the patches.
>
> Any comments? Should I add a new chip ID, or modifying Kconfig and comments would
> be enough?
Personally, I think, it is nicer for a user to get precise information
about their hardware. So, yes, I would add another ID, even if we don't
support any extra features for now.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] mt9m111: add support for mt9m112 since sensors seem identical
2008-12-01 8:30 ` Guennadi Liakhovetski
@ 2008-12-03 8:01 ` Mike Rapoport
2008-12-03 8:02 ` [PATCH 2/2] " Mike Rapoport
1 sibling, 0 replies; 10+ messages in thread
From: Mike Rapoport @ 2008-12-03 8:01 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: video4linux-list
Add MT9M112 chip id
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
include/media/v4l2-chip-ident.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h
index d73a8e9..50df634 100644
--- a/include/media/v4l2-chip-ident.h
+++ b/include/media/v4l2-chip-ident.h
@@ -166,6 +166,7 @@ enum {
V4L2_IDENT_MT9M001C12ST = 45000,
V4L2_IDENT_MT9M001C12STM = 45005,
V4L2_IDENT_MT9M111 = 45007,
+ V4L2_IDENT_MT9M112 = 45008,
V4L2_IDENT_MT9V022IX7ATC = 45010, /* No way to detect "normal" I77ATx */
V4L2_IDENT_MT9V022IX7ATM = 45015, /* and "lead free" IA7ATx chips */
};
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] mt9m111: add support for mt9m112 since sensors seem identical
2008-12-01 8:30 ` Guennadi Liakhovetski
2008-12-03 8:01 ` [PATCH 1/2] " Mike Rapoport
@ 2008-12-03 8:02 ` Mike Rapoport
2008-12-03 8:14 ` Guennadi Liakhovetski
1 sibling, 1 reply; 10+ messages in thread
From: Mike Rapoport @ 2008-12-03 8:02 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: video4linux-list
Update mt9m11 driver and Kconfig
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
drivers/media/video/Kconfig | 4 ++--
drivers/media/video/mt9m111.c | 16 ++++++++++------
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index 47102c2..0848032 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -725,10 +725,10 @@ config MT9M001_PCA9536_SWITCH
extender to switch between 8 and 10 bit datawidth modes
config SOC_CAMERA_MT9M111
- tristate "mt9m111 support"
+ tristate "mt9m111 and mt9m112 support"
depends on SOC_CAMERA && I2C
help
- This driver supports MT9M111 cameras from Micron
+ This driver supports MT9M111 and MT9M112 cameras from Micron
config SOC_CAMERA_MT9V022
tristate "mt9v022 support"
diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
index da0b2d5..9a428b7 100644
--- a/drivers/media/video/mt9m111.c
+++ b/drivers/media/video/mt9m111.c
@@ -1,5 +1,5 @@
/*
- * Driver for MT9M111 CMOS Image Sensor from Micron
+ * Driver for MT9M111/MT9M112 CMOS Image Sensor from Micron
*
* Copyright (C) 2008, Robert Jarzmik <robert.jarzmik@free.fr>
*
@@ -19,7 +19,7 @@
#include <media/soc_camera.h>
/*
- * mt9m111 i2c address is 0x5d or 0x48 (depending on SAddr pin)
+ * mt9m111 and mt9m112 i2c address is 0x5d or 0x48 (depending on SAddr pin)
* The platform has to define i2c_board_info and call i2c_register_board_info()
*/
@@ -841,10 +841,11 @@ static int mt9m111_video_probe(struct soc_camera_device *icd)
data = reg_read(CHIP_VERSION);
switch (data) {
- case 0x143a:
+ case 0x143a: /* MT9M111 */
mt9m111->model = V4L2_IDENT_MT9M111;
- icd->formats = mt9m111_colour_formats;
- icd->num_formats = ARRAY_SIZE(mt9m111_colour_formats);
+ break;
+ case 0x148c: /* MT9M112 */
+ mt9m111->model = V4L2_IDENT_MT9M112;
break;
default:
ret = -ENODEV;
@@ -853,6 +854,9 @@ static int mt9m111_video_probe(struct soc_camera_device *icd)
goto ei2c;
}
+ icd->formats = mt9m111_colour_formats;
+ icd->num_formats = ARRAY_SIZE(mt9m111_colour_formats);
+
dev_info(&icd->dev, "Detected a MT9M111 chip ID 0x143a\n");
ret = soc_camera_video_start(icd);
@@ -968,6 +972,6 @@ static void __exit mt9m111_mod_exit(void)
module_init(mt9m111_mod_init);
module_exit(mt9m111_mod_exit);
-MODULE_DESCRIPTION("Micron MT9M111 Camera driver");
+MODULE_DESCRIPTION("Micron MT9M111/MT9M112 Camera driver");
MODULE_AUTHOR("Robert Jarzmik");
MODULE_LICENSE("GPL");
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] mt9m111: add support for mt9m112 since sensors seem identical
2008-12-03 8:02 ` [PATCH 2/2] " Mike Rapoport
@ 2008-12-03 8:14 ` Guennadi Liakhovetski
2008-12-03 8:23 ` Mike Rapoport
0 siblings, 1 reply; 10+ messages in thread
From: Guennadi Liakhovetski @ 2008-12-03 8:14 UTC (permalink / raw)
To: Mike Rapoport; +Cc: video4linux-list
On Wed, 3 Dec 2008, Mike Rapoport wrote:
> Update mt9m11 driver and Kconfig
>
> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
>
> drivers/media/video/Kconfig | 4 ++--
> drivers/media/video/mt9m111.c | 16 ++++++++++------
> 2 files changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
> index 47102c2..0848032 100644
> --- a/drivers/media/video/Kconfig
> +++ b/drivers/media/video/Kconfig
> @@ -725,10 +725,10 @@ config MT9M001_PCA9536_SWITCH
> extender to switch between 8 and 10 bit datawidth modes
>
> config SOC_CAMERA_MT9M111
> - tristate "mt9m111 support"
> + tristate "mt9m111 and mt9m112 support"
> depends on SOC_CAMERA && I2C
> help
> - This driver supports MT9M111 cameras from Micron
> + This driver supports MT9M111 and MT9M112 cameras from Micron
>
> config SOC_CAMERA_MT9V022
> tristate "mt9v022 support"
> diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
> index da0b2d5..9a428b7 100644
> --- a/drivers/media/video/mt9m111.c
> +++ b/drivers/media/video/mt9m111.c
> @@ -1,5 +1,5 @@
> /*
> - * Driver for MT9M111 CMOS Image Sensor from Micron
> + * Driver for MT9M111/MT9M112 CMOS Image Sensor from Micron
> *
> * Copyright (C) 2008, Robert Jarzmik <robert.jarzmik@free.fr>
> *
> @@ -19,7 +19,7 @@
> #include <media/soc_camera.h>
>
> /*
> - * mt9m111 i2c address is 0x5d or 0x48 (depending on SAddr pin)
> + * mt9m111 and mt9m112 i2c address is 0x5d or 0x48 (depending on SAddr pin)
> * The platform has to define i2c_board_info and call i2c_register_board_info()
> */
>
> @@ -841,10 +841,11 @@ static int mt9m111_video_probe(struct soc_camera_device *icd)
> data = reg_read(CHIP_VERSION);
>
> switch (data) {
> - case 0x143a:
> + case 0x143a: /* MT9M111 */
> mt9m111->model = V4L2_IDENT_MT9M111;
> - icd->formats = mt9m111_colour_formats;
> - icd->num_formats = ARRAY_SIZE(mt9m111_colour_formats);
> + break;
> + case 0x148c: /* MT9M112 */
> + mt9m111->model = V4L2_IDENT_MT9M112;
> break;
> default:
> ret = -ENODEV;
> @@ -853,6 +854,9 @@ static int mt9m111_video_probe(struct soc_camera_device *icd)
> goto ei2c;
> }
>
> + icd->formats = mt9m111_colour_formats;
> + icd->num_formats = ARRAY_SIZE(mt9m111_colour_formats);
> +
> dev_info(&icd->dev, "Detected a MT9M111 chip ID 0x143a\n");
Hm, looks like you missed at least one: ^^^^^^^^^^^^^^^^^^^^^^. Please
update.
Also, if you search for "dev_" you'll see a couple more strings like
dev_err(&icd->dev,
"No MT9M111 chip detected, register read %x\n", data);
I think, you can just update them to mt9m11x.
Thanks
Guennadi
>
> ret = soc_camera_video_start(icd);
> @@ -968,6 +972,6 @@ static void __exit mt9m111_mod_exit(void)
> module_init(mt9m111_mod_init);
> module_exit(mt9m111_mod_exit);
>
> -MODULE_DESCRIPTION("Micron MT9M111 Camera driver");
> +MODULE_DESCRIPTION("Micron MT9M111/MT9M112 Camera driver");
> MODULE_AUTHOR("Robert Jarzmik");
> MODULE_LICENSE("GPL");
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] mt9m111: add support for mt9m112 since sensors seem identical
2008-12-03 8:14 ` Guennadi Liakhovetski
@ 2008-12-03 8:23 ` Mike Rapoport
0 siblings, 0 replies; 10+ messages in thread
From: Mike Rapoport @ 2008-12-03 8:23 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: video4linux-list
Guennadi Liakhovetski wrote:
> On Wed, 3 Dec 2008, Mike Rapoport wrote:
>
>>
>> + icd->formats = mt9m111_colour_formats;
>> + icd->num_formats = ARRAY_SIZE(mt9m111_colour_formats);
>> +
>> dev_info(&icd->dev, "Detected a MT9M111 chip ID 0x143a\n");
>
> Hm, looks like you missed at least one: ^^^^^^^^^^^^^^^^^^^^^^. Please
> update.
>
> Also, if you search for "dev_" you'll see a couple more strings like
>
> dev_err(&icd->dev,
> "No MT9M111 chip detected, register read %x\n", data);
>
> I think, you can just update them to mt9m11x.
Done.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
drivers/media/video/Kconfig | 4 ++--
drivers/media/video/mt9m111.c | 28 ++++++++++++++++------------
2 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index 47102c2..0848032 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -725,10 +725,10 @@ config MT9M001_PCA9536_SWITCH
extender to switch between 8 and 10 bit datawidth modes
config SOC_CAMERA_MT9M111
- tristate "mt9m111 support"
+ tristate "mt9m111 and mt9m112 support"
depends on SOC_CAMERA && I2C
help
- This driver supports MT9M111 cameras from Micron
+ This driver supports MT9M111 and MT9M112 cameras from Micron
config SOC_CAMERA_MT9V022
tristate "mt9v022 support"
diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
index da0b2d5..ac48001 100644
--- a/drivers/media/video/mt9m111.c
+++ b/drivers/media/video/mt9m111.c
@@ -1,5 +1,5 @@
/*
- * Driver for MT9M111 CMOS Image Sensor from Micron
+ * Driver for MT9M111/MT9M112 CMOS Image Sensor from Micron
*
* Copyright (C) 2008, Robert Jarzmik <robert.jarzmik@free.fr>
*
@@ -19,7 +19,7 @@
#include <media/soc_camera.h>
/*
- * mt9m111 i2c address is 0x5d or 0x48 (depending on SAddr pin)
+ * mt9m111 and mt9m112 i2c address is 0x5d or 0x48 (depending on SAddr pin)
* The platform has to define i2c_board_info and call i2c_register_board_info()
*/
@@ -145,7 +145,7 @@ enum mt9m111_context {
struct mt9m111 {
struct i2c_client *client;
struct soc_camera_device icd;
- int model; /* V4L2_IDENT_MT9M111* codes from v4l2-chip-ident.h */
+ int model; /* V4L2_IDENT_MT9M11x* codes from v4l2-chip-ident.h */
enum mt9m111_context context;
unsigned int left, top, width, height;
u32 pixfmt;
@@ -798,7 +798,7 @@ static int mt9m111_init(struct soc_camera_device *icd)
if (!ret)
ret = mt9m111_set_autoexposure(icd, mt9m111->autoexposure);
if (ret)
- dev_err(&icd->dev, "mt9m111 init failed: %d\n", ret);
+ dev_err(&icd->dev, "mt9m11x init failed: %d\n", ret);
return ret;
}
@@ -808,7 +808,7 @@ static int mt9m111_release(struct soc_camera_device *icd)
ret = mt9m111_disable(icd);
if (ret < 0)
- dev_err(&icd->dev, "mt9m111 release failed: %d\n", ret);
+ dev_err(&icd->dev, "mt9m11x release failed: %d\n", ret);
return ret;
}
@@ -841,19 +841,23 @@ static int mt9m111_video_probe(struct soc_camera_device *icd)
data = reg_read(CHIP_VERSION);
switch (data) {
- case 0x143a:
+ case 0x143a: /* MT9M111 */
mt9m111->model = V4L2_IDENT_MT9M111;
- icd->formats = mt9m111_colour_formats;
- icd->num_formats = ARRAY_SIZE(mt9m111_colour_formats);
+ break;
+ case 0x148c: /* MT9M112 */
+ mt9m111->model = V4L2_IDENT_MT9M112;
break;
default:
ret = -ENODEV;
dev_err(&icd->dev,
- "No MT9M111 chip detected, register read %x\n", data);
+ "No MT9M11x chip detected, register read %x\n", data);
goto ei2c;
}
- dev_info(&icd->dev, "Detected a MT9M111 chip ID 0x143a\n");
+ icd->formats = mt9m111_colour_formats;
+ icd->num_formats = ARRAY_SIZE(mt9m111_colour_formats);
+
+ dev_info(&icd->dev, "Detected a MT9M11x chip ID %x\n", data);
ret = soc_camera_video_start(icd);
if (ret)
@@ -889,7 +893,7 @@ static int mt9m111_probe(struct i2c_client *client,
int ret;
if (!icl) {
- dev_err(&client->dev, "MT9M111 driver needs platform data\n");
+ dev_err(&client->dev, "MT9M11x driver needs platform data\n");
return -EINVAL;
}
@@ -968,6 +972,6 @@ static void __exit mt9m111_mod_exit(void)
module_init(mt9m111_mod_init);
module_exit(mt9m111_mod_exit);
-MODULE_DESCRIPTION("Micron MT9M111 Camera driver");
+MODULE_DESCRIPTION("Micron MT9M111/MT9M112 Camera driver");
MODULE_AUTHOR("Robert Jarzmik");
MODULE_LICENSE("GPL");
--
Sincerely yours,
Mike.
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-12-03 8:24 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-25 8:59 [PATCH] mt9m111: add support for mt9m112 since sensors seem identical Mike Rapoport
2008-11-25 18:46 ` Robert Jarzmik
2008-11-25 21:30 ` Guennadi Liakhovetski
2008-11-26 9:43 ` Mike Rapoport
2008-11-30 7:38 ` Mike Rapoport
2008-12-01 8:30 ` Guennadi Liakhovetski
2008-12-03 8:01 ` [PATCH 1/2] " Mike Rapoport
2008-12-03 8:02 ` [PATCH 2/2] " Mike Rapoport
2008-12-03 8:14 ` Guennadi Liakhovetski
2008-12-03 8:23 ` Mike Rapoport
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox