#include <linux/ctype.h>
#include <linux/delay.h>
#include <linux/export.h>
#include <linux/gpio/consumer.h>
#include <linux/gpio/driver.h>
#include <linux/init.h>
#include <linux/of.h>
#include <linux/pinctrl/consumer.h>
#include <linux/slab.h>
#include <sound/ac97_codec.h>
#include <sound/soc.h>
struct snd_ac97_reset_cfg { … };
static struct snd_ac97_bus soc_ac97_bus = …;
static void soc_ac97_device_release(struct device *dev)
{ … }
#ifdef CONFIG_GPIOLIB
struct snd_ac97_gpio_priv { … };
static inline struct snd_soc_component *gpio_to_component(struct gpio_chip *chip)
{ … }
static int snd_soc_ac97_gpio_request(struct gpio_chip *chip, unsigned int offset)
{ … }
static int snd_soc_ac97_gpio_direction_in(struct gpio_chip *chip,
unsigned int offset)
{ … }
static int snd_soc_ac97_gpio_get(struct gpio_chip *chip, unsigned int offset)
{ … }
static void snd_soc_ac97_gpio_set(struct gpio_chip *chip, unsigned int offset,
int value)
{ … }
static int snd_soc_ac97_gpio_direction_out(struct gpio_chip *chip,
unsigned offset, int value)
{ … }
static const struct gpio_chip snd_soc_ac97_gpio_chip = …;
static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97,
struct snd_soc_component *component)
{ … }
static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97)
{ … }
#else
static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97,
struct snd_soc_component *component)
{
return 0;
}
static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97)
{
}
#endif
struct snd_ac97 *snd_soc_alloc_ac97_component(struct snd_soc_component *component)
{ … }
EXPORT_SYMBOL(…);
struct snd_ac97 *snd_soc_new_ac97_component(struct snd_soc_component *component,
unsigned int id, unsigned int id_mask)
{ … }
EXPORT_SYMBOL_GPL(…);
void snd_soc_free_ac97_component(struct snd_ac97 *ac97)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct snd_ac97_reset_cfg snd_ac97_rst_cfg;
static void snd_soc_ac97_warm_reset(struct snd_ac97 *ac97)
{ … }
static void snd_soc_ac97_reset(struct snd_ac97 *ac97)
{ … }
static int snd_soc_ac97_parse_pinctl(struct device *dev,
struct snd_ac97_reset_cfg *cfg)
{ … }
struct snd_ac97_bus_ops *soc_ac97_ops;
EXPORT_SYMBOL_GPL(…);
int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
struct platform_device *pdev)
{ … }
EXPORT_SYMBOL_GPL(…);