gpio_set_value(gpio, 0);
}
-/* Export gpio's to user space */
-static void export_gpios(struct arche_apb_ctrl_drvdata *apb)
-{
- gpio_export(apb->resetn_gpio, false);
-}
-
-static void unexport_gpios(struct arche_apb_ctrl_drvdata *apb)
-{
- gpio_unexport(apb->resetn_gpio);
-}
-
/*
* Note: Please do not modify the below sequence, as it is as per the spec
*/
return ret;
}
- export_gpios(apb);
-
dev_info(&pdev->dev, "Device registered successfully\n");
return 0;
}
int arche_apb_ctrl_remove(struct platform_device *pdev)
{
- struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
-
device_remove_file(&pdev->dev, &dev_attr_state);
poweroff_seq(pdev);
platform_set_drvdata(pdev, NULL);
- unexport_gpios(apb);
return 0;
}