Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
Enable all temperature registers for IT8655E and IT8665E
Browse files Browse the repository at this point in the history
Those chips always have all 6 temperature registers enabled.

Signed-off-by: Guenter Roeck <[email protected]>
  • Loading branch information
groeck authored and hannesha committed Sep 18, 2018
1 parent 67ca7b3 commit 1ec80f4
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions it87.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,8 @@ static const struct it87_devices it87_devices[] = {
.model = "IT8655E",
.features = FEAT_NEWER_AUTOPWM | FEAT_16BIT_FANS
| FEAT_AVCC3 | FEAT_NEW_TEMPMAP | FEAT_SCALING
| FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL | FEAT_BANK_SEL,
| FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL | FEAT_BANK_SEL
| FEAT_SIX_TEMP | FEAT_MMIO,
.num_temp_limit = 6,
.num_temp_offset = 6,
.num_temp_map = 6,
Expand All @@ -709,7 +710,7 @@ static const struct it87_devices it87_devices[] = {
.features = FEAT_NEWER_AUTOPWM | FEAT_16BIT_FANS
| FEAT_AVCC3 | FEAT_NEW_TEMPMAP | FEAT_SCALING
| FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL | FEAT_SIX_FANS
| FEAT_SIX_PWM | FEAT_BANK_SEL | FEAT_MMIO,
| FEAT_SIX_PWM | FEAT_BANK_SEL | FEAT_MMIO | FEAT_SIX_TEMP,
.num_temp_limit = 6,
.num_temp_offset = 6,
.num_temp_map = 6,
Expand Down Expand Up @@ -4095,23 +4096,27 @@ static int it87_probe(struct platform_device *pdev)
if (has_four_temp(data)) {
data->has_temp |= BIT(3);
} else if (has_six_temp(data)) {
u8 reg = data->read(data, IT87_REG_TEMP456_ENABLE);

/* Check for additional temperature sensors */
if ((reg & 0x03) >= 0x02)
data->has_temp |= BIT(3);
if (((reg >> 2) & 0x03) >= 0x02)
data->has_temp |= BIT(4);
if (((reg >> 4) & 0x03) >= 0x02)
data->has_temp |= BIT(5);

/* Check for additional voltage sensors */
if ((reg & 0x03) == 0x01)
data->has_in |= BIT(10);
if (((reg >> 2) & 0x03) == 0x01)
data->has_in |= BIT(11);
if (((reg >> 4) & 0x03) == 0x01)
data->has_in |= BIT(12);
if (sio_data->type == it8655 || sio_data->type == it8665) {
data->has_temp |= BIT(3) | BIT(4) | BIT(5);
} else {
u8 reg = data->read(data, IT87_REG_TEMP456_ENABLE);

/* Check for additional temperature sensors */
if ((reg & 0x03) >= 0x02)
data->has_temp |= BIT(3);
if (((reg >> 2) & 0x03) >= 0x02)
data->has_temp |= BIT(4);
if (((reg >> 4) & 0x03) >= 0x02)
data->has_temp |= BIT(5);

/* Check for additional voltage sensors */
if ((reg & 0x03) == 0x01)
data->has_in |= BIT(10);
if (((reg >> 2) & 0x03) == 0x01)
data->has_in |= BIT(11);
if (((reg >> 4) & 0x03) == 0x01)
data->has_in |= BIT(12);
}
}

data->has_beep = !!sio_data->beep_pin;
Expand Down

0 comments on commit 1ec80f4

Please sign in to comment.