Lines Matching defs:pwm
333 node = OF_getnodebyname(ca->ca_node, "pwm-fans");
339 if (strcmp(type, "fan-pwm-control") != 0) {
340 printf(": unsupported pwm-fan type: %s\n", type);
693 smu_fan_set_pwm(struct smu_softc *sc, struct smu_fan *fan, u_int16_t pwm)
700 cmd->data[0] = 0x10; /* fan-pwm-control */
702 cmd->data[2] = cmd->data[2 + fan->reg * 2] = (pwm >> 8) & 0xff;
703 cmd->data[3] = cmd->data[3 + fan->reg * 2] = (pwm & 0xff);
709 cmd->data[2] = (pwm >> 8) & 0xff;
710 cmd->data[3] = pwm & 0xff;
745 smu_fan_read_pwm(struct smu_softc *sc, struct smu_fan *fan, u_int16_t *pwm,
760 *pwm = cmd->data[fan->reg * 2 + 2];
782 * We don't know currently if there is a pwm read command
784 * the pwm value for now based on the rpm.
786 *pwm = *rpm * 100 / fan->max_rpm;
796 u_int16_t rpm, pwm;
799 error = smu_fan_read_pwm(sc, fan, &pwm, &rpm);
804 fan->sensor.value = pwm * 1000;
919 smu_fan_set_pwm_thermal(struct smu_fan *fan, int pwm)
924 (void)smu_fan_set_pwm(sc, fan, pwm);