Lines Matching refs:pdev

66 static int coldboot_seq(struct platform_device *pdev)
68 struct device *dev = &pdev->dev;
69 struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
115 static int fw_flashing_seq(struct platform_device *pdev)
117 struct device *dev = &pdev->dev;
118 struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
161 static int standby_boot_seq(struct platform_device *pdev)
163 struct device *dev = &pdev->dev;
164 struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
193 static void poweroff_seq(struct platform_device *pdev)
195 struct device *dev = &pdev->dev;
196 struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
252 struct platform_device *pdev = to_platform_device(dev);
253 struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
261 poweroff_seq(pdev);
266 poweroff_seq(pdev);
269 ret = coldboot_seq(pdev);
276 ret = standby_boot_seq(pdev);
285 poweroff_seq(pdev);
286 ret = fw_flashing_seq(pdev);
317 static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
320 struct device *dev = &pdev->dev;
369 apb->pinctrl = devm_pinctrl_get(&pdev->dev);
371 dev_err(&pdev->dev, "could not get pinctrl handle\n");
376 dev_err(&pdev->dev, "could not get default pin state\n");
381 if (of_property_read_bool(pdev->dev.of_node, "gb,spi-en-active-high"))
387 static int arche_apb_ctrl_probe(struct platform_device *pdev)
391 struct device *dev = &pdev->dev;
393 apb = devm_kzalloc(&pdev->dev, sizeof(*apb), GFP_KERNEL);
397 ret = apb_ctrl_get_devtree_data(pdev, apb);
406 if (of_property_read_bool(pdev->dev.of_node, "arche,init-disable"))
409 platform_set_drvdata(pdev, apb);
418 dev_info(&pdev->dev, "Device registered successfully\n");
422 static void arche_apb_ctrl_remove(struct platform_device *pdev)
424 device_remove_file(&pdev->dev, &dev_attr_state);
425 poweroff_seq(pdev);
426 platform_set_drvdata(pdev, NULL);
457 static void arche_apb_ctrl_shutdown(struct platform_device *pdev)
459 apb_ctrl_poweroff(&pdev->dev);