#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>
Go to the source code of this file.
#define ADT7408_DEVID 0x0801 |
#define ADT7408_DEVID_MASK 0xffff |
#define ADT_MANID 0x11d4 /* Analog Devices */ |
#define AT30TS00_DEVID 0x8201 |
#define AT30TS00_DEVID_MASK 0xffff |
#define ATMEL_MANID 0x001f /* Atmel */ |
#define CAT6095_DEVID 0x0800 /* Also matches CAT34TS02 */ |
#define CAT6095_DEVID_MASK 0xffe0 |
#define IDT_MANID 0x00b3 /* IDT */ |
#define JC42_ALARM_CRIT_BIT 15 |
#define JC42_ALARM_MAX_BIT 14 |
#define JC42_ALARM_MIN_BIT 13 |
#define JC42_CAP_RANGE (1 << 2) |
#define JC42_CFG_CRIT_ONLY (1 << 2) |
#define JC42_CFG_EVENT_LOCK (1 << 7) |
#define JC42_CFG_HYST_MASK (0x03 << 9) |
#define JC42_CFG_HYST_SHIFT 9 |
#define JC42_CFG_SHUTDOWN (1 << 8) |
#define JC42_CFG_TCRIT_LOCK (1 << 6) |
#define JC42_DEV_PM_OPS NULL |
#define JC42_REG_CAP 0x00 |
#define JC42_REG_CONFIG 0x01 |
#define JC42_REG_DEVICEID 0x07 |
#define JC42_REG_MANID 0x06 |
#define JC42_REG_TEMP 0x05 |
#define JC42_REG_TEMP_CRITICAL 0x04 |
#define JC42_REG_TEMP_LOWER 0x03 |
#define JC42_REG_TEMP_UPPER 0x02 |
#define JC42_TEMP_MAX 125000 |
#define JC42_TEMP_MIN_EXTENDED (-40000) |
#define MAX6604_DEVID 0x3e00 |
#define MAX6604_DEVID_MASK 0xffff |
#define MAX_MANID 0x004d /* Maxim */ |
#define MCP9804_DEVID 0x0200 |
#define MCP9804_DEVID_MASK 0xfffc |
#define MCP98242_DEVID 0x2000 |
#define MCP98242_DEVID_MASK 0xfffc |
#define MCP98243_DEVID 0x2100 |
#define MCP98243_DEVID_MASK 0xfffc |
#define MCP9843_DEVID 0x0000 /* Also matches mcp9805 */ |
#define MCP9843_DEVID_MASK 0xfffe |
#define MCP_MANID 0x0054 /* Microchip */ |
#define NXP_MANID 0x1131 /* NXP Semiconductors */ |
#define ONS_MANID 0x1b09 /* ON Semiconductor */ |
#define SE97_DEVID 0xa200 |
#define SE97_DEVID_MASK 0xfffc |
#define SE98_DEVID 0xa100 |
#define SE98_DEVID_MASK 0xfffc |
Value:
if (kstrtol(
buf, 10, &val) < 0) \
mutex_lock(&data->update_lock);
\
data->value = jc42_temp_to_reg(val, data->extended); \
err = i2c_smbus_write_word_swapped(client,
reg, data->value); \
if (err < 0) \
mutex_unlock(&data->update_lock); \
}
Definition at line 311 of file jc42.c.
Value:
if (IS_ERR(data)) \
return PTR_ERR(data); \
return
sprintf(
buf,
"%d\n", jc42_temp_from_reg(data->value)); \
}
Definition at line 263 of file jc42.c.
#define STM_MANID 0x104a /* ST Microelectronics */ |
#define STTS2002_DEVID 0x0300 |
#define STTS2002_DEVID_MASK 0xffff |
#define STTS3000_DEVID 0x0200 |
#define STTS3000_DEVID_MASK 0xffff |
#define STTS424_DEVID 0x0101 |
#define STTS424_DEVID_MASK 0xffff |
#define STTS424E_DEVID 0x0000 |
#define STTS424E_DEVID_MASK 0xfffe |
#define TS3000B3_DEVID 0x2903 /* Also matches TSE2002B3 */ |
#define TS3000B3_DEVID_MASK 0xffff |
#define TS3000GB2_DEVID 0x2912 /* Also matches TSE2002GB2 */ |
#define TS3000GB2_DEVID_MASK 0xffff |
MODULE_DESCRIPTION |
( |
"JC42 driver" |
| ) |
|
MODULE_DEVICE_TABLE |
( |
i2c |
, |
|
|
jc42_id |
|
|
) |
| |
module_i2c_driver |
( |
jc42_driver |
| ) |
|