/* clear shutdown bit, keep other settings as left by * the firmware for now
*/
cfg_new = cfg & ~0x01;
i2c_smbus_write_byte_data(lm->i2c, 1, cfg_new);
lm->inited = 1;
/* If we just powered it up, let's wait 200 ms */
msleep(200);
}
/* Read temperature register */
data = (s32)le16_to_cpu(i2c_smbus_read_word_data(lm->i2c, 0));
data <<= 8;
*value = data;
loc = of_get_property(client->dev.of_node, "hwsensor-location", NULL); if (!loc) {
dev_warn(&client->dev, "Missing hwsensor-location property!\n"); return -ENXIO;
}
/* Usual rant about sensor names not beeing very consistent in * the device-tree, oh well ... * Add more entries below as you deal with more setups
*/ if (!strcmp(loc, "Hard drive") || !strcmp(loc, "DRIVE BAY"))
name = "hd-temp"; elseif (!strcmp(loc, "Incoming Air Temp"))
name = "incoming-air-temp"; elseif (!strcmp(loc, "ODD Temp"))
name = "optical-drive-temp"; elseif (!strcmp(loc, "HD Temp"))
name = "hard-drive-temp"; elseif (!strcmp(loc, "PCI SLOTS"))
name = "slots-temp"; elseif (!strcmp(loc, "CPU A INLET"))
name = "cpu-inlet-temp-0"; elseif (!strcmp(loc, "CPU B INLET"))
name = "cpu-inlet-temp-1"; else return -ENXIO;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.