drm/rockchip: Don't change hdmi reference clock rate
[drm/drm-misc.git] / tools / perf / trace / beauty / usbdevfs_ioctl.sh
blob12a30a9a8e0c8f44f16d98399d5f50f3684deff5
1 #!/bin/sh
2 # SPDX-License-Identifier: LGPL-2.1
4 [ $# -eq 1 ] && beauty_uapi_linux_dir=$1 || beauty_uapi_linux_dir=tools/perf/trace/beauty/include/uapi/linux/
6 # also as:
7 # #define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC_READ, 'U', 32, len)
9 printf "static const char *usbdevfs_ioctl_cmds[] = {\n"
10 regex="^#[[:space:]]*define[[:space:]]+USBDEVFS_(\w+)(\(\w+\))?[[:space:]]+_IO[CWR]{0,2}\([[:space:]]*(_IOC_\w+,[[:space:]]*)?'U'[[:space:]]*,[[:space:]]*([[:digit:]]+).*"
11 grep -E "$regex" ${beauty_uapi_linux_dir}/usbdevice_fs.h | grep -E -v 'USBDEVFS_\w+32[[:space:]]' | \
12 sed -r "s/$regex/\4 \1/g" | \
13 sort | xargs printf "\t[%s] = \"%s\",\n"
14 printf "};\n\n"
15 printf "#if 0\n"
16 printf "static const char *usbdevfs_ioctl_32_cmds[] = {\n"
17 regex="^#[[:space:]]*define[[:space:]]+USBDEVFS_(\w+)[[:space:]]+_IO[WR]{0,2}\([[:space:]]*'U'[[:space:]]*,[[:space:]]*([[:digit:]]+).*"
18 grep -E $regex ${beauty_uapi_linux_dir}/usbdevice_fs.h | grep -E 'USBDEVFS_\w+32[[:space:]]' | \
19 sed -r "s/$regex/\2 \1/g" | \
20 sort | xargs printf "\t[%s] = \"%s\",\n"
21 printf "};\n"
22 printf "#endif\n"