Lines Matching defs:regmap
17 #include <linux/regmap.h>
180 struct regmap *regmap;
375 static void aspeed_set_clock_enable(struct regmap *regmap, bool val)
377 regmap_update_bits(regmap, ASPEED_PTCR_CTRL,
382 static void aspeed_set_clock_source(struct regmap *regmap, int val)
384 regmap_update_bits(regmap, ASPEED_PTCR_CTRL,
389 static void aspeed_set_pwm_clock_values(struct regmap *regmap, u8 type,
396 regmap_update_bits(regmap, type_params[type].clk_ctrl_reg,
400 static void aspeed_set_pwm_port_enable(struct regmap *regmap, u8 pwm_port,
403 regmap_update_bits(regmap, pwm_port_params[pwm_port].ctrl_reg,
408 static void aspeed_set_pwm_port_type(struct regmap *regmap,
415 regmap_update_bits(regmap, pwm_port_params[pwm_port].ctrl_reg,
419 static void aspeed_set_pwm_port_duty_rising_falling(struct regmap *regmap,
428 regmap_update_bits(regmap, pwm_port_params[pwm_port].duty_ctrl_reg,
433 static void aspeed_set_tacho_type_enable(struct regmap *regmap, u8 type,
436 regmap_update_bits(regmap, type_params[type].ctrl_reg,
441 static void aspeed_set_tacho_type_values(struct regmap *regmap, u8 type,
448 regmap_update_bits(regmap, type_params[type].ctrl_reg,
450 regmap_update_bits(regmap, type_params[type].ctrl_reg1,
454 static void aspeed_set_fan_tach_ch_enable(struct regmap *regmap, u8 fan_tach_ch,
457 regmap_update_bits(regmap, ASPEED_PTCR_CTRL,
463 static void aspeed_set_fan_tach_ch_source(struct regmap *regmap, u8 fan_tach_ch,
471 regmap_update_bits(regmap, ASPEED_PTCR_TACH_SOURCE,
475 regmap_update_bits(regmap, ASPEED_PTCR_TACH_SOURCE_EXT,
490 aspeed_set_pwm_port_enable(priv->regmap, index, false);
495 aspeed_set_pwm_port_duty_rising_falling(priv->regmap, index, 0,
497 aspeed_set_pwm_port_enable(priv->regmap, index, true);
534 regmap_write(priv->regmap, ASPEED_PTCR_TRIGGER, 0);
535 regmap_write(priv->regmap, ASPEED_PTCR_TRIGGER, 0x1 << fan_tach_ch);
544 priv->regmap,
723 aspeed_set_pwm_clock_values(priv->regmap, TYPEM, M_PWM_DIV_H,
725 aspeed_set_tacho_type_enable(priv->regmap, TYPEM, true);
729 aspeed_set_tacho_type_values(priv->regmap, TYPEM, M_TACH_MODE,
736 aspeed_set_pwm_port_enable(priv->regmap, pwm_port, true);
740 aspeed_set_pwm_port_type(priv->regmap, pwm_port, TYPEM);
755 aspeed_set_fan_tach_ch_enable(priv->regmap, index, true);
758 aspeed_set_fan_tach_ch_source(priv->regmap, index, pwm_source);
913 priv->regmap = devm_regmap_init(dev, NULL, (__force void *)regs,
915 if (IS_ERR(priv->regmap))
916 return PTR_ERR(priv->regmap);
930 regmap_write(priv->regmap, ASPEED_PTCR_TACH_SOURCE, 0);
931 regmap_write(priv->regmap, ASPEED_PTCR_TACH_SOURCE_EXT, 0);
937 aspeed_set_clock_enable(priv->regmap, true);
938 aspeed_set_clock_source(priv->regmap, 0);