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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Toggles a GPIO pin to power down a device
 *
 * Jamie Lentin <[email protected]>
 * Andrew Lunn <[email protected]>
 *
 * Copyright (C) 2012 Jamie Lentin
 */
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/gpio/consumer.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/reboot.h>

#define DEFAULT_TIMEOUT_MS

struct gpio_poweroff {};

static int gpio_poweroff_do_poweroff(struct sys_off_data *data)
{}

static int gpio_poweroff_probe(struct platform_device *pdev)
{}

static const struct of_device_id of_gpio_poweroff_match[] =;
MODULE_DEVICE_TABLE(of, of_gpio_poweroff_match);

static struct platform_driver gpio_poweroff_driver =;

module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_ALIAS();