mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
add temperature attribute for MCI cards
This commit is contained in:
parent
1b89edb4b1
commit
2e5056c4a1
@ -3614,6 +3614,12 @@ static ssize_t temp_show(struct device *device,
|
|||||||
}
|
}
|
||||||
return sprintf(buf, "%d %d\n", temp, temp2);
|
return sprintf(buf, "%d %d\n", temp, temp2);
|
||||||
}
|
}
|
||||||
|
if (link->info->type == DDB_OCTOPUS_MCI ) {
|
||||||
|
temp = 0xffff & ddbreadl(dev, TEMPMON_SENSOR0);
|
||||||
|
temp = (temp * 1000) >> 8;
|
||||||
|
|
||||||
|
return sprintf(buf, "%d\n", temp);
|
||||||
|
}
|
||||||
if (!link->info->temp_num)
|
if (!link->info->temp_num)
|
||||||
return sprintf(buf, "no sensor\n");
|
return sprintf(buf, "no sensor\n");
|
||||||
adap = &dev->i2c[link->info->temp_bus].adap;
|
adap = &dev->i2c[link->info->temp_bus].adap;
|
||||||
|
@ -584,6 +584,7 @@ static const struct ddb_info ddb_s2x_48 = {
|
|||||||
.tempmon_irq = 24,
|
.tempmon_irq = 24,
|
||||||
.mci_ports = 4,
|
.mci_ports = 4,
|
||||||
.mci_type = 0,
|
.mci_type = 0,
|
||||||
|
.temp_num = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct ddb_info ddb_m4 = {
|
static const struct ddb_info ddb_m4 = {
|
||||||
@ -595,6 +596,7 @@ static const struct ddb_info ddb_m4 = {
|
|||||||
.tempmon_irq = 24,
|
.tempmon_irq = 24,
|
||||||
.mci_ports = 2,
|
.mci_ports = 2,
|
||||||
.mci_type = 1,
|
.mci_type = 1,
|
||||||
|
.temp_num = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user