Lines Matching refs:pdev
59 * @pdev: pointer to the platform device structure of mbigen chip.
63 struct platform_device *pdev;
235 static int mbigen_of_create_domain(struct platform_device *pdev,
244 for_each_child_of_node(pdev->dev.of_node, np) {
256 dev_err(&pdev->dev, "No num-pins property\n");
284 static int mbigen_acpi_create_domain(struct platform_device *pdev,
314 ret = device_property_read_u32(&pdev->dev, "num-pins", &num_pins);
318 domain = platform_msi_create_device_domain(&pdev->dev, num_pins,
328 static inline int mbigen_acpi_create_domain(struct platform_device *pdev,
335 static int mbigen_device_probe(struct platform_device *pdev)
341 mgn_chip = devm_kzalloc(&pdev->dev, sizeof(*mgn_chip), GFP_KERNEL);
345 mgn_chip->pdev = pdev;
347 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
351 mgn_chip->base = devm_ioremap(&pdev->dev, res->start,
354 dev_err(&pdev->dev, "failed to ioremap %pR\n", res);
358 if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node)
359 err = mbigen_of_create_domain(pdev, mgn_chip);
360 else if (ACPI_COMPANION(&pdev->dev))
361 err = mbigen_acpi_create_domain(pdev, mgn_chip);
366 dev_err(&pdev->dev, "Failed to create mbi-gen irqdomain\n");
370 platform_set_drvdata(pdev, mgn_chip);