linux/drivers/hwmon/nct6775.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __HWMON_NCT6775_H__
#define __HWMON_NCT6775_H__

#include <linux/types.h>

enum kinds {};
enum pwm_enable {};

#define NUM_TEMP
#define NUM_TEMP_FIXED
#define NUM_TSI_TEMP

#define NUM_REG_ALARM
#define NUM_REG_BEEP

#define NUM_FAN
#define NUM_IN

struct nct6775_data {};

static inline int nct6775_read_value(struct nct6775_data *data, u16 reg, u16 *value)
{}

static inline int nct6775_write_value(struct nct6775_data *data, u16 reg, u16 value)
{}

struct nct6775_data *nct6775_update_device(struct device *dev);

bool nct6775_reg_is_word_sized(struct nct6775_data *data, u16 reg);
int nct6775_probe(struct device *dev, struct nct6775_data *data,
		  const struct regmap_config *regmapcfg);

ssize_t nct6775_show_alarm(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t nct6775_show_beep(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t nct6775_store_beep(struct device *dev, struct device_attribute *attr, const char *buf,
			   size_t count);

static inline int nct6775_write_temp(struct nct6775_data *data, u16 reg, u16 value)
{}

static inline umode_t nct6775_attr_mode(struct nct6775_data *data, struct attribute *attr)
{}

static inline int
nct6775_add_attr_group(struct nct6775_data *data, const struct attribute_group *group)
{}

#define NCT6775_REG_BANK
#define NCT6775_REG_CONFIG

#define NCT6775_REG_FANDIV1
#define NCT6775_REG_FANDIV2

#define NCT6791_REG_HM_IO_SPACE_LOCK_ENABLE

/*
 * ALARM_BITS and BEEP_BITS store bit-index for the mask of the registers
 * loaded into data->alarm and data->beep.
 *
 * Every input register (IN/TEMP/FAN) must have a corresponding
 *   ALARM/BEEP bit at the same index BITS[BASE + index]
 * Set value to -1 to disable the visibility of that '*_alarm' attribute and
 * to pad the bits until the next BASE
 *
 * Beep has an additional GLOBAL_BEEP_ENABLE bit
 */
#define VIN_ALARM_BASE
#define FAN_ALARM_BASE
#define TEMP_ALARM_BASE
#define INTRUSION_ALARM_BASE
#define BEEP_ENABLE_BASE

#define NUM_ALARM_BITS
#define NUM_BEEP_BITS

/*
 * Not currently used:
 * REG_MAN_ID has the value 0x5ca3 for all supported chips.
 * REG_CHIP_ID == 0x88/0xa1/0xc1 depending on chip model.
 * REG_MAN_ID is at port 0x4f
 * REG_CHIP_ID is at port 0x58
 */

#endif /* __HWMON_NCT6775_H__ */