OpenCloudOS-Kernel/include/dt-bindings/mfd/qcom-rpm.h

184 lines
6.0 KiB
C
Raw Normal View History

License cleanup: add SPDX GPL-2.0 license identifier to files with no license Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 22:07:57 +08:00
/* SPDX-License-Identifier: GPL-2.0 */
/*
* This header provides constants for the Qualcomm RPM bindings.
*/
#ifndef _DT_BINDINGS_MFD_QCOM_RPM_H
#define _DT_BINDINGS_MFD_QCOM_RPM_H
/*
* Constants use to identify individual resources in the RPM.
*/
#define QCOM_RPM_APPS_FABRIC_ARB 1
#define QCOM_RPM_APPS_FABRIC_CLK 2
#define QCOM_RPM_APPS_FABRIC_HALT 3
#define QCOM_RPM_APPS_FABRIC_IOCTL 4
#define QCOM_RPM_APPS_FABRIC_MODE 5
#define QCOM_RPM_APPS_L2_CACHE_CTL 6
#define QCOM_RPM_CFPB_CLK 7
#define QCOM_RPM_CXO_BUFFERS 8
#define QCOM_RPM_CXO_CLK 9
#define QCOM_RPM_DAYTONA_FABRIC_CLK 10
#define QCOM_RPM_DDR_DMM 11
#define QCOM_RPM_EBI1_CLK 12
#define QCOM_RPM_HDMI_SWITCH 13
#define QCOM_RPM_MMFPB_CLK 14
#define QCOM_RPM_MM_FABRIC_ARB 15
#define QCOM_RPM_MM_FABRIC_CLK 16
#define QCOM_RPM_MM_FABRIC_HALT 17
#define QCOM_RPM_MM_FABRIC_IOCTL 18
#define QCOM_RPM_MM_FABRIC_MODE 19
#define QCOM_RPM_PLL_4 20
#define QCOM_RPM_PM8058_LDO0 21
#define QCOM_RPM_PM8058_LDO1 22
#define QCOM_RPM_PM8058_LDO2 23
#define QCOM_RPM_PM8058_LDO3 24
#define QCOM_RPM_PM8058_LDO4 25
#define QCOM_RPM_PM8058_LDO5 26
#define QCOM_RPM_PM8058_LDO6 27
#define QCOM_RPM_PM8058_LDO7 28
#define QCOM_RPM_PM8058_LDO8 29
#define QCOM_RPM_PM8058_LDO9 30
#define QCOM_RPM_PM8058_LDO10 31
#define QCOM_RPM_PM8058_LDO11 32
#define QCOM_RPM_PM8058_LDO12 33
#define QCOM_RPM_PM8058_LDO13 34
#define QCOM_RPM_PM8058_LDO14 35
#define QCOM_RPM_PM8058_LDO15 36
#define QCOM_RPM_PM8058_LDO16 37
#define QCOM_RPM_PM8058_LDO17 38
#define QCOM_RPM_PM8058_LDO18 39
#define QCOM_RPM_PM8058_LDO19 40
#define QCOM_RPM_PM8058_LDO20 41
#define QCOM_RPM_PM8058_LDO21 42
#define QCOM_RPM_PM8058_LDO22 43
#define QCOM_RPM_PM8058_LDO23 44
#define QCOM_RPM_PM8058_LDO24 45
#define QCOM_RPM_PM8058_LDO25 46
#define QCOM_RPM_PM8058_LVS0 47
#define QCOM_RPM_PM8058_LVS1 48
#define QCOM_RPM_PM8058_NCP 49
#define QCOM_RPM_PM8058_SMPS0 50
#define QCOM_RPM_PM8058_SMPS1 51
#define QCOM_RPM_PM8058_SMPS2 52
#define QCOM_RPM_PM8058_SMPS3 53
#define QCOM_RPM_PM8058_SMPS4 54
#define QCOM_RPM_PM8821_LDO1 55
#define QCOM_RPM_PM8821_SMPS1 56
#define QCOM_RPM_PM8821_SMPS2 57
#define QCOM_RPM_PM8901_LDO0 58
#define QCOM_RPM_PM8901_LDO1 59
#define QCOM_RPM_PM8901_LDO2 60
#define QCOM_RPM_PM8901_LDO3 61
#define QCOM_RPM_PM8901_LDO4 62
#define QCOM_RPM_PM8901_LDO5 63
#define QCOM_RPM_PM8901_LDO6 64
#define QCOM_RPM_PM8901_LVS0 65
#define QCOM_RPM_PM8901_LVS1 66
#define QCOM_RPM_PM8901_LVS2 67
#define QCOM_RPM_PM8901_LVS3 68
#define QCOM_RPM_PM8901_MVS 69
#define QCOM_RPM_PM8901_SMPS0 70
#define QCOM_RPM_PM8901_SMPS1 71
#define QCOM_RPM_PM8901_SMPS2 72
#define QCOM_RPM_PM8901_SMPS3 73
#define QCOM_RPM_PM8901_SMPS4 74
#define QCOM_RPM_PM8921_CLK1 75
#define QCOM_RPM_PM8921_CLK2 76
#define QCOM_RPM_PM8921_LDO1 77
#define QCOM_RPM_PM8921_LDO2 78
#define QCOM_RPM_PM8921_LDO3 79
#define QCOM_RPM_PM8921_LDO4 80
#define QCOM_RPM_PM8921_LDO5 81
#define QCOM_RPM_PM8921_LDO6 82
#define QCOM_RPM_PM8921_LDO7 83
#define QCOM_RPM_PM8921_LDO8 84
#define QCOM_RPM_PM8921_LDO9 85
#define QCOM_RPM_PM8921_LDO10 86
#define QCOM_RPM_PM8921_LDO11 87
#define QCOM_RPM_PM8921_LDO12 88
#define QCOM_RPM_PM8921_LDO13 89
#define QCOM_RPM_PM8921_LDO14 90
#define QCOM_RPM_PM8921_LDO15 91
#define QCOM_RPM_PM8921_LDO16 92
#define QCOM_RPM_PM8921_LDO17 93
#define QCOM_RPM_PM8921_LDO18 94
#define QCOM_RPM_PM8921_LDO19 95
#define QCOM_RPM_PM8921_LDO20 96
#define QCOM_RPM_PM8921_LDO21 97
#define QCOM_RPM_PM8921_LDO22 98
#define QCOM_RPM_PM8921_LDO23 99
#define QCOM_RPM_PM8921_LDO24 100
#define QCOM_RPM_PM8921_LDO25 101
#define QCOM_RPM_PM8921_LDO26 102
#define QCOM_RPM_PM8921_LDO27 103
#define QCOM_RPM_PM8921_LDO28 104
#define QCOM_RPM_PM8921_LDO29 105
#define QCOM_RPM_PM8921_LVS1 106
#define QCOM_RPM_PM8921_LVS2 107
#define QCOM_RPM_PM8921_LVS3 108
#define QCOM_RPM_PM8921_LVS4 109
#define QCOM_RPM_PM8921_LVS5 110
#define QCOM_RPM_PM8921_LVS6 111
#define QCOM_RPM_PM8921_LVS7 112
#define QCOM_RPM_PM8921_MVS 113
#define QCOM_RPM_PM8921_NCP 114
#define QCOM_RPM_PM8921_SMPS1 115
#define QCOM_RPM_PM8921_SMPS2 116
#define QCOM_RPM_PM8921_SMPS3 117
#define QCOM_RPM_PM8921_SMPS4 118
#define QCOM_RPM_PM8921_SMPS5 119
#define QCOM_RPM_PM8921_SMPS6 120
#define QCOM_RPM_PM8921_SMPS7 121
#define QCOM_RPM_PM8921_SMPS8 122
#define QCOM_RPM_PXO_CLK 123
#define QCOM_RPM_QDSS_CLK 124
#define QCOM_RPM_SFPB_CLK 125
#define QCOM_RPM_SMI_CLK 126
#define QCOM_RPM_SYS_FABRIC_ARB 127
#define QCOM_RPM_SYS_FABRIC_CLK 128
#define QCOM_RPM_SYS_FABRIC_HALT 129
#define QCOM_RPM_SYS_FABRIC_IOCTL 130
#define QCOM_RPM_SYS_FABRIC_MODE 131
#define QCOM_RPM_USB_OTG_SWITCH 132
#define QCOM_RPM_VDDMIN_GPIO 133
#define QCOM_RPM_NSS_FABRIC_0_CLK 134
#define QCOM_RPM_NSS_FABRIC_1_CLK 135
#define QCOM_RPM_SMB208_S1a 136
#define QCOM_RPM_SMB208_S1b 137
#define QCOM_RPM_SMB208_S2a 138
#define QCOM_RPM_SMB208_S2b 139
#define QCOM_RPM_PM8018_SMPS1 140
#define QCOM_RPM_PM8018_SMPS2 141
#define QCOM_RPM_PM8018_SMPS3 142
#define QCOM_RPM_PM8018_SMPS4 143
#define QCOM_RPM_PM8018_SMPS5 144
#define QCOM_RPM_PM8018_LDO1 145
#define QCOM_RPM_PM8018_LDO2 146
#define QCOM_RPM_PM8018_LDO3 147
#define QCOM_RPM_PM8018_LDO4 148
#define QCOM_RPM_PM8018_LDO5 149
#define QCOM_RPM_PM8018_LDO6 150
#define QCOM_RPM_PM8018_LDO7 151
#define QCOM_RPM_PM8018_LDO8 152
#define QCOM_RPM_PM8018_LDO9 153
#define QCOM_RPM_PM8018_LDO10 154
#define QCOM_RPM_PM8018_LDO11 155
#define QCOM_RPM_PM8018_LDO12 156
#define QCOM_RPM_PM8018_LDO13 157
#define QCOM_RPM_PM8018_LDO14 158
#define QCOM_RPM_PM8018_LVS1 159
#define QCOM_RPM_PM8018_NCP 160
#define QCOM_RPM_VOLTAGE_CORNER 161
/*
* Constants used to select force mode for regulators.
*/
#define QCOM_RPM_FORCE_MODE_NONE 0
#define QCOM_RPM_FORCE_MODE_LPM 1
#define QCOM_RPM_FORCE_MODE_HPM 2
#define QCOM_RPM_FORCE_MODE_AUTO 3
#define QCOM_RPM_FORCE_MODE_BYPASS 4
#endif