linux/include/linux/mfd/tps6105x.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2011 ST-Ericsson SA
 * Written on behalf of Linaro for ST-Ericsson
 *
 * Author: Linus Walleij <[email protected]>
 */
#ifndef MFD_TPS6105X_H
#define MFD_TPS6105X_H

#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/regulator/machine.h>

/*
 * Register definitions to all subdrivers
 */
#define TPS6105X_REG_0
#define TPS6105X_REG0_MODE_SHIFT
#define TPS6105X_REG0_MODE_MASK
/* These defines for both reg0 and reg1 */
#define TPS6105X_REG0_MODE_SHUTDOWN
#define TPS6105X_REG0_MODE_TORCH
#define TPS6105X_REG0_MODE_TORCH_FLASH
#define TPS6105X_REG0_MODE_VOLTAGE
#define TPS6105X_REG0_VOLTAGE_SHIFT
#define TPS6105X_REG0_VOLTAGE_MASK
#define TPS6105X_REG0_VOLTAGE_450
#define TPS6105X_REG0_VOLTAGE_500
#define TPS6105X_REG0_VOLTAGE_525
#define TPS6105X_REG0_VOLTAGE_500_2
#define TPS6105X_REG0_DIMMING_SHIFT
#define TPS6105X_REG0_TORCHC_SHIFT
#define TPS6105X_REG0_TORCHC_MASK
#define TPS6105X_REG0_TORCHC_0
#define TPS6105X_REG0_TORCHC_50
#define TPS6105X_REG0_TORCHC_75
#define TPS6105X_REG0_TORCHC_100
#define TPS6105X_REG0_TORCHC_150
#define TPS6105X_REG0_TORCHC_200
#define TPS6105X_REG0_TORCHC_250_400
#define TPS6105X_REG0_TORCHC_250_500
#define TPS6105X_REG_1
#define TPS6105X_REG1_MODE_SHIFT
#define TPS6105X_REG1_MODE_MASK
#define TPS6105X_REG1_MODE_SHUTDOWN
#define TPS6105X_REG1_MODE_TORCH
#define TPS6105X_REG1_MODE_TORCH_FLASH
#define TPS6105X_REG1_MODE_VOLTAGE
#define TPS6105X_REG_2
#define TPS6105X_REG_3

/**
 * enum tps6105x_mode - desired mode for the TPS6105x
 * @TPS6105X_MODE_SHUTDOWN: this instance is inactive, not used for anything
 * @TPS61905X_MODE_TORCH: this instance is used as a LED, usually a while
 *	LED, for example as backlight or flashlight. If this is set, the
 *	TPS6105X will register to the LED framework
 * @TPS6105X_MODE_TORCH_FLASH: this instance is used as a flashgun, usually
 *	in a camera
 * @TPS6105X_MODE_VOLTAGE: this instance is used as a voltage regulator and
 *	will register to the regulator framework
 */
enum tps6105x_mode {};

/**
 * struct tps6105x_platform_data - TPS61905x platform data
 * @mode: what mode this instance shall be operated in,
 *	this is not selectable at runtime
 * @regulator_data: initialization data for the voltage
 *	regulator if used as a voltage source
 */
struct tps6105x_platform_data {};

/**
 * struct tps6105x - state holder for the TPS6105x drivers
 * @i2c_client: corresponding I2C client
 * @regulator: regulator device if used in voltage mode
 * @regmap: used for i2c communcation on accessing registers
 */
struct tps6105x {};

#endif