linux/drivers/base/regmap/regmap-sccb.c

// SPDX-License-Identifier: GPL-2.0
// Register map access API - SCCB support

#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/regmap.h>

#include "internal.h"

/**
 * sccb_is_available - Check if the adapter supports SCCB protocol
 * @adap: I2C adapter
 *
 * Return true if the I2C adapter is capable of using SCCB helper functions,
 * false otherwise.
 */
static bool sccb_is_available(struct i2c_adapter *adap)
{}

/**
 * regmap_sccb_read - Read data from SCCB slave device
 * @context: Device that will be interacted with
 * @reg: Register to be read from
 * @val: Pointer to store read value
 *
 * This executes the 2-phase write transmission cycle that is followed by a
 * 2-phase read transmission cycle, returning negative errno else zero on
 * success.
 */
static int regmap_sccb_read(void *context, unsigned int reg, unsigned int *val)
{}

/**
 * regmap_sccb_write - Write data to SCCB slave device
 * @context: Device that will be interacted with
 * @reg: Register to write to
 * @val: Value to be written
 *
 * This executes the SCCB 3-phase write transmission cycle, returning negative
 * errno else zero on success.
 */
static int regmap_sccb_write(void *context, unsigned int reg, unsigned int val)
{}

static const struct regmap_bus regmap_sccb_bus =;

static const struct regmap_bus *regmap_get_sccb_bus(struct i2c_client *i2c,
					const struct regmap_config *config)
{}

struct regmap *__regmap_init_sccb(struct i2c_client *i2c,
				  const struct regmap_config *config,
				  struct lock_class_key *lock_key,
				  const char *lock_name)
{}
EXPORT_SYMBOL_GPL();

struct regmap *__devm_regmap_init_sccb(struct i2c_client *i2c,
				       const struct regmap_config *config,
				       struct lock_class_key *lock_key,
				       const char *lock_name)
{}
EXPORT_SYMBOL_GPL();

MODULE_DESCRIPTION();
MODULE_LICENSE();