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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
74f815840e
commit
6eac0eecd0
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user