linux/include/uapi/linux/stm.h
<<
>>
Prefs
   1/*
   2 * System Trace Module (STM) userspace interfaces
   3 * Copyright (c) 2014, Intel Corporation.
   4 *
   5 * This program is free software; you can redistribute it and/or modify it
   6 * under the terms and conditions of the GNU General Public License,
   7 * version 2, as published by the Free Software Foundation.
   8 *
   9 * This program is distributed in the hope it will be useful, but WITHOUT
  10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  12 * more details.
  13 *
  14 * STM class implements generic infrastructure for  System Trace Module devices
  15 * as defined in MIPI STPv2 specification.
  16 */
  17
  18#ifndef _UAPI_LINUX_STM_H
  19#define _UAPI_LINUX_STM_H
  20
  21#include <linux/types.h>
  22
  23/* Maximum allowed master and channel values */
  24#define STP_MASTER_MAX  0xffff
  25#define STP_CHANNEL_MAX 0xffff
  26
  27/**
  28 * struct stp_policy_id - identification for the STP policy
  29 * @size:       size of the structure including real id[] length
  30 * @master:     assigned master
  31 * @channel:    first assigned channel
  32 * @width:      number of requested channels
  33 * @id:         identification string
  34 *
  35 * User must calculate the total size of the structure and put it into
  36 * @size field, fill out the @id and desired @width. In return, kernel
  37 * fills out @master, @channel and @width.
  38 */
  39struct stp_policy_id {
  40        __u32           size;
  41        __u16           master;
  42        __u16           channel;
  43        __u16           width;
  44        /* padding */
  45        __u16           __reserved_0;
  46        __u32           __reserved_1;
  47        char            id[0];
  48};
  49
  50#define STP_POLICY_ID_SET       _IOWR('%', 0, struct stp_policy_id)
  51#define STP_POLICY_ID_GET       _IOR('%', 1, struct stp_policy_id)
  52#define STP_SET_OPTIONS         _IOW('%', 2, __u64)
  53
  54#endif /* _UAPI_LINUX_STM_H */
  55