Lines Matching full:pwrc

19 	int (*do_poweroff)(const struct atc260x_pwrc *pwrc, bool restart);
22 static int atc2603c_do_poweroff(const struct atc260x_pwrc *pwrc, bool restart) in atc2603c_do_poweroff() argument
30 dev_info(pwrc->dev, "Enabling S4-Deep Sleep Mode"); in atc2603c_do_poweroff()
38 ret = regmap_update_bits(pwrc->regmap, ATC2603C_PMU_SYS_CTL0, in atc2603c_do_poweroff()
41 dev_warn(pwrc->dev, "failed to write SYS_CTL0: %d\n", ret); in atc2603c_do_poweroff()
46 ret = regmap_update_bits(pwrc->regmap, ATC2603C_PMU_SYS_CTL3, reg_mask, in atc2603c_do_poweroff()
49 dev_err(pwrc->dev, "failed to write SYS_CTL3: %d\n", ret); in atc2603c_do_poweroff()
58 ret = regmap_update_bits(pwrc->regmap, in atc2603c_do_poweroff()
62 dev_err(pwrc->dev, "failed to write SYS_CTL%d: %d\n", in atc2603c_do_poweroff()
73 static int atc2609a_do_poweroff(const struct atc260x_pwrc *pwrc, bool restart) in atc2609a_do_poweroff() argument
81 dev_info(pwrc->dev, "Enabling S4-Deep Sleep Mode"); in atc2609a_do_poweroff()
89 ret = regmap_update_bits(pwrc->regmap, ATC2609A_PMU_SYS_CTL0, in atc2609a_do_poweroff()
92 dev_warn(pwrc->dev, "failed to write SYS_CTL0: %d\n", ret); in atc2609a_do_poweroff()
97 ret = regmap_update_bits(pwrc->regmap, ATC2609A_PMU_SYS_CTL3, reg_mask, in atc2609a_do_poweroff()
100 dev_err(pwrc->dev, "failed to write SYS_CTL3: %d\n", ret); in atc2609a_do_poweroff()
109 ret = regmap_update_bits(pwrc->regmap, in atc2609a_do_poweroff()
113 dev_err(pwrc->dev, "failed to write SYS_CTL%d: %d\n", in atc2609a_do_poweroff()
124 static int atc2603c_init(const struct atc260x_pwrc *pwrc) in atc2603c_init() argument
132 ret = regmap_update_bits(pwrc->regmap, ATC2603C_PMU_SYS_CTL3, in atc2603c_init()
136 dev_warn(pwrc->dev, "failed to write SYS_CTL3: %d\n", ret); in atc2603c_init()
139 ret = regmap_update_bits(pwrc->regmap, ATC2603C_PMU_SYS_CTL0, in atc2603c_init()
144 dev_warn(pwrc->dev, "failed to write SYS_CTL0: %d\n", ret); in atc2603c_init()
149 static int atc2609a_init(const struct atc260x_pwrc *pwrc) in atc2609a_init() argument
154 ret = regmap_update_bits(pwrc->regmap, ATC2609A_PMU_SYS_CTL0, in atc2609a_init()
159 dev_warn(pwrc->dev, "failed to write SYS_CTL0: %d\n", ret); in atc2609a_init()
166 struct atc260x_pwrc *pwrc = data->cb_data; in atc260x_pwrc_pm_handler() local
168 pwrc->do_poweroff(pwrc, false); in atc260x_pwrc_pm_handler()
177 struct atc260x_pwrc *pwrc = data->cb_data; in atc260x_pwrc_restart_handler() local
178 pwrc->do_poweroff(pwrc, true); in atc260x_pwrc_restart_handler()
239 .name = "atc260x-pwrc",