#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/hwmon.h>
#include <linux/module.h>
#include <linux/mutex.h>
#define ARIES_CURRENT_AVG_TEMP_ADC_CSR …
#define ARIES_CODE_LOAD_REG …
#define ARIES_LOAD_CODE …
#define ARIES_MM_HEARTBEAT_ADDR …
#define ARIES_MM_ASSIST_REG_ADDR_OFFSET …
#define ARIES_MM_ASSIST_CMD_OFFSET …
#define ARIES_MM_ASSIST_SPARE_0_OFFSET …
#define ARIES_MM_ASSIST_SPARE_3_OFFSET …
#define ARIES_MM_RD_WIDE_REG_2B …
#define ARIES_MM_RD_WIDE_REG_3B …
#define ARIES_MM_RD_WIDE_REG_4B …
#define ARIES_MM_RD_WIDE_REG_5B …
#define ARIES_MM_STATUS_TIME …
#define AL_MAIN_SRAM_DMEM_OFFSET …
#define AL_TG_RD_LOC_IND_SRAM …
#define ARIES_MAIN_MICRO_FW_INFO …
#define ARIES_MM_FW_VERSION_MAJOR …
#define ARIES_MM_FW_VERSION_MINOR …
#define ARIES_MM_FW_VERSION_BUILD …
#define ARIES_TEMP_CAL_CODE_DEFAULT …
struct pt5161l_fw_ver { … };
struct pt5161l_data { … };
static struct dentry *pt5161l_debugfs_dir;
static int pt5161l_write_block_data(struct pt5161l_data *data, u32 address,
u8 len, u8 *val)
{ … }
static int pt5161l_read_block_data(struct pt5161l_data *data, u32 address,
u8 len, u8 *val)
{ … }
static int pt5161l_read_wide_reg(struct pt5161l_data *data, u32 address,
u8 width, u8 *val)
{ … }
static int
pt5161l_read_block_data_main_micro_indirect(struct pt5161l_data *data,
u32 address, u8 len, u8 *val)
{ … }
static int pt5161l_fw_load_check(struct pt5161l_data *data)
{ … }
static int pt5161l_heartbeat_check(struct pt5161l_data *data)
{ … }
static int pt5161l_fwsts_check(struct pt5161l_data *data)
{ … }
static int pt5161l_fw_is_at_least(struct pt5161l_data *data, u8 major, u8 minor,
u16 build)
{ … }
static int pt5161l_init_dev(struct pt5161l_data *data)
{ … }
static int pt5161l_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static umode_t pt5161l_is_visible(const void *data,
enum hwmon_sensor_types type, u32 attr,
int channel)
{ … }
static const struct hwmon_channel_info *pt5161l_info[] = …;
static const struct hwmon_ops pt5161l_hwmon_ops = …;
static const struct hwmon_chip_info pt5161l_chip_info = …;
static ssize_t pt5161l_debugfs_read_fw_ver(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations pt5161l_debugfs_ops_fw_ver = …;
static ssize_t pt5161l_debugfs_read_fw_load_sts(struct file *file,
char __user *buf, size_t count,
loff_t *ppos)
{ … }
static const struct file_operations pt5161l_debugfs_ops_fw_load_sts = …;
static ssize_t pt5161l_debugfs_read_hb_sts(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations pt5161l_debugfs_ops_hb_sts = …;
static int pt5161l_init_debugfs(struct pt5161l_data *data)
{ … }
static int pt5161l_probe(struct i2c_client *client)
{ … }
static void pt5161l_remove(struct i2c_client *client)
{ … }
static const struct of_device_id __maybe_unused pt5161l_of_match[] = …;
MODULE_DEVICE_TABLE(of, pt5161l_of_match);
static const struct acpi_device_id __maybe_unused pt5161l_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, pt5161l_acpi_match);
static const struct i2c_device_id pt5161l_id[] = …;
MODULE_DEVICE_TABLE(i2c, pt5161l_id);
static struct i2c_driver pt5161l_driver = …;
static int __init pt5161l_init(void)
{ … }
static void __exit pt5161l_exit(void)
{ … }
module_init(…) …;
module_exit(pt5161l_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;