linux/sound/hda/hdac_sysfs.c

// SPDX-License-Identifier: GPL-2.0
/*
 * sysfs support for HD-audio core device
 */

#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/device.h>
#include <sound/core.h>
#include <sound/hdaudio.h>
#include "local.h"

struct hdac_widget_tree {};

#define CODEC_ATTR(type)

#define CODEC_ATTR_STR(type)

CODEC_ATTR();
CODEC_ATTR();
CODEC_ATTR();
CODEC_ATTR();
CODEC_ATTR();
CODEC_ATTR();
CODEC_ATTR_STR();
CODEC_ATTR_STR();

static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
			     char *buf)
{}
static DEVICE_ATTR_RO(modalias);

static struct attribute *hdac_dev_attrs[] =;

static const struct attribute_group hdac_dev_attr_group =;

const struct attribute_group *hdac_dev_attr_groups[] =;

/*
 * Widget tree sysfs
 *
 * This is a tree showing the attributes of each widget.  It appears like
 * /sys/bus/hdaudioC0D0/widgets/04/caps
 */

struct widget_attribute;

struct widget_attribute {};

static int get_codec_nid(struct kobject *kobj, struct hdac_device **codecp)
{}

static ssize_t widget_attr_show(struct kobject *kobj, struct attribute *attr,
				char *buf)
{}

static ssize_t widget_attr_store(struct kobject *kobj, struct attribute *attr,
				 const char *buf, size_t count)
{}

static const struct sysfs_ops widget_sysfs_ops =;

static void widget_release(struct kobject *kobj)
{}

static const struct kobj_type widget_ktype =;

#define WIDGET_ATTR_RO(_name)
#define WIDGET_ATTR_RW(_name)

static ssize_t caps_show(struct hdac_device *codec, hda_nid_t nid,
			struct widget_attribute *attr, char *buf)
{}

static ssize_t pin_caps_show(struct hdac_device *codec, hda_nid_t nid,
			     struct widget_attribute *attr, char *buf)
{}

static ssize_t pin_cfg_show(struct hdac_device *codec, hda_nid_t nid,
			    struct widget_attribute *attr, char *buf)
{}

static bool has_pcm_cap(struct hdac_device *codec, hda_nid_t nid)
{}

static ssize_t pcm_caps_show(struct hdac_device *codec, hda_nid_t nid,
			     struct widget_attribute *attr, char *buf)
{}

static ssize_t pcm_formats_show(struct hdac_device *codec, hda_nid_t nid,
				struct widget_attribute *attr, char *buf)
{}

static ssize_t amp_in_caps_show(struct hdac_device *codec, hda_nid_t nid,
				struct widget_attribute *attr, char *buf)
{}

static ssize_t amp_out_caps_show(struct hdac_device *codec, hda_nid_t nid,
				 struct widget_attribute *attr, char *buf)
{}

static ssize_t power_caps_show(struct hdac_device *codec, hda_nid_t nid,
			       struct widget_attribute *attr, char *buf)
{}

static ssize_t gpio_caps_show(struct hdac_device *codec, hda_nid_t nid,
			      struct widget_attribute *attr, char *buf)
{}

static ssize_t connections_show(struct hdac_device *codec, hda_nid_t nid,
				struct widget_attribute *attr, char *buf)
{}

static WIDGET_ATTR_RO(caps);
static WIDGET_ATTR_RO(pin_caps);
static WIDGET_ATTR_RO(pin_cfg);
static WIDGET_ATTR_RO(pcm_caps);
static WIDGET_ATTR_RO(pcm_formats);
static WIDGET_ATTR_RO(amp_in_caps);
static WIDGET_ATTR_RO(amp_out_caps);
static WIDGET_ATTR_RO(power_caps);
static WIDGET_ATTR_RO(gpio_caps);
static WIDGET_ATTR_RO(connections);

static struct attribute *widget_node_attrs[] =;

static struct attribute *widget_afg_attrs[] =;

static const struct attribute_group widget_node_group =;

static const struct attribute_group widget_afg_group =;

static void free_widget_node(struct kobject *kobj,
			     const struct attribute_group *group)
{}

static void widget_tree_free(struct hdac_device *codec)
{}

static int add_widget_node(struct kobject *parent, hda_nid_t nid,
			   const struct attribute_group *group,
			   struct kobject **res)
{}

static int widget_tree_create(struct hdac_device *codec)
{}

/* call with codec->widget_lock held */
int hda_widget_sysfs_init(struct hdac_device *codec)
{}

/* call with codec->widget_lock held */
void hda_widget_sysfs_exit(struct hdac_device *codec)
{}

/* call with codec->widget_lock held */
int hda_widget_sysfs_reinit(struct hdac_device *codec,
			    hda_nid_t start_nid, int num_nodes)
{}