[v2,02/20] media: i2c: ov4689: Sort register definitions by address

Message ID 20231218174042.794012-3-mike.rudenko@gmail.com
State New
Headers
Series Omnivision OV4689 refactoring and improvements |

Commit Message

Mikhail Rudenko Dec. 18, 2023, 5:40 p.m. UTC
  Put register defininitions in the order of increasing register
address.

Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
---
 drivers/media/i2c/ov4689.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
  

Comments

Laurent Pinchart Feb. 23, 2024, 11:22 a.m. UTC | #1
Hi Mikhail,

Thank you for the patch.

On Mon, Dec 18, 2023 at 08:40:23PM +0300, Mikhail Rudenko wrote:
> Put register defininitions in the order of increasing register
> address.
> 
> Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/i2c/ov4689.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/i2c/ov4689.c b/drivers/media/i2c/ov4689.c
> index ff5213862974..1ae6d9b9c9b3 100644
> --- a/drivers/media/i2c/ov4689.c
> +++ b/drivers/media/i2c/ov4689.c
> @@ -19,15 +19,15 @@
>  #include <media/v4l2-subdev.h>
>  #include <media/v4l2-fwnode.h>
>  
> -#define CHIP_ID				0x004688
> -#define OV4689_REG_CHIP_ID		0x300a
> -
>  #define OV4689_XVCLK_FREQ		24000000
>  
>  #define OV4689_REG_CTRL_MODE		0x0100
>  #define OV4689_MODE_SW_STANDBY		0x0
>  #define OV4689_MODE_STREAMING		BIT(0)
>  
> +#define OV4689_REG_CHIP_ID		0x300a
> +#define CHIP_ID				0x004688
> +
>  #define OV4689_REG_EXPOSURE		0x3500
>  #define OV4689_EXPOSURE_MIN		4
>  #define OV4689_EXPOSURE_STEP		1
> @@ -41,12 +41,12 @@
>  #define OV4689_GAIN_STEP		1
>  #define OV4689_GAIN_DEFAULT		0x80
>  
> +#define OV4689_REG_VTS			0x380e
> +
>  #define OV4689_REG_TEST_PATTERN		0x5040
>  #define OV4689_TEST_PATTERN_ENABLE	0x80
>  #define OV4689_TEST_PATTERN_DISABLE	0x0
>  
> -#define OV4689_REG_VTS			0x380e
> -
>  #define REG_NULL			0xFFFF
>  
>  #define OV4689_REG_VALUE_08BIT		1
  

Patch

diff --git a/drivers/media/i2c/ov4689.c b/drivers/media/i2c/ov4689.c
index ff5213862974..1ae6d9b9c9b3 100644
--- a/drivers/media/i2c/ov4689.c
+++ b/drivers/media/i2c/ov4689.c
@@ -19,15 +19,15 @@ 
 #include <media/v4l2-subdev.h>
 #include <media/v4l2-fwnode.h>
 
-#define CHIP_ID				0x004688
-#define OV4689_REG_CHIP_ID		0x300a
-
 #define OV4689_XVCLK_FREQ		24000000
 
 #define OV4689_REG_CTRL_MODE		0x0100
 #define OV4689_MODE_SW_STANDBY		0x0
 #define OV4689_MODE_STREAMING		BIT(0)
 
+#define OV4689_REG_CHIP_ID		0x300a
+#define CHIP_ID				0x004688
+
 #define OV4689_REG_EXPOSURE		0x3500
 #define OV4689_EXPOSURE_MIN		4
 #define OV4689_EXPOSURE_STEP		1
@@ -41,12 +41,12 @@ 
 #define OV4689_GAIN_STEP		1
 #define OV4689_GAIN_DEFAULT		0x80
 
+#define OV4689_REG_VTS			0x380e
+
 #define OV4689_REG_TEST_PATTERN		0x5040
 #define OV4689_TEST_PATTERN_ENABLE	0x80
 #define OV4689_TEST_PATTERN_DISABLE	0x0
 
-#define OV4689_REG_VTS			0x380e
-
 #define REG_NULL			0xFFFF
 
 #define OV4689_REG_VALUE_08BIT		1