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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Force-disables a regulator to power down a device
 *
 * Michael Klein <[email protected]>
 *
 * Copyright (C) 2020 Michael Klein
 *
 * Based on the gpio-poweroff driver.
 */
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/reboot.h>
#include <linux/regulator/consumer.h>

#define TIMEOUT_MS

static int regulator_poweroff_do_poweroff(struct sys_off_data *data)
{}

static int regulator_poweroff_probe(struct platform_device *pdev)
{}

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

static struct platform_driver regulator_poweroff_driver =;

module_platform_driver();

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