linux/drivers/media/i2c/ccs/ccs-reg-access.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * drivers/media/i2c/ccs/ccs-reg-access.c
 *
 * Generic driver for MIPI CCS/SMIA/SMIA++ compliant camera sensors
 *
 * Copyright (C) 2020 Intel Corporation
 * Copyright (C) 2011--2012 Nokia Corporation
 * Contact: Sakari Ailus <[email protected]>
 */

#include <linux/unaligned.h>

#include <linux/delay.h>
#include <linux/i2c.h>

#include "ccs.h"
#include "ccs-limits.h"

static u32 float_to_u32_mul_1000000(struct i2c_client *client, u32 phloat)
{}


static u32 ireal32_to_u32_mul_1000000(struct i2c_client *client, u32 val)
{}

u32 ccs_reg_conv(struct ccs_sensor *sensor, u32 reg, u32 val)
{}

/*
 * Read a 8/16/32-bit i2c register.  The value is returned in 'val'.
 * Returns zero if successful, or non-zero otherwise.
 */
static int __ccs_read_addr(struct ccs_sensor *sensor, u32 reg, u32 *val,
			   bool only8, bool conv)
{}

static int __ccs_static_data_read_ro_reg(struct ccs_reg *regs, size_t num_regs,
					 u32 reg, u32 *val)
{}

static int
ccs_static_data_read_ro_reg(struct ccs_sensor *sensor, u32 reg, u32 *val)
{}

static int ccs_read_addr_raw(struct ccs_sensor *sensor, u32 reg, u32 *val,
			     bool force8, bool quirk, bool conv, bool data)
{}

int ccs_read_addr(struct ccs_sensor *sensor, u32 reg, u32 *val)
{}

int ccs_read_addr_8only(struct ccs_sensor *sensor, u32 reg, u32 *val)
{}

int ccs_read_addr_noconv(struct ccs_sensor *sensor, u32 reg, u32 *val)
{}

/*
 * Write to a 8/16-bit register.
 * Returns zero if successful, or non-zero otherwise.
 */
int ccs_write_addr(struct ccs_sensor *sensor, u32 reg, u32 val)
{}

#define MAX_WRITE_LEN

int ccs_write_data_regs(struct ccs_sensor *sensor, struct ccs_reg *regs,
			size_t num_regs)
{}