linux/drivers/regulator/max5970-regulator.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Device driver for regulators in MAX5970 and MAX5978 IC
 *
 * Copyright (c) 2022 9elements GmbH
 *
 * Author: Patrick Rudolph <[email protected]>
 */

#include <linux/bitops.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/hwmon.h>
#include <linux/module.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/platform_device.h>

#include <linux/mfd/max5970.h>

struct max5970_regulator {};

enum max597x_regulator_id {};

static int max5970_read_adc(struct regmap *regmap, int reg, long *val)
{}

static int max5970_read(struct device *dev, enum hwmon_sensor_types type,
			u32 attr, int channel, long *val)
{}

static umode_t max5970_is_visible(const void *data,
				  enum hwmon_sensor_types type,
				  u32 attr, int channel)
{}

static const struct hwmon_ops max5970_hwmon_ops =;

static const struct hwmon_channel_info *max5970_info[] =;

static const struct hwmon_chip_info max5970_chip_info =;

static int max597x_uvp_ovp_check_mode(struct regulator_dev *rdev, int severity)
{}

static int max597x_set_vp(struct regulator_dev *rdev, int lim_uV, int severity,
			  bool enable, bool overvoltage)
{}

static int max597x_set_uvp(struct regulator_dev *rdev, int lim_uV, int severity,
			   bool enable)
{}

static int max597x_set_ovp(struct regulator_dev *rdev, int lim_uV, int severity,
			   bool enable)
{}

static int max597x_set_ocp(struct regulator_dev *rdev, int lim_uA,
			   int severity, bool enable)
{}

static int max597x_get_status(struct regulator_dev *rdev)
{}

static const struct regulator_ops max597x_switch_ops =;

static int max597x_dt_parse(struct device_node *np,
			    const struct regulator_desc *desc,
			    struct regulator_config *cfg)
{}

#define MAX597X_SWITCH(_ID, _ereg, _chan, _supply)

static const struct regulator_desc regulators[] =;

static int max597x_regmap_read_clear(struct regmap *map, unsigned int reg,
				     unsigned int *val)
{}

static int max597x_irq_handler(int irq, struct regulator_irq_data *rid,
			       unsigned long *dev_mask)
{}

static int max597x_adc_range(struct regmap *regmap, const int ch,
			     u32 *irng, u32 *mon_rng)
{}

static int max597x_setup_irq(struct device *dev,
			     int irq,
			     struct regulator_dev *rdevs[MAX5970_NUM_SWITCHES],
			     int num_switches, struct max5970_regulator *data)
{}

static int max597x_regulator_probe(struct platform_device *pdev)
{}

static struct platform_driver max597x_regulator_driver =;

module_platform_driver();


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