aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/smiapp/smiapp-regs.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/i2c/smiapp/smiapp-regs.h')
-rw-r--r--drivers/media/i2c/smiapp/smiapp-regs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-regs.h b/drivers/media/i2c/smiapp/smiapp-regs.h
index 81957cbf6a13..35521125a2cc 100644
--- a/drivers/media/i2c/smiapp/smiapp-regs.h
+++ b/drivers/media/i2c/smiapp/smiapp-regs.h
@@ -28,6 +28,10 @@
#include <linux/i2c.h>
#include <linux/types.h>
+#define SMIAPP_REG_ADDR(reg) ((u16)reg)
+#define SMIAPP_REG_WIDTH(reg) ((u8)(reg >> 16))
+#define SMIAPP_REG_FLAGS(reg) ((u8)(reg >> 24))
+
/* Use upper 8 bits of the type field for flags */
#define SMIAPP_REG_FLAG_FLOAT (1 << 24)

Privacy Policy