linux/drivers/regulator/rt5739.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Device driver for RT5739 regulator
 *
 * Copyright (C) 2023 Richtek Technology Corp.
 *
 * Author: ChiYuan Huang <[email protected]>
 */

#include <linux/bits.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/of_regulator.h>

#define RT5739_AUTO_MODE
#define RT5739_FPWM_MODE

#define RT5739_REG_NSEL0
#define RT5739_REG_NSEL1
#define RT5739_REG_CNTL1
#define RT5739_REG_ID1
#define RT5739_REG_CNTL2
#define RT5739_REG_CNTL4

#define RT5739_VSEL_MASK
#define RT5739_MODEVSEL1_MASK
#define RT5739_MODEVSEL0_MASK
#define RT5739_VID_MASK
#define RT5739_DID_MASK
#define RT5739_ACTD_MASK
#define RT5739_ENVSEL1_MASK
#define RT5739_ENVSEL0_MASK

#define RT5733_CHIPDIE_ID
#define RT5733_VOLT_MINUV
#define RT5733_VOLT_MAXUV
#define RT5733_VOLT_STPUV
#define RT5733_N_VOLTS

#define RT5739_VOLT_MINUV
#define RT5739_VOLT_MAXUV
#define RT5739_VOLT_STPUV
#define RT5739_N_VOLTS
#define RT5739_I2CRDY_TIMEUS

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

static unsigned int rt5739_get_mode(struct regulator_dev *rdev)
{}

static int rt5739_set_suspend_voltage(struct regulator_dev *rdev, int uV)
{}

static int rt5739_set_suspend_enable(struct regulator_dev *rdev)
{}

static int rt5739_set_suspend_disable(struct regulator_dev *rdev)
{}

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

static const struct regulator_ops rt5739_regulator_ops =;

static unsigned int rt5739_of_map_mode(unsigned int mode)
{}

static void rt5739_init_regulator_desc(struct regulator_desc *desc,
				       bool vsel_active_high, u8 did)
{}

static const struct regmap_config rt5739_regmap_config =;

static int rt5739_probe(struct i2c_client *i2c)
{}

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

static struct i2c_driver rt5739_driver =;
module_i2c_driver();

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