linux/drivers/regulator/fixed.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * fixed.c
 *
 * Copyright 2008 Wolfson Microelectronics PLC.
 *
 * Author: Mark Brown <[email protected]>
 *
 * Copyright (c) 2009 Nokia Corporation
 * Roger Quadros <[email protected]>
 *
 * This is useful for systems with mixed controllable and
 * non-controllable regulators, as well as for allowing testing on
 * systems with no controllable regulators.
 */

#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/pm_opp.h>
#include <linux/reboot.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/fixed.h>
#include <linux/gpio/consumer.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/regulator/of_regulator.h>
#include <linux/regulator/machine.h>
#include <linux/clk.h>

/* Default time in millisecond to wait for emergency shutdown */
#define FV_DEF_EMERG_SHUTDWN_TMO

struct fixed_voltage_data {};

struct fixed_dev_type {};

static int reg_clock_enable(struct regulator_dev *rdev)
{}

static int reg_clock_disable(struct regulator_dev *rdev)
{}

static int reg_domain_enable(struct regulator_dev *rdev)
{}

static int reg_domain_disable(struct regulator_dev *rdev)
{}

static int reg_is_enabled(struct regulator_dev *rdev)
{}

static irqreturn_t reg_fixed_under_voltage_irq_handler(int irq, void *data)
{}

/**
 * reg_fixed_get_irqs - Get and register the optional IRQ for fixed voltage
 *                      regulator.
 * @dev: Pointer to the device structure.
 * @priv: Pointer to fixed_voltage_data structure containing private data.
 *
 * This function tries to get the IRQ from the device firmware node.
 * If it's an optional IRQ and not found, it returns 0.
 * Otherwise, it attempts to request the threaded IRQ.
 *
 * Return: 0 on success, or error code on failure.
 */
static int reg_fixed_get_irqs(struct device *dev,
			      struct fixed_voltage_data *priv)
{}

/**
 * of_get_fixed_voltage_config - extract fixed_voltage_config structure info
 * @dev: device requesting for fixed_voltage_config
 * @desc: regulator description
 *
 * Populates fixed_voltage_config structure by extracting data from device
 * tree node, returns a pointer to the populated structure of NULL if memory
 * alloc fails.
 */
static struct fixed_voltage_config *
of_get_fixed_voltage_config(struct device *dev,
			    const struct regulator_desc *desc)
{}

static const struct regulator_ops fixed_voltage_ops =;

static const struct regulator_ops fixed_voltage_clkenabled_ops =;

static const struct regulator_ops fixed_voltage_domain_ops =;

static int reg_fixed_voltage_probe(struct platform_device *pdev)
{}

#if defined(CONFIG_OF)
static const struct fixed_dev_type fixed_voltage_data =;

static const struct fixed_dev_type fixed_clkenable_data =;

static const struct fixed_dev_type fixed_domain_data =;

static const struct of_device_id fixed_of_match[] =;
MODULE_DEVICE_TABLE(of, fixed_of_match);
#endif

static struct platform_driver regulator_fixed_voltage_driver =;

static int __init regulator_fixed_voltage_init(void)
{}
subsys_initcall(regulator_fixed_voltage_init);

static void __exit regulator_fixed_voltage_exit(void)
{}
module_exit(regulator_fixed_voltage_exit);

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