linux/drivers/power/reset/linkstation-poweroff.c

// SPDX-License-Identifier: GPL-2.0
/*
 * LinkStation power off restart driver
 * Copyright (C) 2020 Daniel González Cabanelas <[email protected]>
 */

#include <linux/module.h>
#include <linux/notifier.h>
#include <linux/of.h>
#include <linux/of_mdio.h>
#include <linux/of_platform.h>
#include <linux/reboot.h>
#include <linux/phy.h>

/* Defines from the eth phy Marvell driver */
#define MII_MARVELL_COPPER_PAGE
#define MII_MARVELL_LED_PAGE
#define MII_MARVELL_WOL_PAGE
#define MII_MARVELL_PHY_PAGE

#define MII_PHY_LED_CTRL
#define MII_PHY_LED_POL_CTRL
#define MII_88E1318S_PHY_LED_TCR
#define MII_88E1318S_PHY_WOL_CTRL
#define MII_M1011_IEVENT

#define MII_88E1318S_PHY_LED_TCR_INTn_ENABLE
#define MII_88E1318S_PHY_LED_TCR_FORCE_INT
#define MII_88E1318S_PHY_WOL_CTRL_CLEAR_WOL_STATUS
#define LED2_FORCE_ON
#define LEDMASK

#define MII_88E1318S_PHY_LED_POL_LED2

struct power_off_cfg {};

static struct phy_device *phydev;
static const struct power_off_cfg *cfg;

static void linkstation_mvphy_reg_intn(bool restart)
{}

static void readynas_mvphy_set_reg(bool restart)
{}

static const struct power_off_cfg linkstation_power_off_cfg =;

static const struct power_off_cfg readynas_power_off_cfg =;

static int linkstation_reboot_notifier(struct notifier_block *nb,
				       unsigned long action, void *unused)
{}

static struct notifier_block linkstation_reboot_nb =;

static void linkstation_poweroff(void)
{}

static const struct of_device_id ls_poweroff_of_match[] =;

static int __init linkstation_poweroff_init(void)
{}

static void __exit linkstation_poweroff_exit(void)
{}

module_init();
module_exit(linkstation_poweroff_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();