diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2020-02-03 14:48:48 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-12-02 15:29:39 +0100 |
commit | e66a7c84908688e99bd7da4a48bfcba1b292fe54 (patch) | |
tree | 26d2785d20f942c54784924de7ee459c37d5f63e | |
parent | cb50351be662729834e8159cc29af8be35a7c277 (diff) |
media: smiapp: Add macros for accessing CCS registers
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>
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-regs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-regs.h b/drivers/media/i2c/smiapp/smiapp-regs.h index 7223f5f89109..dc946096f368 100644 --- a/drivers/media/i2c/smiapp/smiapp-regs.h +++ b/drivers/media/i2c/smiapp/smiapp-regs.h @@ -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 |