1*44767708SSiddharth Gupta /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2*44767708SSiddharth Gupta /* 3*44767708SSiddharth Gupta * IOCTLs for Remoteproc's character device interface. 4*44767708SSiddharth Gupta * 5*44767708SSiddharth Gupta * Copyright (c) 2020, The Linux Foundation. All rights reserved. 6*44767708SSiddharth Gupta */ 7*44767708SSiddharth Gupta 8*44767708SSiddharth Gupta #ifndef _UAPI_REMOTEPROC_CDEV_H_ 9*44767708SSiddharth Gupta #define _UAPI_REMOTEPROC_CDEV_H_ 10*44767708SSiddharth Gupta 11*44767708SSiddharth Gupta #include <linux/ioctl.h> 12*44767708SSiddharth Gupta #include <linux/types.h> 13*44767708SSiddharth Gupta 14*44767708SSiddharth Gupta #define RPROC_MAGIC 0xB7 15*44767708SSiddharth Gupta 16*44767708SSiddharth Gupta /* 17*44767708SSiddharth Gupta * The RPROC_SET_SHUTDOWN_ON_RELEASE ioctl allows to enable/disable the shutdown of a remote 18*44767708SSiddharth Gupta * processor automatically when the controlling userpsace closes the char device interface. 19*44767708SSiddharth Gupta * 20*44767708SSiddharth Gupta * input parameter: integer 21*44767708SSiddharth Gupta * 0 : disable automatic shutdown 22*44767708SSiddharth Gupta * other : enable automatic shutdown 23*44767708SSiddharth Gupta */ 24*44767708SSiddharth Gupta #define RPROC_SET_SHUTDOWN_ON_RELEASE _IOW(RPROC_MAGIC, 1, __s32) 25*44767708SSiddharth Gupta 26*44767708SSiddharth Gupta /* 27*44767708SSiddharth Gupta * The RPROC_GET_SHUTDOWN_ON_RELEASE ioctl gets information about whether the automatic shutdown of 28*44767708SSiddharth Gupta * a remote processor is enabled or disabled when the controlling userspace closes the char device 29*44767708SSiddharth Gupta * interface. 30*44767708SSiddharth Gupta * 31*44767708SSiddharth Gupta * output parameter: integer 32*44767708SSiddharth Gupta * 0 : automatic shutdown disable 33*44767708SSiddharth Gupta * other : automatic shutdown enable 34*44767708SSiddharth Gupta */ 35*44767708SSiddharth Gupta #define RPROC_GET_SHUTDOWN_ON_RELEASE _IOR(RPROC_MAGIC, 2, __s32) 36*44767708SSiddharth Gupta 37*44767708SSiddharth Gupta #endif 38