linux/drivers/regulator/sy8106a-regulator.c

// SPDX-License-Identifier: GPL-2.0+
//
// sy8106a-regulator.c - Regulator device driver for SY8106A
//
// Copyright (C) 2016 Ondřej Jirman <[email protected]>
// Copyright (c) 2017-2018 Icenowy Zheng <[email protected]>

#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/of_regulator.h>

#define SY8106A_REG_VOUT1_SEL
#define SY8106A_REG_VOUT_COM
#define SY8106A_REG_VOUT1_SEL_MASK
#define SY8106A_DISABLE_REG
/*
 * The I2C controlled voltage will only work when this bit is set; otherwise
 * it will behave like a fixed regulator.
 */
#define SY8106A_GO_BIT

static const struct regmap_config sy8106a_regmap_config =;

static const struct regulator_ops sy8106a_ops =;

/* Default limits measured in millivolts */
#define SY8106A_MIN_MV
#define SY8106A_MAX_MV
#define SY8106A_STEP_MV

static const struct regulator_desc sy8106a_reg =;

/*
 * I2C driver interface functions
 */
static int sy8106a_i2c_probe(struct i2c_client *i2c)
{}

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

static const struct i2c_device_id sy8106a_i2c_id[] =;
MODULE_DEVICE_TABLE(i2c, sy8106a_i2c_id);

static struct i2c_driver sy8106a_regulator_driver =;

module_i2c_driver();

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