linux/drivers/mfd/da9052-i2c.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * I2C access for DA9052 PMICs.
 *
 * Copyright(c) 2011 Dialog Semiconductor Ltd.
 *
 * Author: David Dajun Chen <[email protected]>
 */

#include <linux/device.h>
#include <linux/module.h>
#include <linux/input.h>
#include <linux/mfd/core.h>
#include <linux/i2c.h>
#include <linux/err.h>
#include <linux/of.h>

#include <linux/mfd/da9052/da9052.h>
#include <linux/mfd/da9052/reg.h>


/* I2C safe register check */
static inline bool i2c_safe_reg(unsigned char reg)
{}

/*
 * There is an issue with DA9052 and DA9053_AA/BA/BB PMIC where the PMIC
 * gets lockup up or fails to respond following a system reset.
 * This fix is to follow any read or write with a dummy read to a safe
 * register.
 */
static int da9052_i2c_fix(struct da9052 *da9052, unsigned char reg)
{}

/*
 * According to errata item 24, multiwrite mode should be avoided
 * in order to prevent register data corruption after power-down.
 */
static int da9052_i2c_disable_multiwrite(struct da9052 *da9052)
{}

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

#ifdef CONFIG_OF
static const struct of_device_id dialog_dt_ids[] =;
#endif

static int da9052_i2c_probe(struct i2c_client *client)
{}

static void da9052_i2c_remove(struct i2c_client *client)
{}

static struct i2c_driver da9052_i2c_driver =;

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

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

MODULE_AUTHOR();
MODULE_DESCRIPTION();