diff mbox series

[v2,3/6] media: i2c: ov9282: Add ov9281 compatible

Message ID 20220715074858.875808-4-alexander.stein@ew.tq-group.com (mailing list archive)
State New, archived
Headers show
Series OV9281 support | expand

Commit Message

Alexander Stein July 15, 2022, 7:48 a.m. UTC
According to product brief they are identical from software point of view.
Differences are a different chief ray angle (CRA) and the package.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Acked-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
---
 drivers/media/i2c/ov9282.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Sakari Ailus July 17, 2022, 2:23 p.m. UTC | #1
Hi Alexander,

On Fri, Jul 15, 2022 at 09:48:55AM +0200, Alexander Stein wrote:
> According to product brief they are identical from software point of view.
> Differences are a different chief ray angle (CRA) and the package.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> Acked-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
> ---
>  drivers/media/i2c/ov9282.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c
> index 3269c1983bd5..04fda8222e07 100644
> --- a/drivers/media/i2c/ov9282.c
> +++ b/drivers/media/i2c/ov9282.c
> @@ -1114,6 +1114,7 @@ static const struct dev_pm_ops ov9282_pm_ops = {
>  };
>  
>  static const struct of_device_id ov9282_of_match[] = {
> +	{ .compatible = "ovti,ov9281" },

This should also be reflected in the entity name --- the user space
deserves to know it's a different device.

>  	{ .compatible = "ovti,ov9282" },
>  	{ }
>  };
Alexander Stein July 18, 2022, 11:42 a.m. UTC | #2
Am Sonntag, 17. Juli 2022, 16:23:17 CEST schrieb Sakari Ailus:
> Hi Alexander,
> 
> On Fri, Jul 15, 2022 at 09:48:55AM +0200, Alexander Stein wrote:
> > According to product brief they are identical from software point of view.
> > Differences are a different chief ray angle (CRA) and the package.
> > 
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > Acked-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
> > ---
> > 
> >  drivers/media/i2c/ov9282.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c
> > index 3269c1983bd5..04fda8222e07 100644
> > --- a/drivers/media/i2c/ov9282.c
> > +++ b/drivers/media/i2c/ov9282.c
> > @@ -1114,6 +1114,7 @@ static const struct dev_pm_ops ov9282_pm_ops = {
> > 
> >  };
> >  
> >  static const struct of_device_id ov9282_of_match[] = {
> > 
> > +	{ .compatible = "ovti,ov9281" },
> 
> This should also be reflected in the entity name --- the user space
> deserves to know it's a different device.

Not so sure what to do here. v4l2_i2c_subdev_set_name is called from 
v4l2_i2c_subdev_init() with devname=NULL. This should set the correct name. 
According to it's documentation with the I²C device name, but apparently 
v4l2_i2c_subdev_set_name uses the drivers name.
This seems a bug to me, but is outside of this driver.

Best regards,
Alexander

> >  	{ .compatible = "ovti,ov9282" },
> >  	{ }
> >  
> >  };
diff mbox series

Patch

diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c
index 3269c1983bd5..04fda8222e07 100644
--- a/drivers/media/i2c/ov9282.c
+++ b/drivers/media/i2c/ov9282.c
@@ -1114,6 +1114,7 @@  static const struct dev_pm_ops ov9282_pm_ops = {
 };
 
 static const struct of_device_id ov9282_of_match[] = {
+	{ .compatible = "ovti,ov9281" },
 	{ .compatible = "ovti,ov9282" },
 	{ }
 };