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
@ -3584,7 +3584,7 @@ static ssize_t temp_show(struct device *device,
|
||||
int i;
|
||||
u8 tmp[2];
|
||||
|
||||
if (link->info->type == DDB_MOD) {
|
||||
if (link->info->type == DDB_MOD ) {
|
||||
if (link->info->version >= 2) {
|
||||
temp = 0xffff & ddbreadl(dev, TEMPMON2_BOARD);
|
||||
temp = (temp * 1000) >> 8;
|
||||
@ -3614,6 +3614,12 @@ static ssize_t temp_show(struct device *device,
|
||||
}
|
||||
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)
|
||||
return sprintf(buf, "no sensor\n");
|
||||
adap = &dev->i2c[link->info->temp_bus].adap;
|
||||
|
@ -584,6 +584,7 @@ static const struct ddb_info ddb_s2x_48 = {
|
||||
.tempmon_irq = 24,
|
||||
.mci_ports = 4,
|
||||
.mci_type = 0,
|
||||
.temp_num = 1,
|
||||
};
|
||||
|
||||
static const struct ddb_info ddb_m4 = {
|
||||
@ -595,6 +596,7 @@ static const struct ddb_info ddb_m4 = {
|
||||
.tempmon_irq = 24,
|
||||
.mci_ports = 2,
|
||||
.mci_type = 1,
|
||||
.temp_num = 1,
|
||||
};
|
||||
|
||||
/****************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user