#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/sysfs.h>
Go to the source code of this file.
#define MAX1619_REG_R_CHIP_ID 0xFF |
#define MAX1619_REG_R_CONFIG 0x03 |
#define MAX1619_REG_R_CONVRATE 0x04 |
#define MAX1619_REG_R_LOCAL_TEMP 0x00 |
#define MAX1619_REG_R_MAN_ID 0xFE |
#define MAX1619_REG_R_REMOTE_CRIT 0x10 |
#define MAX1619_REG_R_REMOTE_HIGH 0x07 |
#define MAX1619_REG_R_REMOTE_LOW 0x08 |
#define MAX1619_REG_R_REMOTE_TEMP 0x01 |
#define MAX1619_REG_R_STATUS 0x02 |
#define MAX1619_REG_R_TCRIT_HYST 0x11 |
#define MAX1619_REG_W_CONFIG 0x09 |
#define MAX1619_REG_W_CONVRATE 0x0A |
#define MAX1619_REG_W_REMOTE_CRIT 0x12 |
#define MAX1619_REG_W_REMOTE_HIGH 0x0D |
#define MAX1619_REG_W_REMOTE_LOW 0x0E |
#define MAX1619_REG_W_TCRIT_HYST 0x13 |
Value:
int
err = kstrtol(
buf, 10, &val); \
if (err) \
data->value = temp_to_reg(val); \
i2c_smbus_write_byte_data(client,
reg, data->value); \
mutex_unlock(&data->update_lock); \
}
Definition at line 149 of file max1619.c.
#define show_temp |
( |
|
value | ) |
|
MODULE_DESCRIPTION |
( |
"MAX1619 sensor driver" |
| ) |
|
MODULE_DEVICE_TABLE |
( |
i2c |
, |
|
|
max1619_id |
|
|
) |
| |
module_i2c_driver |
( |
max1619_driver |
| ) |
|
show_temp |
( |
temp_input1 |
| ) |
|
show_temp |
( |
temp_input2 |
| ) |
|