Commit 6eac0eec authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

media: imx: imx7_mipi_csis: Turn register access macros into functions

Make it easier to instrument register access (for instance with
printk-based logging) by turning the macros into inline functions.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 74f81584
......@@ -358,8 +358,15 @@ static const struct csis_pix_format mipi_csis_formats[] = {
}
};
#define mipi_csis_write(__csis, __r, __v) writel(__v, (__csis)->regs + (__r))
#define mipi_csis_read(__csis, __r) readl((__csis)->regs + (__r))
static inline void mipi_csis_write(struct csi_state *state, u32 reg, u32 val)
{
writel(val, state->regs + reg);
}
static inline u32 mipi_csis_read(struct csi_state *state, u32 reg)
{
return readl(state->regs + reg);
}
static int mipi_csis_dump_regs(struct csi_state *state)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment