Lines Matching full:pwrc
27 struct mt6323_pwrc *pwrc = data->cb_data; in mt6323_do_pwroff() local
31 regmap_write(pwrc->regmap, pwrc->base + RTC_BBPU, RTC_BBPU_KEY); in mt6323_do_pwroff()
32 regmap_write(pwrc->regmap, pwrc->base + RTC_WRTGR_MT6323, 1); in mt6323_do_pwroff()
34 ret = regmap_read_poll_timeout(pwrc->regmap, in mt6323_do_pwroff()
35 pwrc->base + RTC_BBPU, val, in mt6323_do_pwroff()
40 dev_err(pwrc->dev, "failed to write BBPU: %d\n", ret); in mt6323_do_pwroff()
53 struct mt6323_pwrc *pwrc; in mt6323_pwrc_probe() local
57 pwrc = devm_kzalloc(&pdev->dev, sizeof(*pwrc), GFP_KERNEL); in mt6323_pwrc_probe()
58 if (!pwrc) in mt6323_pwrc_probe()
65 pwrc->base = res->start; in mt6323_pwrc_probe()
66 pwrc->regmap = mt6397_chip->regmap; in mt6323_pwrc_probe()
67 pwrc->dev = &pdev->dev; in mt6323_pwrc_probe()
69 ret = devm_register_sys_off_handler(pwrc->dev, in mt6323_pwrc_probe()
73 pwrc); in mt6323_pwrc_probe()
75 return dev_err_probe(pwrc->dev, ret, "failed to register power-off handler\n"); in mt6323_pwrc_probe()
81 { .compatible = "mediatek,mt6323-pwrc" },
89 .name = "mt6323-pwrc",