Lines Matching +full:deep +full:- +full:sleep
1 // SPDX-License-Identifier: GPL-2.0+
27 /* S4-Deep Sleep Mode is NOT available for WALL/USB power */ in atc2603c_do_poweroff()
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()
78 /* S4-Deep Sleep Mode is NOT available for WALL/USB power */ in atc2609a_do_poweroff()
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()
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()
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()
168 pwrc->do_poweroff(pwrc, false); in atc260x_pwrc_pm_handler()
177 struct atc260x_pwrc *pwrc = data->cb_data; in atc260x_pwrc_restart_handler()
178 pwrc->do_poweroff(pwrc, true); in atc260x_pwrc_restart_handler()
185 struct atc260x *atc260x = dev_get_drvdata(pdev->dev.parent); in atc260x_pwrc_probe()
189 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); in atc260x_pwrc_probe()
191 return -ENOMEM; in atc260x_pwrc_probe()
193 priv->dev = &pdev->dev; in atc260x_pwrc_probe()
194 priv->regmap = atc260x->regmap; in atc260x_pwrc_probe()
196 switch (atc260x->ic_type) { in atc260x_pwrc_probe()
198 priv->do_poweroff = atc2603c_do_poweroff; in atc260x_pwrc_probe()
202 priv->do_poweroff = atc2609a_do_poweroff; in atc260x_pwrc_probe()
206 dev_err(priv->dev, in atc260x_pwrc_probe()
208 atc260x->ic_type); in atc260x_pwrc_probe()
209 return -EINVAL; in atc260x_pwrc_probe()
215 ret = devm_register_sys_off_handler(priv->dev, in atc260x_pwrc_probe()
221 dev_err(priv->dev, "failed to register power-off handler: %d\n", in atc260x_pwrc_probe()
224 ret = devm_register_sys_off_handler(priv->dev, in atc260x_pwrc_probe()
230 dev_err(priv->dev, "failed to register restart handler: %d\n", in atc260x_pwrc_probe()
239 .name = "atc260x-pwrc",