#include <linux/sysfs.h>
#include <linux/platform_device.h>
#include "hidma_mgmt.h"
struct hidma_chan_attr { … };
struct hidma_mgmt_fileinfo { … };
#define IMPLEMENT_GETSET(name) …
#define DECLARE_ATTRIBUTE(name, mode) …
IMPLEMENT_GETSET(…) …
IMPLEMENT_GETSET(…) …
IMPLEMENT_GETSET(…) …
IMPLEMENT_GETSET(…) …
IMPLEMENT_GETSET(…) …
IMPLEMENT_GETSET(…) …
IMPLEMENT_GETSET(…) …
IMPLEMENT_GETSET(…) …
static int set_priority(struct hidma_mgmt_dev *mdev, unsigned int i, u64 val)
{ … }
static int set_weight(struct hidma_mgmt_dev *mdev, unsigned int i, u64 val)
{ … }
static struct hidma_mgmt_fileinfo hidma_mgmt_files[] = …;
static ssize_t show_values(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t set_values(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t show_values_channel(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{ … }
static ssize_t set_values_channel(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf,
size_t count)
{ … }
static int create_sysfs_entry(struct hidma_mgmt_dev *dev, char *name, int mode)
{ … }
static int create_sysfs_entry_channel(struct hidma_mgmt_dev *mdev, char *name,
int mode, int index,
struct kobject *parent)
{ … }
int hidma_mgmt_init_sys(struct hidma_mgmt_dev *mdev)
{ … }
EXPORT_SYMBOL_GPL(…);