linux/drivers/hwmon/ltc2991.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2023 Analog Devices, Inc.
 * Author: Antoniu Miclaus <[email protected]>
 */

#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/hwmon.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>

#define LTC2991_STATUS_LOW
#define LTC2991_CH_EN_TRIGGER
#define LTC2991_V1_V4_CTRL
#define LTC2991_V5_V8_CTRL
#define LTC2991_PWM_TH_LSB_T_INT
#define LTC2991_PWM_TH_MSB
#define LTC2991_CHANNEL_V_MSB(x)
#define LTC2991_CHANNEL_T_MSB(x)
#define LTC2991_CHANNEL_C_MSB(x)
#define LTC2991_T_INT_MSB
#define LTC2991_VCC_MSB

#define LTC2991_V7_V8_EN
#define LTC2991_V5_V6_EN
#define LTC2991_V3_V4_EN
#define LTC2991_V1_V2_EN
#define LTC2991_T_INT_VCC_EN

#define LTC2991_V3_V4_FILT_EN
#define LTC2991_V3_V4_TEMP_EN
#define LTC2991_V3_V4_DIFF_EN
#define LTC2991_V1_V2_FILT_EN
#define LTC2991_V1_V2_TEMP_EN
#define LTC2991_V1_V2_DIFF_EN

#define LTC2991_V7_V8_FILT_EN
#define LTC2991_V7_V8_TEMP_EN
#define LTC2991_V7_V8_DIFF_EN
#define LTC2991_V5_V6_FILT_EN
#define LTC2991_V5_V6_TEMP_EN
#define LTC2991_V5_V6_DIFF_EN

#define LTC2991_REPEAT_ACQ_EN
#define LTC2991_T_INT_FILT_EN

#define LTC2991_MAX_CHANNEL
#define LTC2991_T_INT_CH_NR
#define LTC2991_VCC_CH_NR

struct ltc2991_state {};

static int ltc2991_read_reg(struct ltc2991_state *st, u8 addr, u8 reg_len,
			    int *val)
{}

static int ltc2991_get_voltage(struct ltc2991_state *st, u32 reg, long *val)
{}

static int ltc2991_read_in(struct device *dev, u32 attr, int channel, long *val)
{}

static int ltc2991_get_curr(struct ltc2991_state *st, u32 reg, int channel,
			    long *val)
{}

static int ltc2991_read_curr(struct device *dev, u32 attr, int channel,
			     long *val)
{}

static int ltc2991_get_temp(struct ltc2991_state *st, u32 reg, int channel,
			    long *val)
{}

static int ltc2991_read_temp(struct device *dev, u32 attr, int channel,
			     long *val)
{}

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

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

static const struct hwmon_ops ltc2991_hwmon_ops =;

static const struct hwmon_channel_info *ltc2991_info[] =;

static const struct hwmon_chip_info ltc2991_chip_info =;

static const struct regmap_config ltc2991_regmap_config =;

static int ltc2991_init(struct ltc2991_state *st, struct device *dev)
{}

static int ltc2991_i2c_probe(struct i2c_client *client)
{}

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

static const struct i2c_device_id ltc2991_i2c_id[] =;
MODULE_DEVICE_TABLE(i2c, ltc2991_i2c_id);

static struct i2c_driver ltc2991_i2c_driver =;

module_i2c_driver();

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