Thread (9 messages) 9 messages, 1 author, 2024-08-30
STALE661d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 2/8] media: rcar-csi2: Correct field size for PHTW writes

From: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Date: 2024-08-30 20:35:01
Also in: linux-media, linux-renesas-soc
Subsystem: media drivers for renesas - vin, media input infrastructure (v4l/dvb), the rest · Maintainers: Niklas Söderlund, Mauro Carvalho Chehab, Linus Torvalds

The data and code written thru the Test Interface Write Register (PHTW)
register are 8-bit wide, change the datatype used to reflect this.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/media/platform/renesas/rcar-csi2.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/renesas/rcar-csi2.c b/drivers/media/platform/renesas/rcar-csi2.c
index c419ddb4c5a2..932826ee0961 100644
--- a/drivers/media/platform/renesas/rcar-csi2.c
+++ b/drivers/media/platform/renesas/rcar-csi2.c
@@ -238,13 +238,13 @@ static const struct rcsi2_cphy_setting cphy_setting_table_r8a779g0[] = {
 };
 
 struct phtw_value {
-	u16 data;
-	u16 code;
+	u8 data;
+	u8 code;
 };
 
 struct rcsi2_mbps_reg {
 	u16 mbps;
-	u16 reg;
+	u8 reg;
 };
 
 static const struct rcsi2_mbps_reg phtw_mbps_v3u[] = {
@@ -1451,7 +1451,7 @@ static int rcsi2_parse_dt(struct rcar_csi2 *priv)
  * NOTE: Magic values are from the datasheet and lack documentation.
  */
 
-static int rcsi2_phtw_write(struct rcar_csi2 *priv, u16 data, u16 code)
+static int rcsi2_phtw_write(struct rcar_csi2 *priv, u8 data, u8 code)
 {
 	unsigned int timeout;
 
@@ -1488,7 +1488,7 @@ static int rcsi2_phtw_write_array(struct rcar_csi2 *priv,
 }
 
 static int rcsi2_phtw_write_mbps(struct rcar_csi2 *priv, unsigned int mbps,
-				 const struct rcsi2_mbps_reg *values, u16 code)
+				 const struct rcsi2_mbps_reg *values, u8 code)
 {
 	const struct rcsi2_mbps_reg *value;
 	const struct rcsi2_mbps_reg *prev_value = NULL;
-- 
2.46.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help