#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/mfd/core.h>
#include <linux/mfd/tc3589x.h>
#include <linux/err.h>
enum tc3589x_version { … };
#define TC3589x_CLKMODE_MODCTL_SLEEP …
#define TC3589x_CLKMODE_MODCTL_OPERATION …
int tc3589x_reg_read(struct tc3589x *tc3589x, u8 reg)
{ … }
EXPORT_SYMBOL_GPL(…);
int tc3589x_reg_write(struct tc3589x *tc3589x, u8 reg, u8 data)
{ … }
EXPORT_SYMBOL_GPL(…);
int tc3589x_block_read(struct tc3589x *tc3589x, u8 reg, u8 length, u8 *values)
{ … }
EXPORT_SYMBOL_GPL(…);
int tc3589x_block_write(struct tc3589x *tc3589x, u8 reg, u8 length,
const u8 *values)
{ … }
EXPORT_SYMBOL_GPL(…);
int tc3589x_set_bits(struct tc3589x *tc3589x, u8 reg, u8 mask, u8 val)
{ … }
EXPORT_SYMBOL_GPL(…);
static const struct resource gpio_resources[] = …;
static const struct resource keypad_resources[] = …;
static const struct mfd_cell tc3589x_dev_gpio[] = …;
static const struct mfd_cell tc3589x_dev_keypad[] = …;
static irqreturn_t tc3589x_irq(int irq, void *data)
{ … }
static int tc3589x_irq_map(struct irq_domain *d, unsigned int virq,
irq_hw_number_t hwirq)
{ … }
static void tc3589x_irq_unmap(struct irq_domain *d, unsigned int virq)
{ … }
static const struct irq_domain_ops tc3589x_irq_ops = …;
static int tc3589x_irq_init(struct tc3589x *tc3589x, struct device_node *np)
{ … }
static int tc3589x_chip_init(struct tc3589x *tc3589x)
{ … }
static int tc3589x_device_init(struct tc3589x *tc3589x)
{ … }
static const struct of_device_id tc3589x_match[] = …;
MODULE_DEVICE_TABLE(of, tc3589x_match);
static struct tc3589x_platform_data *
tc3589x_of_probe(struct device *dev, enum tc3589x_version *version)
{ … }
static int tc3589x_probe(struct i2c_client *i2c)
{ … }
static void tc3589x_remove(struct i2c_client *client)
{ … }
static int tc3589x_suspend(struct device *dev)
{ … }
static int tc3589x_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(tc3589x_dev_pm_ops,
tc3589x_suspend, tc3589x_resume);
static const struct i2c_device_id tc3589x_id[] = …;
MODULE_DEVICE_TABLE(i2c, tc3589x_id);
static struct i2c_driver tc3589x_driver = …;
static int __init tc3589x_init(void)
{ … }
subsys_initcall(tc3589x_init);
static void __exit tc3589x_exit(void)
{ … }
module_exit(tc3589x_exit);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;