#include <linux/configfs.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/uuid.h>
#include <linux/stm.h>
#include "stm.h"
enum sys_t_message_type { … };
enum sys_t_message_severity { … };
enum sys_t_message_build_subtype { … };
enum sys_t_message_clock_subtype { … };
enum sys_t_message_string_subtype { … };
enum sys_t_message_sbd_subtype { … };
#define MIPI_SYST_TYPE(t) …
#define MIPI_SYST_SEVERITY(s) …
#define MIPI_SYST_OPT_LOC …
#define MIPI_SYST_OPT_LEN …
#define MIPI_SYST_OPT_CHK …
#define MIPI_SYST_OPT_TS …
#define MIPI_SYST_UNIT(u) …
#define MIPI_SYST_ORIGIN(o) …
#define MIPI_SYST_OPT_GUID …
#define MIPI_SYST_SUBTYPE(s) …
#define MIPI_SYST_UNITLARGE(u) …
#define MIPI_SYST_TYPES(t, s) …
#define DATA_HEADER …
#define CLOCK_SYNC_HEADER …
#define SBD_HEADER …
struct sys_t_policy_node { … };
struct sys_t_output { … };
static void sys_t_policy_node_init(void *priv)
{ … }
static int sys_t_output_open(void *priv, struct stm_output *output)
{ … }
static void sys_t_output_close(struct stm_output *output)
{ … }
static ssize_t sys_t_policy_uuid_show(struct config_item *item,
char *page)
{ … }
static ssize_t
sys_t_policy_uuid_store(struct config_item *item, const char *page,
size_t count)
{ … }
CONFIGFS_ATTR(…);
static ssize_t sys_t_policy_do_len_show(struct config_item *item,
char *page)
{ … }
static ssize_t
sys_t_policy_do_len_store(struct config_item *item, const char *page,
size_t count)
{ … }
CONFIGFS_ATTR(…);
static ssize_t sys_t_policy_ts_interval_show(struct config_item *item,
char *page)
{ … }
static ssize_t
sys_t_policy_ts_interval_store(struct config_item *item, const char *page,
size_t count)
{ … }
CONFIGFS_ATTR(…);
static ssize_t sys_t_policy_clocksync_interval_show(struct config_item *item,
char *page)
{ … }
static ssize_t
sys_t_policy_clocksync_interval_store(struct config_item *item,
const char *page, size_t count)
{ … }
CONFIGFS_ATTR(…);
static struct configfs_attribute *sys_t_policy_attrs[] = …;
static inline bool sys_t_need_ts(struct sys_t_output *op)
{ … }
static bool sys_t_need_clock_sync(struct sys_t_output *op)
{ … }
static ssize_t
sys_t_clock_sync(struct stm_data *data, unsigned int m, unsigned int c)
{ … }
static inline u32 sys_t_header(struct stm_source_data *source)
{ … }
static ssize_t sys_t_write_data(struct stm_data *data,
struct stm_source_data *source,
unsigned int master, unsigned int channel,
bool ts_first, const void *buf, size_t count)
{ … }
static ssize_t sys_t_write(struct stm_data *data, struct stm_output *output,
unsigned int chan, const char *buf, size_t count,
struct stm_source_data *source)
{ … }
static const struct stm_protocol_driver sys_t_pdrv = …;
static int sys_t_stm_init(void)
{ … }
static void sys_t_stm_exit(void)
{ … }
module_init(…) …;
module_exit(sys_t_stm_exit);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;