/
usr
/
src
/
linux-headers-5.15.0-181
/
arch
/
sparc
/
include
/
uapi
/
asm
/
/usr/src/linux-headers-5.15.0-181/arch/sparc/include/uapi/asm
mkdir
upload
Name
Size
Mode
Actions
apc.h
1745
0644
edit
dl
rm
asi.h
15367
0644
edit
dl
rm
auxvec.h
348
0644
edit
dl
rm
bitsperlong.h
324
0644
edit
dl
rm
byteorder.h
191
0644
edit
dl
rm
display7seg.h
1945
0644
edit
dl
rm
envctrl.h
3494
0644
edit
dl
rm
errno.h
5539
0644
edit
dl
rm
fbio.h
7904
0644
edit
dl
rm
fcntl.h
1790
0644
edit
dl
rm
ioctl.h
2646
0644
edit
dl
rm
ioctls.h
6133
0644
edit
dl
rm
ipcbuf.h
808
0644
edit
dl
rm
Kbuild
89
0644
edit
dl
rm
mman.h
1008
0644
edit
dl
rm
msgbuf.h
1218
0644
edit
dl
rm
openpromio.h
2166
0644
edit
dl
rm
oradax.h
2013
0644
edit
dl
rm
param.h
253
0644
edit
dl
rm
perfctr.h
5695
0644
edit
dl
rm
poll.h
273
0644
edit
dl
rm
posix_types.h
1768
0644
edit
dl
rm
psr.h
2267
0644
edit
dl
rm
psrcompat.h
2070
0644
edit
dl
rm
pstate.h
6427
0644
edit
dl
rm
ptrace.h
8222
0644
edit
dl
rm
resource.h
770
0644
edit
dl
rm
sembuf.h
896
0644
edit
dl
rm
setup.h
310
0644
edit
dl
rm
shmbuf.h
1383
0644
edit
dl
rm
sigcontext.h
167
0644
edit
dl
rm
siginfo.h
390
0644
edit
dl
rm
signal.h
4703
0644
edit
dl
rm
socket.h
3872
0644
edit
dl
rm
stat.h
2005
0644
edit
dl
rm
swab.h
1034
0644
edit
dl
rm
termbits.h
6761
0644
edit
dl
rm
termios.h
1071
0644
edit
dl
rm
traps.h
5271
0644
edit
dl
rm
uctx.h
1420
0644
edit
dl
rm
unistd.h
904
0644
edit
dl
rm
utrap.h
1541
0644
edit
dl
rm
watchdog.h
1029
0644
edit
dl
rm
Edit:
/usr/src/linux-headers-5.15.0-181/arch/sparc/include/uapi/asm/envctrl.h
(3494B)
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * * envctrl.h: Definitions for access to the i2c environment * monitoring on Ultrasparc systems. * * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) * Copyright (C) 2000 Vinh Truong (vinh.truong@eng.sun.com) * VT - Add all ioctl commands and environment status definitions * VT - Add application note */ #ifndef _SPARC64_ENVCTRL_H #define _SPARC64_ENVCTRL_H 1 #include <linux/ioctl.h> /* Application note: * * The driver supports 4 operations: open(), close(), ioctl(), read() * The device name is /dev/envctrl. * Below is sample usage: * * fd = open("/dev/envtrl", O_RDONLY); * if (ioctl(fd, ENVCTRL_READ_SHUTDOWN_TEMPERATURE, 0) < 0) * printf("error\n"); * ret = read(fd, buf, 10); * close(fd); * * Notice in the case of cpu voltage and temperature, the default is * cpu0. If we need to know the info of cpu1, cpu2, cpu3, we need to * pass in cpu number in ioctl() last parameter. For example, to * get the voltage of cpu2: * * ioctlbuf[0] = 2; * if (ioctl(fd, ENVCTRL_READ_CPU_VOLTAGE, ioctlbuf) < 0) * printf("error\n"); * ret = read(fd, buf, 10); * * All the return values are in ascii. So check read return value * and do appropriate conversions in your application. */ /* IOCTL commands */ /* Note: these commands reflect possible monitor features. * Some boards choose to support some of the features only. */ #define ENVCTRL_RD_CPU_TEMPERATURE _IOR('p', 0x40, int) #define ENVCTRL_RD_CPU_VOLTAGE _IOR('p', 0x41, int) #define ENVCTRL_RD_FAN_STATUS _IOR('p', 0x42, int) #define ENVCTRL_RD_WARNING_TEMPERATURE _IOR('p', 0x43, int) #define ENVCTRL_RD_SHUTDOWN_TEMPERATURE _IOR('p', 0x44, int) #define ENVCTRL_RD_VOLTAGE_STATUS _IOR('p', 0x45, int) #define ENVCTRL_RD_SCSI_TEMPERATURE _IOR('p', 0x46, int) #define ENVCTRL_RD_ETHERNET_TEMPERATURE _IOR('p', 0x47, int) #define ENVCTRL_RD_MTHRBD_TEMPERATURE _IOR('p', 0x48, int) #define ENVCTRL_RD_GLOBALADDRESS _IOR('p', 0x49, int) /* Read return values for a voltage status request. */ #define ENVCTRL_VOLTAGE_POWERSUPPLY_GOOD 0x01 #define ENVCTRL_VOLTAGE_BAD 0x02 #define ENVCTRL_POWERSUPPLY_BAD 0x03 #define ENVCTRL_VOLTAGE_POWERSUPPLY_BAD 0x04 /* Read return values for a fan status request. * A failure match means either the fan fails or * the fan is not connected. Some boards have optional * connectors to connect extra fans. * * There are maximum 8 monitor fans. Some are cpu fans * some are system fans. The mask below only indicates * fan by order number. * Below is a sample application: * * if (ioctl(fd, ENVCTRL_READ_FAN_STATUS, 0) < 0) { * printf("ioctl fan failed\n"); * } * if (read(fd, rslt, 1) <= 0) { * printf("error or fan not monitored\n"); * } else { * if (rslt[0] == ENVCTRL_ALL_FANS_GOOD) { * printf("all fans good\n"); * } else if (rslt[0] == ENVCTRL_ALL_FANS_BAD) { * printf("all fans bad\n"); * } else { * if (rslt[0] & ENVCTRL_FAN0_FAILURE_MASK) { * printf("fan 0 failed or not connected\n"); * } * ...... */ #define ENVCTRL_ALL_FANS_GOOD 0x00 #define ENVCTRL_FAN0_FAILURE_MASK 0x01 #define ENVCTRL_FAN1_FAILURE_MASK 0x02 #define ENVCTRL_FAN2_FAILURE_MASK 0x04 #define ENVCTRL_FAN3_FAILURE_MASK 0x08 #define ENVCTRL_FAN4_FAILURE_MASK 0x10 #define ENVCTRL_FAN5_FAILURE_MASK 0x20 #define ENVCTRL_FAN6_FAILURE_MASK 0x40 #define ENVCTRL_FAN7_FAILURE_MASK 0x80 #define ENVCTRL_ALL_FANS_BAD 0xFF #endif /* !(_SPARC64_ENVCTRL_H) */
Save
cmd:
run