Skip to content
Commit 8d2cd172 authored by Sakari Ailus's avatar Sakari Ailus Committed by Greg Kroah-Hartman
Browse files

media: v4l: cci: Add macros to obtain register width and address



[ Upstream commit cd93cc24 ]

Add CCI_REG_WIDTH() macro to obtain register width in bits and similarly,
CCI_REG_WIDTH_BYTES() to obtain it in bytes.

Also add CCI_REG_ADDR() macro to obtain the address of a register.

Use both macros in v4l2-cci.c, too.

Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Stable-dep-of: d92e7a01 ("media: v4l2-cci: Add support for little-endian encoded registers")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 36bf2a8f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment