linux/drivers/mfd/rsmu_i2c.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * I2C driver for Renesas Synchronization Management Unit (SMU) devices.
 *
 * Copyright (C) 2021 Integrated Device Technology, Inc., a Renesas Company.
 */

#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/mfd/core.h>
#include <linux/mfd/rsmu.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/slab.h>

#include "rsmu.h"

/*
 * 32-bit register address: the lower 8 bits of the register address come
 * from the offset addr byte and the upper 24 bits come from the page register.
 */
#define RSMU_CM_PAGE_ADDR
#define RSMU_CM_PAGE_MASK
#define RSMU_CM_ADDRESS_MASK

/*
 * 15-bit register address: the lower 7 bits of the register address come
 * from the offset addr byte and the upper 8 bits come from the page register.
 */
#define RSMU_SABRE_PAGE_ADDR
#define RSMU_SABRE_PAGE_WINDOW

rsmu_rw_device;

static const struct regmap_range_cfg rsmu_sabre_range_cfg[] =;

static bool rsmu_sabre_volatile_reg(struct device *dev, unsigned int reg)
{}

static int rsmu_smbus_i2c_write_device(struct rsmu_ddata *rsmu, u8 reg, u8 *buf, u8 bytes)
{}

static int rsmu_smbus_i2c_read_device(struct rsmu_ddata *rsmu, u8 reg, u8 *buf, u8 bytes)
{}

static int rsmu_i2c_read_device(struct rsmu_ddata *rsmu, u8 reg, u8 *buf, u8 bytes)
{}

static int rsmu_i2c_write_device(struct rsmu_ddata *rsmu, u8 reg, u8 *buf, u8 bytes)
{}

static int rsmu_write_page_register(struct rsmu_ddata *rsmu, u32 reg,
				    rsmu_rw_device rsmu_write_device)
{}

static int rsmu_i2c_reg_read(void *context, unsigned int reg, unsigned int *val)
{}

static int rsmu_i2c_reg_write(void *context, unsigned int reg, unsigned int val)
{}

static int rsmu_smbus_i2c_reg_read(void *context, unsigned int reg, unsigned int *val)
{}

static int rsmu_smbus_i2c_reg_write(void *context, unsigned int reg, unsigned int val)
{}

static const struct regmap_config rsmu_i2c_cm_regmap_config =;

static const struct regmap_config rsmu_smbus_i2c_cm_regmap_config =;

static const struct regmap_config rsmu_sabre_regmap_config =;

static const struct regmap_config rsmu_sl_regmap_config =;

static int rsmu_i2c_probe(struct i2c_client *client)
{}

static void rsmu_i2c_remove(struct i2c_client *client)
{}

static const struct i2c_device_id rsmu_i2c_id[] =;
MODULE_DEVICE_TABLE(i2c, rsmu_i2c_id);

static const struct of_device_id rsmu_i2c_of_match[] =;
MODULE_DEVICE_TABLE(of, rsmu_i2c_of_match);

static struct i2c_driver rsmu_i2c_driver =;

static int __init rsmu_i2c_init(void)
{}
subsys_initcall(rsmu_i2c_init);

static void __exit rsmu_i2c_exit(void)
{}
module_exit(rsmu_i2c_exit);

MODULE_DESCRIPTION();
MODULE_LICENSE();