* The CR registers are the same for all chips, and not all chips
* support clearing the caseopen status through "regular" registers.
*/
* The CR registers are the same for all chips, and not all chips
* support clearing the caseopen status through "regular" registers.
*/
superio_select(sio_data->sioreg, NCT6775_LD_ACPI);
reg = superio_inb(sio_data->sioreg, NCT6775_REG_CR_CASEOPEN_CLR[nr]);
reg |= NCT6775_CR_CASEOPEN_CLR_MASK[nr];
superio_select(sio_data->sioreg, NCT6775_LD_ACPI);
reg = superio_inb(sio_data->sioreg, NCT6775_REG_CR_CASEOPEN_CLR[nr]);
reg |= NCT6775_CR_CASEOPEN_CLR_MASK[nr];
nct6775_check_fan_inputs(const struct nct6775_sio_data *sio_data,
struct nct6775_data *data)
{
int regval;
bool fan3pin, fan3min, fan4pin, fan4min, fan5pin;
bool pwm3pin, pwm4pin, pwm5pin;
nct6775_check_fan_inputs(const struct nct6775_sio_data *sio_data,
struct nct6775_data *data)
{
int regval;
bool fan3pin, fan3min, fan4pin, fan4min, fan5pin;
bool pwm3pin, pwm4pin, pwm5pin;
data->has_fan_min |= (fan4min << 3) | (fan5pin << 4);
data->has_pwm = 0x03 | (pwm3pin << 2) | (pwm4pin << 3) | (pwm5pin << 4);
data->has_fan_min |= (fan4min << 3) | (fan5pin << 4);
data->has_pwm = 0x03 | (pwm3pin << 2) | (pwm4pin << 3) | (pwm5pin << 4);
/* Read fan clock dividers immediately */
nct6775_update_fan_div_common(dev, data);
/* Read fan clock dividers immediately */
nct6775_update_fan_div_common(dev, data);