linux/sound/pci/oxygen/oxygen_io.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * C-Media CMI8788 driver - helper functions
 *
 * Copyright (c) Clemens Ladisch <[email protected]>
 */

#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/export.h>
#include <linux/io.h>
#include <sound/core.h>
#include <sound/mpu401.h>
#include "oxygen.h"

u8 oxygen_read8(struct oxygen *chip, unsigned int reg)
{}
EXPORT_SYMBOL();

u16 oxygen_read16(struct oxygen *chip, unsigned int reg)
{}
EXPORT_SYMBOL();

u32 oxygen_read32(struct oxygen *chip, unsigned int reg)
{}
EXPORT_SYMBOL();

void oxygen_write8(struct oxygen *chip, unsigned int reg, u8 value)
{}
EXPORT_SYMBOL();

void oxygen_write16(struct oxygen *chip, unsigned int reg, u16 value)
{}
EXPORT_SYMBOL();

void oxygen_write32(struct oxygen *chip, unsigned int reg, u32 value)
{}
EXPORT_SYMBOL();

void oxygen_write8_masked(struct oxygen *chip, unsigned int reg,
			  u8 value, u8 mask)
{}
EXPORT_SYMBOL();

void oxygen_write16_masked(struct oxygen *chip, unsigned int reg,
			   u16 value, u16 mask)
{}
EXPORT_SYMBOL();

void oxygen_write32_masked(struct oxygen *chip, unsigned int reg,
			   u32 value, u32 mask)
{}
EXPORT_SYMBOL();

static int oxygen_ac97_wait(struct oxygen *chip, unsigned int mask)
{}

/*
 * About 10% of AC'97 register reads or writes fail to complete, but even those
 * where the controller indicates completion aren't guaranteed to have actually
 * happened.
 *
 * It's hard to assign blame to either the controller or the codec because both
 * were made by C-Media ...
 */

void oxygen_write_ac97(struct oxygen *chip, unsigned int codec,
		       unsigned int index, u16 data)
{}
EXPORT_SYMBOL();

u16 oxygen_read_ac97(struct oxygen *chip, unsigned int codec,
		     unsigned int index)
{}
EXPORT_SYMBOL();

void oxygen_write_ac97_masked(struct oxygen *chip, unsigned int codec,
			      unsigned int index, u16 data, u16 mask)
{}
EXPORT_SYMBOL();

static int oxygen_wait_spi(struct oxygen *chip)
{}

int oxygen_write_spi(struct oxygen *chip, u8 control, unsigned int data)
{}
EXPORT_SYMBOL();

void oxygen_write_i2c(struct oxygen *chip, u8 device, u8 map, u8 data)
{}
EXPORT_SYMBOL();

static void _write_uart(struct oxygen *chip, unsigned int port, u8 data)
{}

void oxygen_reset_uart(struct oxygen *chip)
{}
EXPORT_SYMBOL();

void oxygen_write_uart(struct oxygen *chip, u8 data)
{}
EXPORT_SYMBOL();

u16 oxygen_read_eeprom(struct oxygen *chip, unsigned int index)
{}

void oxygen_write_eeprom(struct oxygen *chip, unsigned int index, u16 value)
{}