Lines Matching refs:pon
31 struct pm8916_pon *pon = container_of in pm8916_reboot_mode_write() local
35 ret = regmap_update_bits(pon->regmap, in pm8916_reboot_mode_write()
36 pon->baseaddr + PON_SOFT_RB_SPARE, in pm8916_reboot_mode_write()
37 GENMASK(7, pon->reason_shift), in pm8916_reboot_mode_write()
38 magic << pon->reason_shift); in pm8916_reboot_mode_write()
40 dev_err(pon->dev, "update reboot mode bits failed\n"); in pm8916_reboot_mode_write()
47 struct pm8916_pon *pon; in pm8916_pon_probe() local
50 pon = devm_kzalloc(&pdev->dev, sizeof(*pon), GFP_KERNEL); in pm8916_pon_probe()
51 if (!pon) in pm8916_pon_probe()
54 pon->dev = &pdev->dev; in pm8916_pon_probe()
56 pon->regmap = dev_get_regmap(pdev->dev.parent, NULL); in pm8916_pon_probe()
57 if (!pon->regmap) { in pm8916_pon_probe()
63 &pon->baseaddr); in pm8916_pon_probe()
67 pon->reboot_mode.dev = &pdev->dev; in pm8916_pon_probe()
68 pon->reason_shift = (long)of_device_get_match_data(&pdev->dev); in pm8916_pon_probe()
69 pon->reboot_mode.write = pm8916_reboot_mode_write; in pm8916_pon_probe()
70 error = devm_reboot_mode_register(&pdev->dev, &pon->reboot_mode); in pm8916_pon_probe()
76 platform_set_drvdata(pdev, pon); in pm8916_pon_probe()