staticint ltq_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *temp)
{ int value;
switch (attr) { case hwmon_temp_input: /* get the temperature including one decimal place */
value = (ltq_cgu_r32(CGU_GPHY1_CR) >> 9) & 0x01FF;
value = value * 5; /* range -38 to +154 °C, register value zero is -38.0 °C */
value -= 380; /* scale temp to millidegree */
value = value * 100; break; default: return -EOPNOTSUPP;
}
*temp = value; return 0;
}
static umode_t ltq_is_visible(constvoid *_data, enum hwmon_sensor_types type,
u32 attr, int channel)
{ if (type != hwmon_temp) return 0;
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.