Lines Matching refs:pwm_port
175 int pwm_port; member
244 enum pwm_port { PWMA, PWMB, PWMC, PWMD, PWME, PWMF, PWMG, PWMH }; enum
402 static void aspeed_set_pwm_port_enable(struct regmap *regmap, u8 pwm_port, in aspeed_set_pwm_port_enable() argument
405 regmap_update_bits(regmap, pwm_port_params[pwm_port].ctrl_reg, in aspeed_set_pwm_port_enable()
406 pwm_port_params[pwm_port].pwm_en, in aspeed_set_pwm_port_enable()
407 enable ? pwm_port_params[pwm_port].pwm_en : 0); in aspeed_set_pwm_port_enable()
411 u8 pwm_port, u8 type) in aspeed_set_pwm_port_type() argument
413 u32 reg_value = (type & 0x1) << pwm_port_params[pwm_port].type_part1; in aspeed_set_pwm_port_type()
415 reg_value |= (type & 0x2) << pwm_port_params[pwm_port].type_part2; in aspeed_set_pwm_port_type()
417 regmap_update_bits(regmap, pwm_port_params[pwm_port].ctrl_reg, in aspeed_set_pwm_port_type()
418 pwm_port_params[pwm_port].type_mask, reg_value); in aspeed_set_pwm_port_type()
422 u8 pwm_port, u8 rising, in aspeed_set_pwm_port_duty_rising_falling() argument
426 pwm_port_params[pwm_port].duty_ctrl_rise_point); in aspeed_set_pwm_port_duty_rising_falling()
428 pwm_port_params[pwm_port].duty_ctrl_fall_point); in aspeed_set_pwm_port_duty_rising_falling()
430 regmap_update_bits(regmap, pwm_port_params[pwm_port].duty_ctrl_reg, in aspeed_set_pwm_port_duty_rising_falling()
431 pwm_port_params[pwm_port].duty_ctrl_rise_fall_mask, in aspeed_set_pwm_port_duty_rising_falling()
736 u8 pwm_port) in aspeed_create_pwm_port() argument
738 aspeed_set_pwm_port_enable(priv->regmap, pwm_port, true); in aspeed_create_pwm_port()
739 priv->pwm_present[pwm_port] = true; in aspeed_create_pwm_port()
741 priv->pwm_port_type[pwm_port] = TYPEM; in aspeed_create_pwm_port()
742 aspeed_set_pwm_port_type(priv->regmap, pwm_port, TYPEM); in aspeed_create_pwm_port()
744 priv->pwm_port_fan_ctrl[pwm_port] = INIT_FAN_CTRL; in aspeed_create_pwm_port()
745 aspeed_set_pwm_port_fan_ctrl(priv, pwm_port, INIT_FAN_CTRL); in aspeed_create_pwm_port()
803 cdev->priv->pwm_port_fan_ctrl[cdev->pwm_port] = in aspeed_pwm_cz_set_cur_state()
805 aspeed_set_pwm_port_fan_ctrl(cdev->priv, cdev->pwm_port, in aspeed_pwm_cz_set_cur_state()
820 u32 pwm_port, u8 num_levels) in aspeed_create_pwm_cooling() argument
842 snprintf(cdev->name, MAX_CDEV_NAME_LEN, "%pOFn%d", child, pwm_port); in aspeed_create_pwm_cooling()
850 cdev->pwm_port = pwm_port; in aspeed_create_pwm_cooling()
852 priv->cdev[pwm_port] = cdev; in aspeed_create_pwm_cooling()
862 u32 pwm_port; in aspeed_create_fan() local
865 ret = of_property_read_u32(child, "reg", &pwm_port); in aspeed_create_fan()
868 if (pwm_port >= ARRAY_SIZE(pwm_port_params)) in aspeed_create_fan()
870 aspeed_create_pwm_port(priv, (u8)pwm_port); in aspeed_create_fan()
875 ret = aspeed_create_pwm_cooling(dev, child, priv, pwm_port, in aspeed_create_fan()
893 ret = aspeed_create_fan_tach_channel(dev, priv, fan_tach_ch, count, pwm_port); in aspeed_create_fan()