#ifndef __TI_CAL_H__
#define __TI_CAL_H__
#include <linux/bitfield.h>
#include <linux/io.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/videodev2.h>
#include <linux/wait.h>
#include <media/media-device.h>
#include <media/v4l2-async.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-subdev.h>
#include <media/videobuf2-v4l2.h>
#define CAL_MODULE_NAME …
#define CAL_MAX_NUM_CONTEXT …
#define CAL_NUM_CSI2_PORTS …
#define CAL_MIN_WIDTH_BYTES …
#define CAL_MAX_WIDTH_BYTES …
#define CAL_MIN_HEIGHT_LINES …
#define CAL_MAX_HEIGHT_LINES …
#define CAL_CAMERARX_PAD_SINK …
#define CAL_CAMERARX_PAD_FIRST_SOURCE …
#define CAL_CAMERARX_NUM_SOURCE_PADS …
#define CAL_CAMERARX_NUM_PADS …
static inline bool cal_rx_pad_is_sink(u32 pad)
{ … }
static inline bool cal_rx_pad_is_source(u32 pad)
{ … }
struct device;
struct device_node;
struct resource;
struct regmap;
struct regmap_fied;
enum cal_camerarx_field { … };
enum cal_dma_state { … };
struct cal_format_info { … };
struct cal_buffer { … };
struct cal_dmaqueue { … };
struct cal_camerarx_data { … };
struct cal_data { … };
struct cal_camerarx { … };
struct cal_dev { … };
struct cal_ctx { … };
extern unsigned int cal_debug;
extern int cal_video_nr;
extern bool cal_mc_api;
#define cal_dbg(level, cal, fmt, arg...) …
#define cal_info(cal, fmt, arg...) …
#define cal_err(cal, fmt, arg...) …
#define ctx_dbg(level, ctx, fmt, arg...) …
#define ctx_info(ctx, fmt, arg...) …
#define ctx_err(ctx, fmt, arg...) …
#define phy_dbg(level, phy, fmt, arg...) …
#define phy_info(phy, fmt, arg...) …
#define phy_err(phy, fmt, arg...) …
static inline u32 cal_read(struct cal_dev *cal, u32 offset)
{ … }
static inline void cal_write(struct cal_dev *cal, u32 offset, u32 val)
{ … }
static __always_inline u32 cal_read_field(struct cal_dev *cal, u32 offset, u32 mask)
{ … }
static inline void cal_write_field(struct cal_dev *cal, u32 offset, u32 value,
u32 mask)
{ … }
static inline void cal_set_field(u32 *valp, u32 field, u32 mask)
{ … }
extern const struct cal_format_info cal_formats[];
extern const unsigned int cal_num_formats;
const struct cal_format_info *cal_format_by_fourcc(u32 fourcc);
const struct cal_format_info *cal_format_by_code(u32 code);
void cal_quickdump_regs(struct cal_dev *cal);
void cal_camerarx_disable(struct cal_camerarx *phy);
void cal_camerarx_i913_errata(struct cal_camerarx *phy);
struct cal_camerarx *cal_camerarx_create(struct cal_dev *cal,
unsigned int instance);
void cal_camerarx_destroy(struct cal_camerarx *phy);
int cal_ctx_prepare(struct cal_ctx *ctx);
void cal_ctx_unprepare(struct cal_ctx *ctx);
void cal_ctx_set_dma_addr(struct cal_ctx *ctx, dma_addr_t addr);
void cal_ctx_start(struct cal_ctx *ctx);
void cal_ctx_stop(struct cal_ctx *ctx);
int cal_ctx_v4l2_register(struct cal_ctx *ctx);
void cal_ctx_v4l2_unregister(struct cal_ctx *ctx);
int cal_ctx_v4l2_init(struct cal_ctx *ctx);
void cal_ctx_v4l2_cleanup(struct cal_ctx *ctx);
#endif