#include <linux/delay.h>
#include <linux/err.h>
#include <linux/hwmon.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
#define SBRMI_PWR_MIN …
#define SW_ALERT_MASK …
#define START_CMD …
#define TRIGGER_MAILBOX …
enum sbrmi_msg_id { … };
enum sbrmi_reg { … };
struct sbrmi_data { … };
struct sbrmi_mailbox_msg { … };
static int sbrmi_enable_alert(struct i2c_client *client)
{ … }
static int rmi_mailbox_xfer(struct sbrmi_data *data,
struct sbrmi_mailbox_msg *msg)
{ … }
static int sbrmi_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static int sbrmi_write(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long val)
{ … }
static umode_t sbrmi_is_visible(const void *data,
enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static const struct hwmon_channel_info * const sbrmi_info[] = …;
static const struct hwmon_ops sbrmi_hwmon_ops = …;
static const struct hwmon_chip_info sbrmi_chip_info = …;
static int sbrmi_get_max_pwr_limit(struct sbrmi_data *data)
{ … }
static int sbrmi_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id sbrmi_id[] = …;
MODULE_DEVICE_TABLE(i2c, sbrmi_id);
static const struct of_device_id __maybe_unused sbrmi_of_match[] = …;
MODULE_DEVICE_TABLE(of, sbrmi_of_match);
static struct i2c_driver sbrmi_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;