Lines Matching +full:reboot +full:- +full:offset
2 * Generic Syscon Reboot Driver
24 #include <linux/reboot.h>
29 u32 offset; member
41 /* Issue the reboot */ in syscon_restart_handle()
42 regmap_write(ctx->map, ctx->offset, ctx->mask); in syscon_restart_handle()
53 struct device *dev = &pdev->dev; in syscon_reboot_probe()
56 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in syscon_reboot_probe()
58 return -ENOMEM; in syscon_reboot_probe()
60 ctx->map = syscon_regmap_lookup_by_phandle(dev->of_node, "regmap"); in syscon_reboot_probe()
61 if (IS_ERR(ctx->map)) in syscon_reboot_probe()
62 return PTR_ERR(ctx->map); in syscon_reboot_probe()
64 if (of_property_read_u32(pdev->dev.of_node, "offset", &ctx->offset)) in syscon_reboot_probe()
65 return -EINVAL; in syscon_reboot_probe()
67 if (of_property_read_u32(pdev->dev.of_node, "mask", &ctx->mask)) in syscon_reboot_probe()
68 return -EINVAL; in syscon_reboot_probe()
70 ctx->restart_handler.notifier_call = syscon_restart_handle; in syscon_reboot_probe()
71 ctx->restart_handler.priority = 192; in syscon_reboot_probe()
72 err = register_restart_handler(&ctx->restart_handler); in syscon_reboot_probe()
80 { .compatible = "syscon-reboot" },
87 .name = "syscon-reboot",