linux/drivers/mfd/tps6586x.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Core driver for TI TPS6586x PMIC family
 *
 * Copyright (c) 2010 CompuLab Ltd.
 * Mike Rapoport <[email protected]>
 *
 * Based on da903x.c.
 * Copyright (C) 2008 Compulab, Ltd.
 * Mike Rapoport <[email protected]>
 * Copyright (C) 2006-2008 Marvell International Ltd.
 * Eric Miao <[email protected]>
 */

#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/regmap.h>
#include <linux/of.h>

#include <linux/mfd/core.h>
#include <linux/mfd/tps6586x.h>

#define TPS6586X_SUPPLYENE
#define SOFT_RST_BIT
#define EXITSLREQ_BIT
#define SLEEP_MODE_BIT

/* interrupt control registers */
#define TPS6586X_INT_ACK1
#define TPS6586X_INT_ACK2
#define TPS6586X_INT_ACK3
#define TPS6586X_INT_ACK4

/* interrupt mask registers */
#define TPS6586X_INT_MASK1
#define TPS6586X_INT_MASK2
#define TPS6586X_INT_MASK3
#define TPS6586X_INT_MASK4
#define TPS6586X_INT_MASK5

/* device id */
#define TPS6586X_VERSIONCRC

/* Maximum register */
#define TPS6586X_MAX_REGISTER

struct tps6586x_irq_data {};

#define TPS6586X_IRQ(_reg, _mask)

static const struct tps6586x_irq_data tps6586x_irqs[] =;

static const struct resource tps6586x_rtc_resources[] =;

static const struct mfd_cell tps6586x_cell[] =;

struct tps6586x {};

static inline struct tps6586x *dev_to_tps6586x(struct device *dev)
{}

int tps6586x_write(struct device *dev, int reg, uint8_t val)
{}
EXPORT_SYMBOL_GPL();

int tps6586x_writes(struct device *dev, int reg, int len, uint8_t *val)
{}
EXPORT_SYMBOL_GPL();

int tps6586x_read(struct device *dev, int reg, uint8_t *val)
{}
EXPORT_SYMBOL_GPL();

int tps6586x_reads(struct device *dev, int reg, int len, uint8_t *val)
{}
EXPORT_SYMBOL_GPL();

int tps6586x_set_bits(struct device *dev, int reg, uint8_t bit_mask)
{}
EXPORT_SYMBOL_GPL();

int tps6586x_clr_bits(struct device *dev, int reg, uint8_t bit_mask)
{}
EXPORT_SYMBOL_GPL();

int tps6586x_update(struct device *dev, int reg, uint8_t val, uint8_t mask)
{}
EXPORT_SYMBOL_GPL();

int tps6586x_irq_get_virq(struct device *dev, int irq)
{}
EXPORT_SYMBOL_GPL();

int tps6586x_get_version(struct device *dev)
{}
EXPORT_SYMBOL_GPL();

static int __remove_subdev(struct device *dev, void *unused)
{}

static int tps6586x_remove_subdevs(struct tps6586x *tps6586x)
{}

static void tps6586x_irq_lock(struct irq_data *data)
{}

static void tps6586x_irq_enable(struct irq_data *irq_data)
{}

static void tps6586x_irq_disable(struct irq_data *irq_data)
{}

static void tps6586x_irq_sync_unlock(struct irq_data *data)
{}

static int tps6586x_irq_set_wake(struct irq_data *irq_data, unsigned int on)
{}

static struct irq_chip tps6586x_irq_chip =;

static int tps6586x_irq_map(struct irq_domain *h, unsigned int virq,
				irq_hw_number_t hw)
{}

static const struct irq_domain_ops tps6586x_domain_ops =;

static irqreturn_t tps6586x_irq(int irq, void *data)
{}

static int tps6586x_irq_init(struct tps6586x *tps6586x, int irq,
				       int irq_base)
{}

static int tps6586x_add_subdevs(struct tps6586x *tps6586x,
					  struct tps6586x_platform_data *pdata)
{}

#ifdef CONFIG_OF
static struct tps6586x_platform_data *tps6586x_parse_dt(struct i2c_client *client)
{}

static const struct of_device_id tps6586x_of_match[] =;
#else
static struct tps6586x_platform_data *tps6586x_parse_dt(struct i2c_client *client)
{
	return NULL;
}
#endif

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

static const struct regmap_config tps6586x_regmap_config =;

static int tps6586x_power_off_handler(struct sys_off_data *data)
{}

static int tps6586x_restart_handler(struct sys_off_data *data)
{}

static void tps6586x_print_version(struct i2c_client *client, int version)
{}

static int tps6586x_i2c_probe(struct i2c_client *client)
{}

static void tps6586x_i2c_remove(struct i2c_client *client)
{}

static int __maybe_unused tps6586x_i2c_suspend(struct device *dev)
{}

static int __maybe_unused tps6586x_i2c_resume(struct device *dev)
{}

static SIMPLE_DEV_PM_OPS(tps6586x_pm_ops, tps6586x_i2c_suspend,
			 tps6586x_i2c_resume);

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

static struct i2c_driver tps6586x_driver =;

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

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

MODULE_DESCRIPTION();
MODULE_AUTHOR();