media: i2c: ov02c10: Narrow chip id check down to match ov02c chips only
PATCH 1/1 media: i2c: ov02c10: Narrow chip id check down to match ov02c chips only
Originally a chip id check in the driver's probe function is done for any OmniVision "ov02" sensors, but is too wide, since there are at least "ov02a", "ov02b", "ov02c", "ov02e", "ov02g", "ov02k" and likely even more families of sensors with similar names, thus the check for id shall be more specific and match "ov02c" exclusively and expectedly.
--- drivers/media/i2c/ov02c10.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/i2c/ov02c10.c +2 -2
@@ -18,8 +18,8 @@#define OV02C10_MCLK 19200000#define OV02C10_RGB_DEPTH 10 -#define OV02C10_REG_CHIP_ID CCI_REG16(0x300a) -#define OV02C10_CHIP_ID 0x5602 +#define OV02C10_REG_CHIP_ID CCI_REG24(0x300a) +#define OV02C10_CHIP_ID 0x560243#define OV02C10_REG_STREAM_CONTROL CCI_REG8(0x0100)
Signature · 1 line
2.51.0
Hi Vladimir,
Quoted 16 lines
Originally a chip id check in the driver's probe function is done for any OmniVision "ov02" sensors, but is too wide, since there are at least "ov02a", "ov02b", "ov02c", "ov02e", "ov02g", "ov02k" and likely even more families of sensors with similar names, thus the check for id shall be more specific and match "ov02c" exclusively and expectedly.
Signed-off-by Vladimir Zapolskiy <[email protected]>---
drivers/media/i2c/ov02c10.c | 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)drivers/media/i2c/ov02c10.c +0
-0
drivers/media/i2c/ov02c10.c line 22
Quoted 7 lines
drivers/media/i2c/ov02c10.c +2
-2@@ -18,8 +18,8 @@ #define OV02C10_MCLK 19200000 #define OV02C10_RGB_DEPTH 10 -#define OV02C10_REG_CHIP_ID CCI_REG16(0x300a) -#define OV02C10_CHIP_ID 0x5602 +#define OV02C10_REG_CHIP_ID CCI_REG24(0x300a) +#define OV02C10_CHIP_ID 0x560243
Best Regards,
Tarang
Hi Sakari,
Quoted 16 lines · Vladimir Zapolskiy
Originally a chip id check in the driver's probe function is done for any OmniVision "ov02" sensors, but is too wide, since there are at least "ov02a", "ov02b", "ov02c", "ov02e", "ov02g", "ov02k" and likely even more families of sensors with similar names, thus the check for id shall be more specific and match "ov02c" exclusively and expectedly.
Signed-off-by Vladimir Zapolskiy <[email protected]>--- drivers/media/i2c/ov02c10.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/media/i2c/ov02c10.c +0
-0
drivers/media/i2c/ov02c10.c line 25
Quoted 10 lines
drivers/media/i2c/ov02c10.c +2
-2@@ -18,8 +18,8 @@#define OV02C10_MCLK 19200000#define OV02C10_RGB_DEPTH 10 -#define OV02C10_REG_CHIP_ID CCI_REG16(0x300a) -#define OV02C10_CHIP_ID 0x5602 +#define OV02C10_REG_CHIP_ID CCI_REG24(0x300a) +#define OV02C10_CHIP_ID 0x560243#define OV02C10_REG_STREAM_CONTROL CCI_REG8(0x0100)
is there anything else to be done to get this proposed change accepted?
Signature · 2 lines
Best wishes, Vladimir
Hi Sakari,
Quoted 16 lines · Vladimir Zapolskiy
Originally a chip id check in the driver's probe function is done for any OmniVision "ov02" sensors, but is too wide, since there are at least "ov02a", "ov02b", "ov02c", "ov02e", "ov02g", "ov02k" and likely even more families of sensors with similar names, thus the check for id shall be more specific and match "ov02c" exclusively and expectedly.
Signed-off-by Vladimir Zapolskiy <[email protected]>--- drivers/media/i2c/ov02c10.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/media/i2c/ov02c10.c +0
-0
drivers/media/i2c/ov02c10.c line 25
Quoted 10 lines
drivers/media/i2c/ov02c10.c +2
-2@@ -18,8 +18,8 @@#define OV02C10_MCLK 19200000#define OV02C10_RGB_DEPTH 10 -#define OV02C10_REG_CHIP_ID CCI_REG16(0x300a) -#define OV02C10_CHIP_ID 0x5602 +#define OV02C10_REG_CHIP_ID CCI_REG24(0x300a) +#define OV02C10_CHIP_ID 0x560243#define OV02C10_REG_STREAM_CONTROL CCI_REG8(0x0100)
can you please start review of this trivial and long-standing change?
Thank you in advance.
Signature · 2 lines
Best wishes, Vladimir
Sakari Ailus
maintainerHi Vladimir,
Quoted 29 lines · Vladimir Zapolskiy
Hi Sakari,
Quoted 16 lines · Vladimir Zapolskiy
Originally a chip id check in the driver's probe function is done for any OmniVision "ov02" sensors, but is too wide, since there are at least "ov02a", "ov02b", "ov02c", "ov02e", "ov02g", "ov02k" and likely even more families of sensors with similar names, thus the check for id shall be more specific and match "ov02c" exclusively and expectedly.
Signed-off-by Vladimir Zapolskiy <[email protected]>--- drivers/media/i2c/ov02c10.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/media/i2c/ov02c10.c +0
-0drivers/media/i2c/ov02c10.c line 22
Quoted 7 lines
drivers/media/i2c/ov02c10.c +2
-2@@ -18,8 +18,8 @@#define OV02C10_MCLK 19200000#define OV02C10_RGB_DEPTH 10 -#define OV02C10_REG_CHIP_ID CCI_REG16(0x300a) -#define OV02C10_CHIP_ID 0x5602 +#define OV02C10_REG_CHIP_ID CCI_REG24(0x300a) +#define OV02C10_CHIP_ID 0x560243#define OV02C10_REG_STREAM_CONTROL CCI_REG8(0x0100)can you please start review of this trivial and long-standing change?
Quoted 1 line
Thank you in advance.
Thanks for the ping. I've queued it for 7.4.
Signature · 3 lines
Kind regards, Sakari Ailus