mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-24 20:21:43 +00:00
Add user-space support for the applesmc driver. Patch contributed by
Soeren Sonnenburg. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4390 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
461e812881
commit
6f2e4f0b91
6 files changed
+98
No files matched your search
@@ -6,6 +6,7 @@ SVN HEAD
|
||||
File lm_sensors.sysconfig: Delete, now generated by sensors-detect
|
||||
Library: Clean up pwm symbol names translation
|
||||
Add dme1737 support
|
||||
Add applesmc support
|
||||
Man page sensors.conf.5: Update the chip statement section
|
||||
Module i2c-nforce2: Add nForce MCP61, MCP65 support (2.6 backport)
|
||||
Program isadump: Detect when address bit 7 is a busy flag
|
||||
@@ -15,6 +16,7 @@ SVN HEAD
|
||||
Update URI
|
||||
Program sensors: Drop ddcmon and eeprom support
|
||||
Add dme1737 support
|
||||
Add applesmc support
|
||||
Program sensors-detect: Stop Super-I/O probe after first family success
|
||||
Fix SMSC DME1737 detection
|
||||
Add /usr/sbin to the PATH (#2199)
|
||||
|
||||
+46
@@ -6048,6 +6048,51 @@ static sensors_chip_feature dme1737_features[] =
|
||||
{ { 0 }, 0 }
|
||||
};
|
||||
|
||||
static sensors_chip_feature applesmc_features[] =
|
||||
{
|
||||
{ { SENSORS_APPLESMC_TEMP(0), "temp1", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(1), 3 },
|
||||
{ { SENSORS_APPLESMC_TEMP(1), "temp2", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(1), 3 },
|
||||
{ { SENSORS_APPLESMC_TEMP(2), "temp3", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(1), 3 },
|
||||
{ { SENSORS_APPLESMC_TEMP(3), "temp4", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(1), 3 },
|
||||
{ { SENSORS_APPLESMC_TEMP(4), "temp5", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(1), 3 },
|
||||
{ { SENSORS_APPLESMC_TEMP(5), "temp6", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(1), 3 },
|
||||
{ { SENSORS_APPLESMC_TEMP(6), "temp7", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(1), 3 },
|
||||
{ { SENSORS_APPLESMC_TEMP(7), "temp8", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(1), 3 },
|
||||
{ { SENSORS_APPLESMC_TEMP(8), "temp9", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(1), 3 },
|
||||
{ { SENSORS_APPLESMC_TEMP(9), "temp10", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(1), 3 },
|
||||
{ { SENSORS_APPLESMC_TEMP(10), "temp11", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(1), 3 },
|
||||
{ { SENSORS_APPLESMC_TEMP(11), "temp12", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(1), 3 },
|
||||
{ { SENSORS_APPLESMC_FAN(0), "fan1", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(2), 0 },
|
||||
{ { SENSORS_APPLESMC_FAN(1), "fan2", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(2), 0 },
|
||||
{ { SENSORS_APPLESMC_FAN_MIN(0), "fan1_min", SENSORS_APPLESMC_FAN(0),
|
||||
SENSORS_APPLESMC_FAN(0), R }, NOSYSCTL, VALUE(1), 0 },
|
||||
{ { SENSORS_APPLESMC_FAN_MIN(1), "fan2_min", SENSORS_APPLESMC_FAN(1),
|
||||
SENSORS_APPLESMC_FAN(1), R }, NOSYSCTL, VALUE(1), 0 },
|
||||
{ { SENSORS_APPLESMC_FAN_MAX(0), "fan1_max", SENSORS_APPLESMC_FAN(0),
|
||||
SENSORS_APPLESMC_FAN(0), R }, NOSYSCTL, VALUE(1), 0 },
|
||||
{ { SENSORS_APPLESMC_FAN_MAX(1), "fan2_max", SENSORS_APPLESMC_FAN(1),
|
||||
SENSORS_APPLESMC_FAN(1), R }, NOSYSCTL, VALUE(1), 0 },
|
||||
{ { SENSORS_APPLESMC_FAN_SAFE(0), "fan1_safe", SENSORS_APPLESMC_FAN(0),
|
||||
SENSORS_APPLESMC_FAN(0), R }, NOSYSCTL, VALUE(1), 0 },
|
||||
{ { SENSORS_APPLESMC_FAN_SAFE(1), "fan2_safe", SENSORS_APPLESMC_FAN(1),
|
||||
SENSORS_APPLESMC_FAN(1), R }, NOSYSCTL, VALUE(1), 0 },
|
||||
{ { 0 }, 0 }
|
||||
};
|
||||
|
||||
sensors_chip_features sensors_chip_features_list[] =
|
||||
{
|
||||
{ SENSORS_LM78_PREFIX, lm78_features },
|
||||
@@ -6161,5 +6206,6 @@ sensors_chip_features sensors_chip_features_list[] =
|
||||
{ SENSORS_K8TEMP_PREFIX, k8temp_features },
|
||||
{ SENSORS_CORETEMP_PREFIX, coretemp_features },
|
||||
{ SENSORS_DME1737_PREFIX, dme1737_features },
|
||||
{ SENSORS_APPLESMC_PREFIX, applesmc_features },
|
||||
{ 0 }
|
||||
};
|
||||
+13
@@ -2292,4 +2292,17 @@
|
||||
#define SENSORS_DME1737_VID (0xf0) /* R */
|
||||
#define SENSORS_DME1737_VRM (0xf1) /* RW */
|
||||
|
||||
/* applesmc */
|
||||
|
||||
#define SENSORS_APPLESMC_PREFIX "applesmc"
|
||||
|
||||
/* temp n from 0 to 11 */
|
||||
#define SENSORS_APPLESMC_TEMP(n) (0x01 + (n)) /* R */
|
||||
|
||||
/* fan n from 0 to 1 */
|
||||
#define SENSORS_APPLESMC_FAN(n) (0x21 + (n)) /* R */
|
||||
#define SENSORS_APPLESMC_FAN_MIN(n) (0x41 + (n)) /* R */
|
||||
#define SENSORS_APPLESMC_FAN_MAX(n) (0x61 + (n)) /* R */
|
||||
#define SENSORS_APPLESMC_FAN_SAFE(n) (0x81 + (n)) /* R */
|
||||
|
||||
#endif /* def LIB_SENSORS_CHIPS_H */
|
||||
@@ -6041,6 +6041,41 @@ void print_dme1737(const sensors_chip_name *name)
|
||||
print_vid_info(name, SENSORS_DME1737_VID, SENSORS_DME1737_VRM);
|
||||
}
|
||||
|
||||
void print_applesmc(const sensors_chip_name *name)
|
||||
{
|
||||
char *label;
|
||||
double cur, min, max, safe;
|
||||
int valid;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 12; i++) {
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_APPLESMC_TEMP(i), &label, &valid)
|
||||
&& !sensors_get_feature(*name, SENSORS_APPLESMC_TEMP(i), &cur)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
print_temp_info(cur, 0, 0, SINGLE, 0, 0);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
free(label);
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_APPLESMC_FAN(i), &label, &valid)
|
||||
&& !sensors_get_feature(*name, SENSORS_APPLESMC_FAN(i), &cur)
|
||||
&& !sensors_get_feature(*name, SENSORS_APPLESMC_FAN_MIN(i), &min)
|
||||
&& !sensors_get_feature(*name, SENSORS_APPLESMC_FAN_MAX(i), &max)
|
||||
&& !sensors_get_feature(*name, SENSORS_APPLESMC_FAN_SAFE(i), &safe)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
printf("%4.0f RPM (safe = %4.0f RPM, min = %4.0f RPM, max = %4.0f RPM)\n",
|
||||
cur, safe, min, max);
|
||||
}
|
||||
}
|
||||
free(label);
|
||||
}
|
||||
}
|
||||
|
||||
void print_unknown_chip(const sensors_chip_name *name)
|
||||
{
|
||||
int a,b,valid;
|
||||
|
||||
@@ -77,5 +77,6 @@ extern void print_abituguru(const sensors_chip_name *name);
|
||||
extern void print_k8temp(const sensors_chip_name *name);
|
||||
extern void print_coretemp(const sensors_chip_name *name);
|
||||
extern void print_dme1737(const sensors_chip_name *name);
|
||||
extern void print_applesmc(const sensors_chip_name *name);
|
||||
|
||||
#endif /* def PROG_SENSORS_CHIPS_H */
|
||||
@@ -422,6 +422,7 @@ struct match matches[] = {
|
||||
{ "k8temp", print_k8temp },
|
||||
{ "coretemp", print_coretemp },
|
||||
{ "dme1737", print_dme1737 },
|
||||
{ "applesmc", print_applesmc },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user