The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] media: imx335: Use correct register width for HNUM
@ 2025-04-22 12:20 Kieran Bingham
  2025-04-25  7:58 ` Sakari Ailus
  0 siblings, 1 reply; 3+ messages in thread
From: Kieran Bingham @ 2025-04-22 12:20 UTC (permalink / raw)
  To: sakari.ailus, linux-media; +Cc: linux-kernel, Umang Jain, Kieran Bingham

From: Umang Jain <umang.jain@ideasonboard.com>

CCI_REG_HNUM should be using CCI_REG16_LE() instead of CCI_REG8()
as HNUM spans from 0x302e[0:7] to 0x302f[0:3].

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 drivers/media/i2c/imx335.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c
index db424b178e98..0418875e996c 100644
--- a/drivers/media/i2c/imx335.c
+++ b/drivers/media/i2c/imx335.c
@@ -31,7 +31,7 @@
 #define IMX335_REG_CPWAIT_TIME		CCI_REG8(0x300d)
 #define IMX335_REG_WINMODE		CCI_REG8(0x3018)
 #define IMX335_REG_HTRIMMING_START	CCI_REG16_LE(0x302c)
-#define IMX335_REG_HNUM			CCI_REG8(0x302e)
+#define IMX335_REG_HNUM			CCI_REG16_LE(0x302e)
 
 /* Lines per frame */
 #define IMX335_REG_VMAX			CCI_REG24_LE(0x3030)
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: imx335: Use correct register width for HNUM
  2025-04-22 12:20 [PATCH] media: imx335: Use correct register width for HNUM Kieran Bingham
@ 2025-04-25  7:58 ` Sakari Ailus
  2025-04-25  8:29   ` Kieran Bingham
  0 siblings, 1 reply; 3+ messages in thread
From: Sakari Ailus @ 2025-04-25  7:58 UTC (permalink / raw)
  To: Kieran Bingham; +Cc: linux-media, linux-kernel, Umang Jain

Hi Kieran,

On Tue, Apr 22, 2025 at 01:20:52PM +0100, Kieran Bingham wrote:
> From: Umang Jain <umang.jain@ideasonboard.com>
> 
> CCI_REG_HNUM should be using CCI_REG16_LE() instead of CCI_REG8()
> as HNUM spans from 0x302e[0:7] to 0x302f[0:3].
> 
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Does this need Fixes:/Cc: stable tags?

> ---
>  drivers/media/i2c/imx335.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c
> index db424b178e98..0418875e996c 100644
> --- a/drivers/media/i2c/imx335.c
> +++ b/drivers/media/i2c/imx335.c
> @@ -31,7 +31,7 @@
>  #define IMX335_REG_CPWAIT_TIME		CCI_REG8(0x300d)
>  #define IMX335_REG_WINMODE		CCI_REG8(0x3018)
>  #define IMX335_REG_HTRIMMING_START	CCI_REG16_LE(0x302c)
> -#define IMX335_REG_HNUM			CCI_REG8(0x302e)
> +#define IMX335_REG_HNUM			CCI_REG16_LE(0x302e)
>  
>  /* Lines per frame */
>  #define IMX335_REG_VMAX			CCI_REG24_LE(0x3030)

-- 
Regards,

Sakari Ailus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: imx335: Use correct register width for HNUM
  2025-04-25  7:58 ` Sakari Ailus
@ 2025-04-25  8:29   ` Kieran Bingham
  0 siblings, 0 replies; 3+ messages in thread
From: Kieran Bingham @ 2025-04-25  8:29 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, linux-kernel, Umang Jain

Quoting Sakari Ailus (2025-04-25 08:58:46)
> Hi Kieran,
> 
> On Tue, Apr 22, 2025 at 01:20:52PM +0100, Kieran Bingham wrote:
> > From: Umang Jain <umang.jain@ideasonboard.com>
> > 
> > CCI_REG_HNUM should be using CCI_REG16_LE() instead of CCI_REG8()
> > as HNUM spans from 0x302e[0:7] to 0x302f[0:3].
> > 
> > Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> 
> Does this need Fixes:/Cc: stable tags?

Aha, yes. I think we could/should add:

Fixes: 8f0926dba799 ("media: imx335: Use V4L2 CCI for accessing sensor registers")

which is when the conversion happened.

Thanks.

> > ---
> >  drivers/media/i2c/imx335.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c
> > index db424b178e98..0418875e996c 100644
> > --- a/drivers/media/i2c/imx335.c
> > +++ b/drivers/media/i2c/imx335.c
> > @@ -31,7 +31,7 @@
> >  #define IMX335_REG_CPWAIT_TIME               CCI_REG8(0x300d)
> >  #define IMX335_REG_WINMODE           CCI_REG8(0x3018)
> >  #define IMX335_REG_HTRIMMING_START   CCI_REG16_LE(0x302c)
> > -#define IMX335_REG_HNUM                      CCI_REG8(0x302e)
> > +#define IMX335_REG_HNUM                      CCI_REG16_LE(0x302e)
> >  
> >  /* Lines per frame */
> >  #define IMX335_REG_VMAX                      CCI_REG24_LE(0x3030)
> 
> -- 
> Regards,
> 
> Sakari Ailus

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-25  8:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-22 12:20 [PATCH] media: imx335: Use correct register width for HNUM Kieran Bingham
2025-04-25  7:58 ` Sakari Ailus
2025-04-25  8:29   ` Kieran Bingham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox