Path: blob/master/arch/powerpc/include/uapi/asm/papr-indices.h
26516 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef _UAPI_PAPR_INDICES_H_2#define _UAPI_PAPR_INDICES_H_34#include <linux/types.h>5#include <asm/ioctl.h>6#include <asm/papr-miscdev.h>78#define LOC_CODE_SIZE 809#define RTAS_GET_INDICES_BUF_SIZE SZ_4K1011struct papr_indices_io_block {12union {13struct {14__u8 is_sensor; /* 0 for indicator and 1 for sensor */15__u32 indice_type;16} indices;17struct {18__u32 token; /* Sensor or indicator token */19__u32 state; /* get / set state */20/*21* PAPR+ 12.3.2.4 Converged Location Code Rules - Length22* Restrictions. 79 characters plus null.23*/24char location_code_str[LOC_CODE_SIZE]; /* location code */25} dynamic_param;26};27};2829/*30* ioctls for /dev/papr-indices.31* PAPR_INDICES_IOC_GET: Returns a get-indices handle fd to read data32* PAPR_DYNAMIC_SENSOR_IOC_GET: Gets the state of the input sensor33* PAPR_DYNAMIC_INDICATOR_IOC_SET: Sets the new state for the input indicator34*/35#define PAPR_INDICES_IOC_GET _IOW(PAPR_MISCDEV_IOC_ID, 3, struct papr_indices_io_block)36#define PAPR_DYNAMIC_SENSOR_IOC_GET _IOWR(PAPR_MISCDEV_IOC_ID, 4, struct papr_indices_io_block)37#define PAPR_DYNAMIC_INDICATOR_IOC_SET _IOW(PAPR_MISCDEV_IOC_ID, 5, struct papr_indices_io_block)383940#endif /* _UAPI_PAPR_INDICES_H_ */414243