#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/mfd/gsc.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <asm/unaligned.h>
#define I2C_RETRIES …
int gsc_write(void *context, unsigned int reg, unsigned int val)
{ … }
EXPORT_SYMBOL_GPL(…);
int gsc_read(void *context, unsigned int reg, unsigned int *val)
{ … }
EXPORT_SYMBOL_GPL(…);
static int gsc_powerdown(struct gsc_dev *gsc, unsigned long secs)
{ … }
static ssize_t gsc_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t gsc_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static struct device_attribute attr_fwver = …;
static struct device_attribute attr_fwcrc = …;
static struct device_attribute attr_pwrdown = …;
static struct attribute *gsc_attrs[] = …;
static struct attribute_group attr_group = …;
static const struct of_device_id gsc_of_match[] = …;
MODULE_DEVICE_TABLE(of, gsc_of_match);
static struct regmap_bus gsc_regmap_bus = …;
static const struct regmap_config gsc_regmap_config = …;
static const struct regmap_irq gsc_irqs[] = …;
static const struct regmap_irq_chip gsc_irq_chip = …;
static int gsc_probe(struct i2c_client *client)
{ … }
static void gsc_remove(struct i2c_client *client)
{ … }
static struct i2c_driver gsc_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;