8 #include <linux/types.h>
9 #include <linux/errno.h>
10 #include <linux/kernel.h>
12 #include <linux/slab.h>
13 #include <linux/i2c.h>
25 #define MAX6690_INTERNAL_TEMP 0
26 #define MAX6690_EXTERNAL_TEMP 1
33 #define wf_to_6690(x) container_of((x), struct wf_6690_sensor, sens)
51 static void wf_max6690_release(
struct wf_sensor *
sr)
59 .get_value = wf_max6690_get,
60 .release = wf_max6690_release,
73 dev_warn(&client->
dev,
"Missing hwsensor-location property!\n");
81 if (!
strcmp(loc,
"BACKSIDE") || !
strcmp(loc,
"SYS CTRLR AMBIENT"))
82 name =
"backside-temp";
83 else if (!
strcmp(loc,
"NB Ambient"))
84 name =
"north-bridge-temp";
85 else if (!
strcmp(loc,
"GPU Ambient"))
98 max->
sens.name = (
char *)name;
99 max->
sens.ops = &wf_max6690_ops;
100 i2c_set_clientdata(client, max);
108 static int wf_max6690_remove(
struct i2c_client *client)
119 {
"MAC,max6690", 0 },
124 static struct i2c_driver wf_max6690_driver = {
126 .name =
"wf_max6690",
128 .probe = wf_max6690_probe,
129 .remove = wf_max6690_remove,
130 .id_table = wf_max6690_id,
133 static int __init wf_max6690_sensor_init(
void)
135 return i2c_add_driver(&wf_max6690_driver);
138 static void __exit wf_max6690_sensor_exit(
void)