Lines Matching refs:ctx
37 struct syscon_reboot_context *ctx = in syscon_restart_handle() local
42 regmap_write(ctx->map, ctx->offset, ctx->mask); in syscon_restart_handle()
52 struct syscon_reboot_context *ctx; in syscon_reboot_probe() local
56 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in syscon_reboot_probe()
57 if (!ctx) 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()
67 if (of_property_read_u32(pdev->dev.of_node, "mask", &ctx->mask)) 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()