Lines Matching full:ctl2
291 * The two PWM CTL2 registers can read something other than what was
1752 u8 ctl2, ctl4; in pwm_show() local
1755 ctl2 = data->block9[nr][LM93_PWM_CTL2]; in pwm_show()
1757 if (ctl2 & 0x01) /* show user commanded value if enabled */ in pwm_show()
1760 rc = LM93_PWM_FROM_REG(ctl2 >> 4, (ctl4 & 0x07) ? in pwm_show()
1771 u8 ctl2, ctl4; in pwm_store() local
1780 ctl2 = lm93_read_byte(client, LM93_REG_PWM_CTL(nr, LM93_PWM_CTL2)); in pwm_store()
1782 ctl2 = (ctl2 & 0x0f) | LM93_PWM_TO_REG(val, (ctl4 & 0x07) ? in pwm_store()
1785 data->pwm_override[nr] = LM93_PWM_FROM_REG(ctl2 >> 4, in pwm_store()
1788 lm93_write_byte(client, LM93_REG_PWM_CTL(nr, LM93_PWM_CTL2), ctl2); in pwm_store()
1801 u8 ctl2; in pwm_enable_show() local
1804 ctl2 = data->block9[nr][LM93_PWM_CTL2]; in pwm_enable_show()
1805 if (ctl2 & 0x01) /* manual override enabled ? */ in pwm_enable_show()
1806 rc = ((ctl2 & 0xF0) == 0xF0) ? 0 : 1; in pwm_enable_show()
1819 u8 ctl2; in pwm_enable_store() local
1828 ctl2 = lm93_read_byte(client, LM93_REG_PWM_CTL(nr, LM93_PWM_CTL2)); in pwm_enable_store()
1832 ctl2 |= 0xF1; /* enable manual override, set PWM to max */ in pwm_enable_store()
1835 ctl2 |= 0x01; /* enable manual override */ in pwm_enable_store()
1838 ctl2 &= ~0x01; /* disable manual override */ in pwm_enable_store()
1845 lm93_write_byte(client, LM93_REG_PWM_CTL(nr, LM93_PWM_CTL2), ctl2); in pwm_enable_store()