#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/of_irq.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/regulator/consumer.h>
#include <linux/spinlock.h>
#include "arche_platform.h"
static void apb_bootret_deassert(struct device *dev);
struct arche_apb_ctrl_drvdata { … };
static inline void deassert_reset(struct gpio_desc *gpio)
{ … }
static inline void assert_reset(struct gpio_desc *gpio)
{ … }
static int coldboot_seq(struct platform_device *pdev)
{ … }
static int fw_flashing_seq(struct platform_device *pdev)
{ … }
static int standby_boot_seq(struct platform_device *pdev)
{ … }
static void poweroff_seq(struct platform_device *pdev)
{ … }
static void apb_bootret_deassert(struct device *dev)
{ … }
int apb_ctrl_coldboot(struct device *dev)
{ … }
int apb_ctrl_fw_flashing(struct device *dev)
{ … }
int apb_ctrl_standby_boot(struct device *dev)
{ … }
void apb_ctrl_poweroff(struct device *dev)
{ … }
static ssize_t state_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t state_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RW(state);
static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
struct arche_apb_ctrl_drvdata *apb)
{ … }
static int arche_apb_ctrl_probe(struct platform_device *pdev)
{ … }
static void arche_apb_ctrl_remove(struct platform_device *pdev)
{ … }
static int __maybe_unused arche_apb_ctrl_suspend(struct device *dev)
{ … }
static int __maybe_unused arche_apb_ctrl_resume(struct device *dev)
{ … }
static void arche_apb_ctrl_shutdown(struct platform_device *pdev)
{ … }
static SIMPLE_DEV_PM_OPS(arche_apb_ctrl_pm_ops, arche_apb_ctrl_suspend,
arche_apb_ctrl_resume);
static const struct of_device_id arche_apb_ctrl_of_match[] = …;
MODULE_DEVICE_TABLE(of, arche_apb_ctrl_of_match);
static struct platform_driver arche_apb_ctrl_device_driver = …;
int __init arche_apb_init(void)
{ … }
void __exit arche_apb_exit(void)
{ … }