linux/drivers/mfd/wm8350-core.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * wm8350-core.c  --  Device access for Wolfson WM8350
 *
 * Copyright 2007, 2008 Wolfson Microelectronics PLC.
 *
 * Author: Liam Girdwood, Mark Brown
 */

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/bug.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/regmap.h>
#include <linux/workqueue.h>

#include <linux/mfd/wm8350/core.h>
#include <linux/mfd/wm8350/audio.h>
#include <linux/mfd/wm8350/comparator.h>
#include <linux/mfd/wm8350/gpio.h>
#include <linux/mfd/wm8350/pmic.h>
#include <linux/mfd/wm8350/rtc.h>
#include <linux/mfd/wm8350/supply.h>
#include <linux/mfd/wm8350/wdt.h>

#define WM8350_CLOCK_CONTROL_1
#define WM8350_AIF_TEST

/* debug */
#define WM8350_BUS_DEBUG
#if WM8350_BUS_DEBUG
#define dump
#else
#define dump(bytes, src)
#endif

#define WM8350_LOCK_DEBUG
#if WM8350_LOCK_DEBUG
#define ldbg
#else
#define ldbg(format, arg...)
#endif

/*
 * WM8350 Device IO
 */
static DEFINE_MUTEX(reg_lock_mutex);

/*
 * Safe read, modify, write methods
 */
int wm8350_clear_bits(struct wm8350 *wm8350, u16 reg, u16 mask)
{}
EXPORT_SYMBOL_GPL();

int wm8350_set_bits(struct wm8350 *wm8350, u16 reg, u16 mask)
{}
EXPORT_SYMBOL_GPL();

u16 wm8350_reg_read(struct wm8350 *wm8350, int reg)
{}
EXPORT_SYMBOL_GPL();

int wm8350_reg_write(struct wm8350 *wm8350, int reg, u16 val)
{}
EXPORT_SYMBOL_GPL();

int wm8350_block_read(struct wm8350 *wm8350, int start_reg, int regs,
		      u16 *dest)
{}
EXPORT_SYMBOL_GPL();

int wm8350_block_write(struct wm8350 *wm8350, int start_reg, int regs,
		       u16 *src)
{}
EXPORT_SYMBOL_GPL();

/**
 * wm8350_reg_lock()
 *
 * The WM8350 has a hardware lock which can be used to prevent writes to
 * some registers (generally those which can cause particularly serious
 * problems if misused).  This function enables that lock.
 *
 * @wm8350: pointer to local driver data structure
 */
int wm8350_reg_lock(struct wm8350 *wm8350)
{}
EXPORT_SYMBOL_GPL();

/**
 * wm8350_reg_unlock()
 *
 * The WM8350 has a hardware lock which can be used to prevent writes to
 * some registers (generally those which can cause particularly serious
 * problems if misused).  This function disables that lock so updates
 * can be performed.  For maximum safety this should be done only when
 * required.
 *
 * @wm8350: pointer to local driver data structure
 */
int wm8350_reg_unlock(struct wm8350 *wm8350)
{}
EXPORT_SYMBOL_GPL();

int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale, int vref)
{}
EXPORT_SYMBOL_GPL();

static irqreturn_t wm8350_auxadc_irq(int irq, void *irq_data)
{}

/*
 * Register a client device.  This is non-fatal since there is no need to
 * fail the entire device init due to a single platform device failing.
 */
static void wm8350_client_dev_register(struct wm8350 *wm8350,
				       const char *name,
				       struct platform_device **pdev)
{}

int wm8350_device_init(struct wm8350 *wm8350, int irq,
		       struct wm8350_platform_data *pdata)
{}
EXPORT_SYMBOL_GPL();