linux/drivers/hwmon/w83773g.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (C) 2017 IBM Corp.
 *
 * Driver for the Nuvoton W83773G SMBus temperature sensor IC.
 * Supported models: W83773G
 */

#include <linux/module.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>
#include <linux/of.h>
#include <linux/regmap.h>

/* W83773 has 3 channels */
#define W83773_CHANNELS

/* The W83773 registers */
#define W83773_CONVERSION_RATE_REG_READ
#define W83773_CONVERSION_RATE_REG_WRITE
#define W83773_MANUFACTURER_ID_REG
#define W83773_LOCAL_TEMP

static const u8 W83773_STATUS[2] =;

static const u8 W83773_TEMP_LSB[2] =;
static const u8 W83773_TEMP_MSB[2] =;

static const u8 W83773_OFFSET_LSB[2] =;
static const u8 W83773_OFFSET_MSB[2] =;

/* this is the number of sensors in the device */
static const struct i2c_device_id w83773_id[] =;

MODULE_DEVICE_TABLE(i2c, w83773_id);

static const struct of_device_id __maybe_unused w83773_of_match[] =;
MODULE_DEVICE_TABLE(of, w83773_of_match);

static inline long temp_of_local(s8 reg)
{}

static inline long temp_of_remote(s8 hb, u8 lb)
{}

static int get_local_temp(struct regmap *regmap, long *val)
{}

static int get_remote_temp(struct regmap *regmap, int index, long *val)
{}

static int get_fault(struct regmap *regmap, int index, long *val)
{}

static int get_offset(struct regmap *regmap, int index, long *val)
{}

static int set_offset(struct regmap *regmap, int index, long val)
{}

static int get_update_interval(struct regmap *regmap, long *val)
{}

static int set_update_interval(struct regmap *regmap, long val)
{}

static int w83773_read(struct device *dev, enum hwmon_sensor_types type,
		       u32 attr, int channel, long *val)
{}

static int w83773_write(struct device *dev, enum hwmon_sensor_types type,
			u32 attr, int channel, long val)
{}

static umode_t w83773_is_visible(const void *data, enum hwmon_sensor_types type,
				 u32 attr, int channel)
{}

static const struct hwmon_channel_info * const w83773_info[] =;

static const struct hwmon_ops w83773_ops =;

static const struct hwmon_chip_info w83773_chip_info =;

static const struct regmap_config w83773_regmap_config =;

static int w83773_probe(struct i2c_client *client)
{}

static struct i2c_driver w83773_driver =;

module_i2c_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();