#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
#include <linux/videodev2.h>
#include <media/v4l2-async.h>
#include <media/v4l2-subdev.h>
#define S5K6A3_SENSOR_MAX_WIDTH …
#define S5K6A3_SENSOR_MAX_HEIGHT …
#define S5K6A3_SENSOR_MIN_WIDTH …
#define S5K6A3_SENSOR_MIN_HEIGHT …
#define S5K6A3_DEFAULT_WIDTH …
#define S5K6A3_DEFAULT_HEIGHT …
#define S5K6A3_DRV_NAME …
#define S5K6A3_CLK_NAME …
#define S5K6A3_DEFAULT_CLK_FREQ …
enum { … };
struct s5k6a3 { … };
static const char * const s5k6a3_supply_names[] = …;
static inline struct s5k6a3 *sd_to_s5k6a3(struct v4l2_subdev *sd)
{ … }
static const struct v4l2_mbus_framefmt s5k6a3_formats[] = …;
static const struct v4l2_mbus_framefmt *find_sensor_format(
struct v4l2_mbus_framefmt *mf)
{ … }
static int s5k6a3_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static void s5k6a3_try_format(struct v4l2_mbus_framefmt *mf)
{ … }
static struct v4l2_mbus_framefmt *__s5k6a3_get_format(
struct s5k6a3 *sensor, struct v4l2_subdev_state *sd_state,
u32 pad, enum v4l2_subdev_format_whence which)
{ … }
static int s5k6a3_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static int s5k6a3_get_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static const struct v4l2_subdev_pad_ops s5k6a3_pad_ops = …;
static int s5k6a3_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
{ … }
static const struct v4l2_subdev_internal_ops s5k6a3_sd_internal_ops = …;
static int __s5k6a3_power_on(struct s5k6a3 *sensor)
{ … }
static int __s5k6a3_power_off(struct s5k6a3 *sensor)
{ … }
static int s5k6a3_s_power(struct v4l2_subdev *sd, int on)
{ … }
static const struct v4l2_subdev_core_ops s5k6a3_core_ops = …;
static const struct v4l2_subdev_ops s5k6a3_subdev_ops = …;
static int s5k6a3_probe(struct i2c_client *client)
{ … }
static void s5k6a3_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id s5k6a3_ids[] = …;
MODULE_DEVICE_TABLE(i2c, s5k6a3_ids);
#ifdef CONFIG_OF
static const struct of_device_id s5k6a3_of_match[] = …;
MODULE_DEVICE_TABLE(of, s5k6a3_of_match);
#endif
static struct i2c_driver s5k6a3_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;