linux/drivers/regulator/da9062-regulator.c

// SPDX-License-Identifier: GPL-2.0+
//
// Regulator device driver for DA9061 and DA9062.
// Copyright (C) 2015-2017  Dialog Semiconductor

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/mfd/da9062/core.h>
#include <linux/mfd/da9062/registers.h>
#include <dt-bindings/regulator/dlg,da9063-regulator.h>

/* Regulator IDs */
enum {};

enum {};

/* Regulator capabilities and registers description */
struct da9062_regulator_info {};

/* Single regulator settings */
struct da9062_regulator {};

/* Encapsulates all information for the regulators driver */
struct da9062_regulators {};

/* Regulator operations */

/* Current limits array (in uA)
 * - DA9061_ID_[BUCK1|BUCK3]
 * - DA9062_ID_[BUCK1|BUCK2|BUCK4]
 * Entry indexes corresponds to register values.
 */
static const unsigned int da9062_buck_a_limits[] =;

/* Current limits array (in uA)
 * - DA9061_ID_BUCK2
 * - DA9062_ID_BUCK3
 * Entry indexes corresponds to register values.
 */
static const unsigned int da9062_buck_b_limits[] =;

static unsigned int da9062_map_buck_mode(unsigned int mode)
{}

static int da9062_buck_set_mode(struct regulator_dev *rdev, unsigned mode)
{}

/*
 * Bucks use single mode register field for normal operation
 * and suspend state.
 * There are 3 modes to map to: FAST, NORMAL, and STANDBY.
 */

static unsigned da9062_buck_get_mode(struct regulator_dev *rdev)
{}

/*
 * LDOs use sleep flags - one for normal and one for suspend state.
 * There are 2 modes to map to: NORMAL and STANDBY (sleep) for each state.
 */

static int da9062_ldo_set_mode(struct regulator_dev *rdev, unsigned mode)
{}

static unsigned da9062_ldo_get_mode(struct regulator_dev *rdev)
{}

static int da9062_buck_get_status(struct regulator_dev *rdev)
{}

static int da9062_ldo_get_status(struct regulator_dev *rdev)
{}

static int da9062_set_suspend_voltage(struct regulator_dev *rdev, int uv)
{}

static int da9062_suspend_enable(struct regulator_dev *rdev)
{}

static int da9062_suspend_disable(struct regulator_dev *rdev)
{}

static int da9062_buck_set_suspend_mode(struct regulator_dev *rdev,
					unsigned mode)
{}

static int da9062_ldo_set_suspend_mode(struct regulator_dev *rdev,
						unsigned mode)
{}

static const struct regulator_ops da9062_buck_ops =;

static const struct regulator_ops da9062_ldo_ops =;

/* DA9061 Regulator information */
static const struct da9062_regulator_info local_da9061_regulator_info[] =;

/* DA9062 Regulator information */
static const struct da9062_regulator_info local_da9062_regulator_info[] =;

/* Regulator interrupt handlers */
static irqreturn_t da9062_ldo_lim_event(int irq, void *data)
{}

static int da9062_regulator_probe(struct platform_device *pdev)
{}

static struct platform_driver da9062_regulator_driver =;

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

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

/* Module information */
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS();