#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of_graph.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-subdev.h>
#include "cal.h"
#include "cal_regs.h"
static inline u32 camerarx_read(struct cal_camerarx *phy, u32 offset)
{ … }
static inline void camerarx_write(struct cal_camerarx *phy, u32 offset, u32 val)
{ … }
static s64 cal_camerarx_get_ext_link_freq(struct cal_camerarx *phy)
{ … }
static void cal_camerarx_lane_config(struct cal_camerarx *phy)
{ … }
static void cal_camerarx_enable(struct cal_camerarx *phy)
{ … }
void cal_camerarx_disable(struct cal_camerarx *phy)
{ … }
#define TCLK_TERM …
#define TCLK_MISS …
#define TCLK_SETTLE …
static void cal_camerarx_config(struct cal_camerarx *phy, s64 link_freq)
{ … }
static void cal_camerarx_power(struct cal_camerarx *phy, bool enable)
{ … }
static void cal_camerarx_wait_reset(struct cal_camerarx *phy)
{ … }
static void cal_camerarx_wait_stop_state(struct cal_camerarx *phy)
{ … }
static void cal_camerarx_enable_irqs(struct cal_camerarx *phy)
{ … }
static void cal_camerarx_disable_irqs(struct cal_camerarx *phy)
{ … }
static void cal_camerarx_ppi_enable(struct cal_camerarx *phy)
{ … }
static void cal_camerarx_ppi_disable(struct cal_camerarx *phy)
{ … }
static int cal_camerarx_start(struct cal_camerarx *phy)
{ … }
static void cal_camerarx_stop(struct cal_camerarx *phy)
{ … }
void cal_camerarx_i913_errata(struct cal_camerarx *phy)
{ … }
static int cal_camerarx_regmap_init(struct cal_dev *cal,
struct cal_camerarx *phy)
{ … }
static int cal_camerarx_parse_dt(struct cal_camerarx *phy)
{ … }
static inline struct cal_camerarx *to_cal_camerarx(struct v4l2_subdev *sd)
{ … }
static int cal_camerarx_sd_s_stream(struct v4l2_subdev *sd, int enable)
{ … }
static int cal_camerarx_sd_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static int cal_camerarx_sd_enum_frame_size(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state,
struct v4l2_subdev_frame_size_enum *fse)
{ … }
static int cal_camerarx_sd_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state,
struct v4l2_subdev_format *format)
{ … }
static int cal_camerarx_sd_init_state(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state)
{ … }
static int cal_camerarx_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_mbus_frame_desc *fd)
{ … }
static const struct v4l2_subdev_video_ops cal_camerarx_video_ops = …;
static const struct v4l2_subdev_pad_ops cal_camerarx_pad_ops = …;
static const struct v4l2_subdev_ops cal_camerarx_subdev_ops = …;
static const struct v4l2_subdev_internal_ops cal_camerarx_internal_ops = …;
static const struct media_entity_operations cal_camerarx_media_ops = …;
struct cal_camerarx *cal_camerarx_create(struct cal_dev *cal,
unsigned int instance)
{ … }
void cal_camerarx_destroy(struct cal_camerarx *phy)
{ … }