#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/videodev2.h>
#include <media/media-device.h>
#include <media/v4l2-async.h>
#include <media/v4l2-common.h>
#include <media/v4l2-device.h>
#include <media/videobuf2-core.h>
#include <media/videobuf2-dma-contig.h>
#include "cal.h"
#include "cal_regs.h"
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_VERSION(…) …;
int cal_video_nr = …;
module_param_named(video_nr, cal_video_nr, uint, 0644);
MODULE_PARM_DESC(…) …;
unsigned int cal_debug;
module_param_named(debug, cal_debug, uint, 0644);
MODULE_PARM_DESC(…) …;
#ifdef CONFIG_VIDEO_TI_CAL_MC
#define CAL_MC_API_DEFAULT …
#else
#define CAL_MC_API_DEFAULT …
#endif
bool cal_mc_api = …;
module_param_named(mc_api, cal_mc_api, bool, 0444);
MODULE_PARM_DESC(…) …;
const struct cal_format_info cal_formats[] = …;
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)
{ … }
static const struct cal_camerarx_data dra72x_cal_camerarx[] = …;
static const struct cal_data dra72x_cal_data = …;
static const struct cal_data dra72x_es1_cal_data = …;
static const struct cal_camerarx_data dra76x_cal_csi_phy[] = …;
static const struct cal_data dra76x_cal_data = …;
static const struct cal_camerarx_data am654_cal_csi_phy[] = …;
static const struct cal_data am654_cal_data = …;
void cal_quickdump_regs(struct cal_dev *cal)
{ … }
#define CAL_MAX_PIX_PROC …
static int cal_reserve_pix_proc(struct cal_dev *cal)
{ … }
static void cal_release_pix_proc(struct cal_dev *cal, unsigned int pix_proc_num)
{ … }
static void cal_ctx_csi2_config(struct cal_ctx *ctx)
{ … }
static void cal_ctx_pix_proc_config(struct cal_ctx *ctx)
{ … }
static void cal_ctx_wr_dma_config(struct cal_ctx *ctx)
{ … }
void cal_ctx_set_dma_addr(struct cal_ctx *ctx, dma_addr_t addr)
{ … }
static void cal_ctx_wr_dma_enable(struct cal_ctx *ctx)
{ … }
static void cal_ctx_wr_dma_disable(struct cal_ctx *ctx)
{ … }
static bool cal_ctx_wr_dma_stopped(struct cal_ctx *ctx)
{ … }
static int
cal_get_remote_frame_desc_entry(struct cal_ctx *ctx,
struct v4l2_mbus_frame_desc_entry *entry)
{ … }
int cal_ctx_prepare(struct cal_ctx *ctx)
{ … }
void cal_ctx_unprepare(struct cal_ctx *ctx)
{ … }
void cal_ctx_start(struct cal_ctx *ctx)
{ … }
void cal_ctx_stop(struct cal_ctx *ctx)
{ … }
static void cal_update_seq_number(struct cal_ctx *ctx)
{ … }
static inline void cal_irq_wdma_start(struct cal_ctx *ctx)
{ … }
static inline void cal_irq_wdma_end(struct cal_ctx *ctx)
{ … }
static void cal_irq_handle_wdma(struct cal_ctx *ctx, bool start, bool end)
{ … }
static irqreturn_t cal_irq(int irq_cal, void *data)
{ … }
struct cal_v4l2_async_subdev { … };
static inline struct cal_v4l2_async_subdev *
to_cal_asd(struct v4l2_async_connection *asd)
{ … }
static int cal_async_notifier_bound(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *subdev,
struct v4l2_async_connection *asd)
{ … }
static int cal_async_notifier_complete(struct v4l2_async_notifier *notifier)
{ … }
static const struct v4l2_async_notifier_operations cal_async_notifier_ops = …;
static int cal_async_notifier_register(struct cal_dev *cal)
{ … }
static void cal_async_notifier_unregister(struct cal_dev *cal)
{ … }
static int cal_media_register(struct cal_dev *cal)
{ … }
static void cal_media_unregister(struct cal_dev *cal)
{ … }
static int cal_media_init(struct cal_dev *cal)
{ … }
static void cal_media_cleanup(struct cal_dev *cal)
{ … }
static struct cal_ctx *cal_ctx_create(struct cal_dev *cal, int inst)
{ … }
static void cal_ctx_destroy(struct cal_ctx *ctx)
{ … }
static const struct of_device_id cal_of_match[] = …;
MODULE_DEVICE_TABLE(of, cal_of_match);
#define CAL_HL_HWINFO_VALUE …
static void cal_get_hwinfo(struct cal_dev *cal)
{ … }
static int cal_init_camerarx_regmap(struct cal_dev *cal)
{ … }
static int cal_probe(struct platform_device *pdev)
{ … }
static void cal_remove(struct platform_device *pdev)
{ … }
static int cal_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops cal_pm_ops = …;
static struct platform_driver cal_pdrv = …;
module_platform_driver(…) …;