linux/drivers/regulator/max77693-regulator.c

// SPDX-License-Identifier: GPL-2.0+
//
// max77693.c - Regulator driver for the Maxim 77693 and 77843
//
// Copyright (C) 2013-2015 Samsung Electronics
// Jonghwa Lee <[email protected]>
// Krzysztof Kozlowski <[email protected]>
//
// This driver is based on max77686.c

#include <linux/err.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/mfd/max77693.h>
#include <linux/mfd/max77693-common.h>
#include <linux/mfd/max77693-private.h>
#include <linux/mfd/max77843-private.h>
#include <linux/regulator/of_regulator.h>
#include <linux/regmap.h>

/*
 * ID for MAX77843 regulators.
 * There is no need for such for MAX77693.
 */
enum max77843_regulator_type {};

/* Register differences between chargers: MAX77693 and MAX77843 */
struct chg_reg_data {};

/*
 * MAX77693 CHARGER regulator - Min : 20mA, Max : 2580mA, step : 20mA
 * 0x00, 0x01, 0x2, 0x03	= 60 mA
 * 0x04 ~ 0x7E			= (60 + (X - 3) * 20) mA
 * Actually for MAX77693 the driver manipulates the maximum input current,
 * not the fast charge current (output). This should be fixed.
 *
 * On MAX77843 the calculation formula is the same (except values).
 * Fortunately it properly manipulates the fast charge current.
 */
static int max77693_chg_get_current_limit(struct regulator_dev *rdev)
{}

static int max77693_chg_set_current_limit(struct regulator_dev *rdev,
						int min_uA, int max_uA)
{}
/* end of CHARGER regulator ops */

/* Returns regmap suitable for given regulator on chosen device */
static struct regmap *max77693_get_regmap(enum max77693_types type,
					  struct max77693_dev *max77693,
					  int reg_id)
{}

static const unsigned int max77693_safeout_table[] =;

static const struct regulator_ops max77693_safeout_ops =;

static const struct regulator_ops max77693_charger_ops =;

#define max77693_regulator_desc_esafeout(_num)

static const struct regulator_desc max77693_supported_regulators[] =;

static const struct chg_reg_data max77693_chg_reg_data =;

#define max77843_regulator_desc_esafeout(num)

static const struct regulator_desc max77843_supported_regulators[] =;

static const struct chg_reg_data max77843_chg_reg_data =;

static int max77693_pmic_probe(struct platform_device *pdev)
{}

static const struct platform_device_id max77693_pmic_id[] =;

MODULE_DEVICE_TABLE(platform, max77693_pmic_id);

static struct platform_driver max77693_pmic_driver =;

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

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

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