linux/drivers/mfd/wm831x-core.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * wm831x-core.c  --  Device access for Wolfson WM831x PMICs
 *
 * Copyright 2009 Wolfson Microelectronics PLC.
 *
 * Author: Mark Brown <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/export.h>
#include <linux/bcd.h>
#include <linux/delay.h>
#include <linux/mfd/core.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/mod_devicetable.h>

#include <linux/mfd/wm831x/core.h>
#include <linux/mfd/wm831x/pdata.h>
#include <linux/mfd/wm831x/irq.h>
#include <linux/mfd/wm831x/auxadc.h>
#include <linux/mfd/wm831x/otp.h>
#include <linux/mfd/wm831x/pmu.h>
#include <linux/mfd/wm831x/regulator.h>

/* Current settings - values are 2*2^(reg_val/4) microamps.  These are
 * exported since they are used by multiple drivers.
 */
const unsigned int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL + 1] =;
EXPORT_SYMBOL_GPL();

static int wm831x_reg_locked(struct wm831x *wm831x, unsigned short reg)
{}

/**
 * wm831x_reg_lock: Unlock user keyed registers
 *
 * The WM831x has a user key preventing writes to particularly
 * critical registers.  This function locks those registers,
 * allowing writes to them.
 *
 * @wm831x: pointer to local driver data structure
 */
void wm831x_reg_lock(struct wm831x *wm831x)
{}
EXPORT_SYMBOL_GPL();

/**
 * wm831x_reg_unlock: Unlock user keyed registers
 *
 * The WM831x has a user key preventing writes to particularly
 * critical registers.  This function locks those registers,
 * preventing spurious writes.
 *
 * @wm831x: pointer to local driver data structure
 */
int wm831x_reg_unlock(struct wm831x *wm831x)
{}
EXPORT_SYMBOL_GPL();

static bool wm831x_reg_readable(struct device *dev, unsigned int reg)
{}

static bool wm831x_reg_writeable(struct device *dev, unsigned int reg)
{}

static bool wm831x_reg_volatile(struct device *dev, unsigned int reg)
{}

/**
 * wm831x_reg_read: Read a single WM831x register.
 *
 * @wm831x: Device to read from.
 * @reg: Register to read.
 */
int wm831x_reg_read(struct wm831x *wm831x, unsigned short reg)
{}
EXPORT_SYMBOL_GPL();

/**
 * wm831x_bulk_read: Read multiple WM831x registers
 *
 * @wm831x: Device to read from
 * @reg: First register
 * @count: Number of registers
 * @buf: Buffer to fill.
 */
int wm831x_bulk_read(struct wm831x *wm831x, unsigned short reg,
		     int count, u16 *buf)
{}
EXPORT_SYMBOL_GPL();

static int wm831x_write(struct wm831x *wm831x, unsigned short reg,
			int bytes, void *src)
{}

/**
 * wm831x_reg_write: Write a single WM831x register.
 *
 * @wm831x: Device to write to.
 * @reg: Register to write to.
 * @val: Value to write.
 */
int wm831x_reg_write(struct wm831x *wm831x, unsigned short reg,
		     unsigned short val)
{}
EXPORT_SYMBOL_GPL();

/**
 * wm831x_set_bits: Set the value of a bitfield in a WM831x register
 *
 * @wm831x: Device to write to.
 * @reg: Register to write to.
 * @mask: Mask of bits to set.
 * @val: Value to set (unshifted)
 */
int wm831x_set_bits(struct wm831x *wm831x, unsigned short reg,
		    unsigned short mask, unsigned short val)
{}
EXPORT_SYMBOL_GPL();

static const struct resource wm831x_dcdc1_resources[] =;


static const struct resource wm831x_dcdc2_resources[] =;

static const struct resource wm831x_dcdc3_resources[] =;

static const struct resource wm831x_dcdc4_resources[] =;

static const struct resource wm8320_dcdc4_buck_resources[] =;

static const struct resource wm831x_gpio_resources[] =;

static const struct resource wm831x_isink1_resources[] =;

static const struct resource wm831x_isink2_resources[] =;

static const struct resource wm831x_ldo1_resources[] =;

static const struct resource wm831x_ldo2_resources[] =;

static const struct resource wm831x_ldo3_resources[] =;

static const struct resource wm831x_ldo4_resources[] =;

static const struct resource wm831x_ldo5_resources[] =;

static const struct resource wm831x_ldo6_resources[] =;

static const struct resource wm831x_ldo7_resources[] =;

static const struct resource wm831x_ldo8_resources[] =;

static const struct resource wm831x_ldo9_resources[] =;

static const struct resource wm831x_ldo10_resources[] =;

static const struct resource wm831x_ldo11_resources[] =;

static const struct resource wm831x_on_resources[] =;


static const struct resource wm831x_power_resources[] =;

static const struct resource wm831x_rtc_resources[] =;

static const struct resource wm831x_status1_resources[] =;

static const struct resource wm831x_status2_resources[] =;

static const struct resource wm831x_touch_resources[] =;

static const struct resource wm831x_wdt_resources[] =;

static const struct mfd_cell wm8310_devs[] =;

static const struct mfd_cell wm8311_devs[] =;

static const struct mfd_cell wm8312_devs[] =;

static const struct mfd_cell wm8320_devs[] =;

static const struct mfd_cell touch_devs[] =;

static const struct mfd_cell rtc_devs[] =;

static const struct mfd_cell backlight_devs[] =;

struct regmap_config wm831x_regmap_config =;
EXPORT_SYMBOL_GPL();

const struct of_device_id wm831x_of_match[] =;
EXPORT_SYMBOL_GPL();

/*
 * Instantiate the generic non-control parts of the device.
 */
int wm831x_device_init(struct wm831x *wm831x, int irq)
{}

int wm831x_device_suspend(struct wm831x *wm831x)
{}

void wm831x_device_shutdown(struct wm831x *wm831x)
{}
EXPORT_SYMBOL_GPL();