Lines Matching refs:pwm_port

173 	int pwm_port;  member
242 enum pwm_port { PWMA, PWMB, PWMC, PWMD, PWME, PWMF, PWMG, PWMH }; enum
400 static void aspeed_set_pwm_port_enable(struct regmap *regmap, u8 pwm_port, in aspeed_set_pwm_port_enable() argument
403 regmap_update_bits(regmap, pwm_port_params[pwm_port].ctrl_reg, in aspeed_set_pwm_port_enable()
404 pwm_port_params[pwm_port].pwm_en, in aspeed_set_pwm_port_enable()
405 enable ? pwm_port_params[pwm_port].pwm_en : 0); in aspeed_set_pwm_port_enable()
409 u8 pwm_port, u8 type) in aspeed_set_pwm_port_type() argument
411 u32 reg_value = (type & 0x1) << pwm_port_params[pwm_port].type_part1; in aspeed_set_pwm_port_type()
413 reg_value |= (type & 0x2) << pwm_port_params[pwm_port].type_part2; in aspeed_set_pwm_port_type()
415 regmap_update_bits(regmap, pwm_port_params[pwm_port].ctrl_reg, in aspeed_set_pwm_port_type()
416 pwm_port_params[pwm_port].type_mask, reg_value); in aspeed_set_pwm_port_type()
420 u8 pwm_port, u8 rising, in aspeed_set_pwm_port_duty_rising_falling() argument
424 pwm_port_params[pwm_port].duty_ctrl_rise_point); in aspeed_set_pwm_port_duty_rising_falling()
426 pwm_port_params[pwm_port].duty_ctrl_fall_point); in aspeed_set_pwm_port_duty_rising_falling()
428 regmap_update_bits(regmap, pwm_port_params[pwm_port].duty_ctrl_reg, in aspeed_set_pwm_port_duty_rising_falling()
429 pwm_port_params[pwm_port].duty_ctrl_rise_fall_mask, in aspeed_set_pwm_port_duty_rising_falling()
734 u8 pwm_port) in aspeed_create_pwm_port() argument
736 aspeed_set_pwm_port_enable(priv->regmap, pwm_port, true); in aspeed_create_pwm_port()
737 priv->pwm_present[pwm_port] = true; in aspeed_create_pwm_port()
739 priv->pwm_port_type[pwm_port] = TYPEM; in aspeed_create_pwm_port()
740 aspeed_set_pwm_port_type(priv->regmap, pwm_port, TYPEM); in aspeed_create_pwm_port()
742 priv->pwm_port_fan_ctrl[pwm_port] = INIT_FAN_CTRL; in aspeed_create_pwm_port()
743 aspeed_set_pwm_port_fan_ctrl(priv, pwm_port, INIT_FAN_CTRL); in aspeed_create_pwm_port()
794 cdev->priv->pwm_port_fan_ctrl[cdev->pwm_port] = in aspeed_pwm_cz_set_cur_state()
796 aspeed_set_pwm_port_fan_ctrl(cdev->priv, cdev->pwm_port, in aspeed_pwm_cz_set_cur_state()
811 u32 pwm_port, u8 num_levels) in aspeed_create_pwm_cooling() argument
833 snprintf(cdev->name, MAX_CDEV_NAME_LEN, "%pOFn%d", child, pwm_port); in aspeed_create_pwm_cooling()
841 cdev->pwm_port = pwm_port; in aspeed_create_pwm_cooling()
843 priv->cdev[pwm_port] = cdev; in aspeed_create_pwm_cooling()
853 u32 pwm_port; in aspeed_create_fan() local
856 ret = of_property_read_u32(child, "reg", &pwm_port); in aspeed_create_fan()
859 if (pwm_port >= ARRAY_SIZE(pwm_port_params)) in aspeed_create_fan()
861 aspeed_create_pwm_port(priv, (u8)pwm_port); in aspeed_create_fan()
866 ret = aspeed_create_pwm_cooling(dev, child, priv, pwm_port, in aspeed_create_fan()
883 aspeed_create_fan_tach_channel(priv, fan_tach_ch, count, pwm_port); in aspeed_create_fan()