diff mbox series

[2/6] media: v4l: cci: Add driver-private bit definitions

Message ID 20231110094705.1367083-3-sakari.ailus@linux.intel.com
State New
Headers show
Series Use V4L2 CCI in CCS driver | expand

Commit Message

Sakari Ailus Nov. 10, 2023, 9:47 a.m. UTC
Provide a few bits for drivers to store private information on register
definitions.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 include/media/v4l2-cci.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Hans de Goede Nov. 10, 2023, 11:11 a.m. UTC | #1
Hi,

On 11/10/23 10:47, Sakari Ailus wrote:
> Provide a few bits for drivers to store private information on register
> definitions.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  include/media/v4l2-cci.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/media/v4l2-cci.h b/include/media/v4l2-cci.h
> index f2c2962e936b..b4ce0a46092c 100644
> --- a/include/media/v4l2-cci.h
> +++ b/include/media/v4l2-cci.h
> @@ -33,6 +33,12 @@ struct cci_reg_sequence {
>  #define CCI_REG_ADDR_MASK		GENMASK(15, 0)
>  #define CCI_REG_WIDTH_SHIFT		16
>  #define CCI_REG_WIDTH_MASK		GENMASK(19, 16)
> +/*
> + * Private CCI register flags, for the use of drivers.
> + */
> +#define CCI_REG_FLAG_PRIVATE_START	28U
> +#define CCI_REG_FLAG_PRIVATE_END	31U
> +#define CCI_REG_PRIVATE_MASK		GENMASK(CCI_REG_FLAG_PRIVATE_END, CCI_REG_FLAG_PRIVATE_START)
>  
>  #define CCI_REG8(x)			((1 << CCI_REG_WIDTH_SHIFT) | (x))
>  #define CCI_REG16(x)			((2 << CCI_REG_WIDTH_SHIFT) | (x))

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans
diff mbox series

Patch

diff --git a/include/media/v4l2-cci.h b/include/media/v4l2-cci.h
index f2c2962e936b..b4ce0a46092c 100644
--- a/include/media/v4l2-cci.h
+++ b/include/media/v4l2-cci.h
@@ -33,6 +33,12 @@  struct cci_reg_sequence {
 #define CCI_REG_ADDR_MASK		GENMASK(15, 0)
 #define CCI_REG_WIDTH_SHIFT		16
 #define CCI_REG_WIDTH_MASK		GENMASK(19, 16)
+/*
+ * Private CCI register flags, for the use of drivers.
+ */
+#define CCI_REG_FLAG_PRIVATE_START	28U
+#define CCI_REG_FLAG_PRIVATE_END	31U
+#define CCI_REG_PRIVATE_MASK		GENMASK(CCI_REG_FLAG_PRIVATE_END, CCI_REG_FLAG_PRIVATE_START)
 
 #define CCI_REG8(x)			((1 << CCI_REG_WIDTH_SHIFT) | (x))
 #define CCI_REG16(x)			((2 << CCI_REG_WIDTH_SHIFT) | (x))