Lines Matching refs:misc_ctrl
334 struct aspeed_p2a_ctrl *misc_ctrl; in aspeed_p2a_ctrl_probe() local
342 misc_ctrl = devm_kzalloc(dev, sizeof(*misc_ctrl), GFP_KERNEL); in aspeed_p2a_ctrl_probe()
343 if (!misc_ctrl) in aspeed_p2a_ctrl_probe()
346 mutex_init(&misc_ctrl->tracking); in aspeed_p2a_ctrl_probe()
358 misc_ctrl->mem_size = resource_size(&resm); in aspeed_p2a_ctrl_probe()
359 misc_ctrl->mem_base = resm.start; in aspeed_p2a_ctrl_probe()
362 misc_ctrl->regmap = syscon_node_to_regmap(pdev->dev.parent->of_node); in aspeed_p2a_ctrl_probe()
363 if (IS_ERR(misc_ctrl->regmap)) { in aspeed_p2a_ctrl_probe()
368 misc_ctrl->config = of_device_get_match_data(dev); in aspeed_p2a_ctrl_probe()
370 dev_set_drvdata(&pdev->dev, misc_ctrl); in aspeed_p2a_ctrl_probe()
372 aspeed_p2a_disable_all(misc_ctrl); in aspeed_p2a_ctrl_probe()
374 misc_ctrl->miscdev.minor = MISC_DYNAMIC_MINOR; in aspeed_p2a_ctrl_probe()
375 misc_ctrl->miscdev.name = DEVICE_NAME; in aspeed_p2a_ctrl_probe()
376 misc_ctrl->miscdev.fops = &aspeed_p2a_ctrl_fops; in aspeed_p2a_ctrl_probe()
377 misc_ctrl->miscdev.parent = dev; in aspeed_p2a_ctrl_probe()
379 rc = misc_register(&misc_ctrl->miscdev); in aspeed_p2a_ctrl_probe()