media: smiapp: Add macros for accessing CCS registers
authorSakari Ailus <sakari.ailus@linux.intel.com>
Mon, 3 Feb 2020 13:48:48 +0000 (14:48 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 2 Dec 2020 14:29:39 +0000 (15:29 +0100)
Add two helper macros for reading and writing the CCS registers as defined
in ccs-regs.h.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/smiapp/smiapp-regs.h

index 7223f5f..dc94609 100644 (file)
@@ -28,4 +28,10 @@ int smiapp_write(struct smiapp_sensor *sensor, u32 reg, u32 val);
 
 unsigned int ccs_reg_width(u32 reg);
 
+#define ccs_read(sensor, reg_name, val) \
+       smiapp_read(sensor, CCS_R_##reg_name, val)
+
+#define ccs_write(sensor, reg_name, val) \
+       smiapp_write(sensor, CCS_R_##reg_name, val)
+
 #endif