#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/rtc.h>
#include <linux/init.h>
#include <linux/kstrtox.h>
#include <linux/errno.h>
#include <linux/bcd.h>
#define BQ32K_SECONDS …
#define BQ32K_SECONDS_MASK …
#define BQ32K_STOP …
#define BQ32K_MINUTES …
#define BQ32K_MINUTES_MASK …
#define BQ32K_OF …
#define BQ32K_HOURS_MASK …
#define BQ32K_CENT …
#define BQ32K_CENT_EN …
#define BQ32K_CALIBRATION …
#define BQ32K_TCH2 …
#define BQ32K_CFG2 …
#define BQ32K_TCFE …
#define MAX_LEN …
struct bq32k_regs { … };
static struct i2c_driver bq32k_driver;
static int bq32k_read(struct device *dev, void *data, uint8_t off, uint8_t len)
{ … }
static int bq32k_write(struct device *dev, void *data, uint8_t off, uint8_t len)
{ … }
static int bq32k_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int bq32k_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static const struct rtc_class_ops bq32k_rtc_ops = …;
static int trickle_charger_of_init(struct device *dev, struct device_node *node)
{ … }
static ssize_t bq32k_sysfs_show_tricklecharge_bypass(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t bq32k_sysfs_store_tricklecharge_bypass(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR(trickle_charge_bypass, 0644,
bq32k_sysfs_show_tricklecharge_bypass,
bq32k_sysfs_store_tricklecharge_bypass);
static int bq32k_sysfs_register(struct device *dev)
{ … }
static void bq32k_sysfs_unregister(struct device *dev)
{ … }
static int bq32k_probe(struct i2c_client *client)
{ … }
static void bq32k_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id bq32k_id[] = …;
MODULE_DEVICE_TABLE(i2c, bq32k_id);
static const __maybe_unused struct of_device_id bq32k_of_match[] = …;
MODULE_DEVICE_TABLE(of, bq32k_of_match);
static struct i2c_driver bq32k_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;