Lines Matching +full:deep +full:- +full:sleep

1 // SPDX-License-Identifier: GPL-2.0+
31 /* S4-Deep Sleep Mode is NOT available for WALL/USB power */ in atc2603c_do_poweroff()
34 dev_info(pwrc->dev, "Enabling S4-Deep Sleep Mode"); in atc2603c_do_poweroff()
42 ret = regmap_update_bits(pwrc->regmap, ATC2603C_PMU_SYS_CTL0, in atc2603c_do_poweroff()
45 dev_warn(pwrc->dev, "failed to write SYS_CTL0: %d\n", ret); in atc2603c_do_poweroff()
50 ret = regmap_update_bits(pwrc->regmap, ATC2603C_PMU_SYS_CTL3, reg_mask, in atc2603c_do_poweroff()
53 dev_err(pwrc->dev, "failed to write SYS_CTL3: %d\n", ret); in atc2603c_do_poweroff()
62 ret = regmap_update_bits(pwrc->regmap, in atc2603c_do_poweroff()
66 dev_err(pwrc->dev, "failed to write SYS_CTL%d: %d\n", in atc2603c_do_poweroff()
82 /* S4-Deep Sleep Mode is NOT available for WALL/USB power */ in atc2609a_do_poweroff()
85 dev_info(pwrc->dev, "Enabling S4-Deep Sleep Mode"); in atc2609a_do_poweroff()
93 ret = regmap_update_bits(pwrc->regmap, ATC2609A_PMU_SYS_CTL0, in atc2609a_do_poweroff()
96 dev_warn(pwrc->dev, "failed to write SYS_CTL0: %d\n", ret); in atc2609a_do_poweroff()
101 ret = regmap_update_bits(pwrc->regmap, ATC2609A_PMU_SYS_CTL3, reg_mask, in atc2609a_do_poweroff()
104 dev_err(pwrc->dev, "failed to write SYS_CTL3: %d\n", ret); in atc2609a_do_poweroff()
113 ret = regmap_update_bits(pwrc->regmap, in atc2609a_do_poweroff()
117 dev_err(pwrc->dev, "failed to write SYS_CTL%d: %d\n", in atc2609a_do_poweroff()
136 ret = regmap_update_bits(pwrc->regmap, ATC2603C_PMU_SYS_CTL3, in atc2603c_init()
140 dev_warn(pwrc->dev, "failed to write SYS_CTL3: %d\n", ret); in atc2603c_init()
143 ret = regmap_update_bits(pwrc->regmap, ATC2603C_PMU_SYS_CTL0, in atc2603c_init()
148 dev_warn(pwrc->dev, "failed to write SYS_CTL0: %d\n", ret); in atc2603c_init()
158 ret = regmap_update_bits(pwrc->regmap, ATC2609A_PMU_SYS_CTL0, in atc2609a_init()
163 dev_warn(pwrc->dev, "failed to write SYS_CTL0: %d\n", ret); in atc2609a_init()
170 atc260x_pwrc_data->do_poweroff(atc260x_pwrc_data, false); in atc260x_pwrc_pm_handler()
180 pwrc->do_poweroff(pwrc, true); in atc260x_pwrc_restart_handler()
187 struct atc260x *atc260x = dev_get_drvdata(pdev->dev.parent); in atc260x_pwrc_probe()
191 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); in atc260x_pwrc_probe()
193 return -ENOMEM; in atc260x_pwrc_probe()
195 priv->dev = &pdev->dev; in atc260x_pwrc_probe()
196 priv->regmap = atc260x->regmap; in atc260x_pwrc_probe()
197 priv->restart_nb.notifier_call = atc260x_pwrc_restart_handler; in atc260x_pwrc_probe()
198 priv->restart_nb.priority = 192; in atc260x_pwrc_probe()
200 switch (atc260x->ic_type) { in atc260x_pwrc_probe()
202 priv->do_poweroff = atc2603c_do_poweroff; in atc260x_pwrc_probe()
206 priv->do_poweroff = atc2609a_do_poweroff; in atc260x_pwrc_probe()
210 dev_err(priv->dev, in atc260x_pwrc_probe()
212 atc260x->ic_type); in atc260x_pwrc_probe()
213 return -EINVAL; in atc260x_pwrc_probe()
225 dev_warn(priv->dev, "Poweroff callback already assigned\n"); in atc260x_pwrc_probe()
228 ret = register_restart_handler(&priv->restart_nb); in atc260x_pwrc_probe()
230 dev_err(priv->dev, "failed to register restart handler: %d\n", in atc260x_pwrc_probe()
245 unregister_restart_handler(&priv->restart_nb); in atc260x_pwrc_remove()
254 .name = "atc260x-pwrc",