1c1d0c72aSopenharmony_ciHDF - Hardware Driver Foundation
2c1d0c72aSopenharmony_ciCopyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
3c1d0c72aSopenharmony_ci
4c1d0c72aSopenharmony_ciThe framework directory is dual licensed: you can use it either under the terms of
5c1d0c72aSopenharmony_cithe GPL V2, or the BSD3 license, at your option.
6c1d0c72aSopenharmony_ciThe adapter/khdf/liteos and khdf/liteos_m subdirectories are licensed under 3-Clause BSD License.
7c1d0c72aSopenharmony_ciThe adapter/khdf/linux subdirectory is licensed under the GPL V2 License.
8c1d0c72aSopenharmony_ciThe adapter/platform subdirectory is is dual licensed: you can use it either under the terms of
9c1d0c72aSopenharmony_cithe GPL V2, or the 3-Clause BSD License, at your option.
10c1d0c72aSopenharmony_ciThe adapter/uhdf and adapter/uhdf2 and others subdirectories are licensed under Apache License, Version 2.0.
11c1d0c72aSopenharmony_ci
12c1d0c72aSopenharmony_cia) The 3-Clause BSD License, (https://opensource.org/licenses/BSD-3-Clause)
13c1d0c72aSopenharmony_ciRedistribution and use in source and binary forms, with or
14c1d0c72aSopenharmony_ciwithout modification, are permitted provided that the following
15c1d0c72aSopenharmony_ciconditions are met:
16c1d0c72aSopenharmony_ci
17c1d0c72aSopenharmony_ci1. Redistributions of source code must retain the above
18c1d0c72aSopenharmony_ci   copyright notice, this list of conditions and the following
19c1d0c72aSopenharmony_ci   disclaimer.
20c1d0c72aSopenharmony_ci2. Redistributions in binary form must reproduce the above
21c1d0c72aSopenharmony_ci   copyright notice, this list of conditions and the following
22c1d0c72aSopenharmony_ci   disclaimer in the documentation and/or other materials
23c1d0c72aSopenharmony_ci   provided with the distribution.
24c1d0c72aSopenharmony_ci3. Neither the name of the copyright holder nor the names of its
25c1d0c72aSopenharmony_ci   contributors may be used to endorse or promote products derived
26c1d0c72aSopenharmony_ci   from this software without specific prior written permission.
27c1d0c72aSopenharmony_ci
28c1d0c72aSopenharmony_ciTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
29c1d0c72aSopenharmony_ciCONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
30c1d0c72aSopenharmony_ciINCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
31c1d0c72aSopenharmony_ciMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
32c1d0c72aSopenharmony_ciDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
33c1d0c72aSopenharmony_ciCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34c1d0c72aSopenharmony_ciSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
35c1d0c72aSopenharmony_ciNOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36c1d0c72aSopenharmony_ciLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37c1d0c72aSopenharmony_ciHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
38c1d0c72aSopenharmony_ciCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
39c1d0c72aSopenharmony_ciOTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
40c1d0c72aSopenharmony_ciEVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41c1d0c72aSopenharmony_ci
42c1d0c72aSopenharmony_cib) The Apache License, Version 2.0, (https://www.apache.org/licenses/LICENSE-2.0)
43c1d0c72aSopenharmony_ci                                 Apache License
44c1d0c72aSopenharmony_ci                           Version 2.0, January 2004
45c1d0c72aSopenharmony_ci                        http://www.apache.org/licenses/
46c1d0c72aSopenharmony_ci
47c1d0c72aSopenharmony_ci   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
48c1d0c72aSopenharmony_ci
49c1d0c72aSopenharmony_ci   1. Definitions.
50c1d0c72aSopenharmony_ci
51c1d0c72aSopenharmony_ci      "License" shall mean the terms and conditions for use, reproduction,
52c1d0c72aSopenharmony_ci      and distribution as defined by Sections 1 through 9 of this document.
53c1d0c72aSopenharmony_ci
54c1d0c72aSopenharmony_ci      "Licensor" shall mean the copyright owner or entity authorized by
55c1d0c72aSopenharmony_ci      the copyright owner that is granting the License.
56c1d0c72aSopenharmony_ci
57c1d0c72aSopenharmony_ci      "Legal Entity" shall mean the union of the acting entity and all
58c1d0c72aSopenharmony_ci      other entities that control, are controlled by, or are under common
59c1d0c72aSopenharmony_ci      control with that entity. For the purposes of this definition,
60c1d0c72aSopenharmony_ci      "control" means (i) the power, direct or indirect, to cause the
61c1d0c72aSopenharmony_ci      direction or management of such entity, whether by contract or
62c1d0c72aSopenharmony_ci      otherwise, or (ii) ownership of fifty percent (50%) or more of the
63c1d0c72aSopenharmony_ci      outstanding shares, or (iii) beneficial ownership of such entity.
64c1d0c72aSopenharmony_ci
65c1d0c72aSopenharmony_ci      "You" (or "Your") shall mean an individual or Legal Entity
66c1d0c72aSopenharmony_ci      exercising permissions granted by this License.
67c1d0c72aSopenharmony_ci
68c1d0c72aSopenharmony_ci      "Source" form shall mean the preferred form for making modifications,
69c1d0c72aSopenharmony_ci      including but not limited to software source code, documentation
70c1d0c72aSopenharmony_ci      source, and configuration files.
71c1d0c72aSopenharmony_ci
72c1d0c72aSopenharmony_ci      "Object" form shall mean any form resulting from mechanical
73c1d0c72aSopenharmony_ci      transformation or translation of a Source form, including but
74c1d0c72aSopenharmony_ci      not limited to compiled object code, generated documentation,
75c1d0c72aSopenharmony_ci      and conversions to other media types.
76c1d0c72aSopenharmony_ci
77c1d0c72aSopenharmony_ci      "Work" shall mean the work of authorship, whether in Source or
78c1d0c72aSopenharmony_ci      Object form, made available under the License, as indicated by a
79c1d0c72aSopenharmony_ci      copyright notice that is included in or attached to the work
80c1d0c72aSopenharmony_ci      (an example is provided in the Appendix below).
81c1d0c72aSopenharmony_ci
82c1d0c72aSopenharmony_ci      "Derivative Works" shall mean any work, whether in Source or Object
83c1d0c72aSopenharmony_ci      form, that is based on (or derived from) the Work and for which the
84c1d0c72aSopenharmony_ci      editorial revisions, annotations, elaborations, or other modifications
85c1d0c72aSopenharmony_ci      represent, as a whole, an original work of authorship. For the purposes
86c1d0c72aSopenharmony_ci      of this License, Derivative Works shall not include works that remain
87c1d0c72aSopenharmony_ci      separable from, or merely link (or bind by name) to the interfaces of,
88c1d0c72aSopenharmony_ci      the Work and Derivative Works thereof.
89c1d0c72aSopenharmony_ci
90c1d0c72aSopenharmony_ci      "Contribution" shall mean any work of authorship, including
91c1d0c72aSopenharmony_ci      the original version of the Work and any modifications or additions
92c1d0c72aSopenharmony_ci      to that Work or Derivative Works thereof, that is intentionally
93c1d0c72aSopenharmony_ci      submitted to Licensor for inclusion in the Work by the copyright owner
94c1d0c72aSopenharmony_ci      or by an individual or Legal Entity authorized to submit on behalf of
95c1d0c72aSopenharmony_ci      the copyright owner. For the purposes of this definition, "submitted"
96c1d0c72aSopenharmony_ci      means any form of electronic, verbal, or written communication sent
97c1d0c72aSopenharmony_ci      to the Licensor or its representatives, including but not limited to
98c1d0c72aSopenharmony_ci      communication on electronic mailing lists, source code control systems,
99c1d0c72aSopenharmony_ci      and issue tracking systems that are managed by, or on behalf of, the
100c1d0c72aSopenharmony_ci      Licensor for the purpose of discussing and improving the Work, but
101c1d0c72aSopenharmony_ci      excluding communication that is conspicuously marked or otherwise
102c1d0c72aSopenharmony_ci      designated in writing by the copyright owner as "Not a Contribution."
103c1d0c72aSopenharmony_ci
104c1d0c72aSopenharmony_ci      "Contributor" shall mean Licensor and any individual or Legal Entity
105c1d0c72aSopenharmony_ci      on behalf of whom a Contribution has been received by Licensor and
106c1d0c72aSopenharmony_ci      subsequently incorporated within the Work.
107c1d0c72aSopenharmony_ci
108c1d0c72aSopenharmony_ci   2. Grant of Copyright License. Subject to the terms and conditions of
109c1d0c72aSopenharmony_ci      this License, each Contributor hereby grants to You a perpetual,
110c1d0c72aSopenharmony_ci      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
111c1d0c72aSopenharmony_ci      copyright license to reproduce, prepare Derivative Works of,
112c1d0c72aSopenharmony_ci      publicly display, publicly perform, sublicense, and distribute the
113c1d0c72aSopenharmony_ci      Work and such Derivative Works in Source or Object form.
114c1d0c72aSopenharmony_ci
115c1d0c72aSopenharmony_ci   3. Grant of Patent License. Subject to the terms and conditions of
116c1d0c72aSopenharmony_ci      this License, each Contributor hereby grants to You a perpetual,
117c1d0c72aSopenharmony_ci      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
118c1d0c72aSopenharmony_ci      (except as stated in this section) patent license to make, have made,
119c1d0c72aSopenharmony_ci      use, offer to sell, sell, import, and otherwise transfer the Work,
120c1d0c72aSopenharmony_ci      where such license applies only to those patent claims licensable
121c1d0c72aSopenharmony_ci      by such Contributor that are necessarily infringed by their
122c1d0c72aSopenharmony_ci      Contribution(s) alone or by combination of their Contribution(s)
123c1d0c72aSopenharmony_ci      with the Work to which such Contribution(s) was submitted. If You
124c1d0c72aSopenharmony_ci      institute patent litigation against any entity (including a
125c1d0c72aSopenharmony_ci      cross-claim or counterclaim in a lawsuit) alleging that the Work
126c1d0c72aSopenharmony_ci      or a Contribution incorporated within the Work constitutes direct
127c1d0c72aSopenharmony_ci      or contributory patent infringement, then any patent licenses
128c1d0c72aSopenharmony_ci      granted to You under this License for that Work shall terminate
129c1d0c72aSopenharmony_ci      as of the date such litigation is filed.
130c1d0c72aSopenharmony_ci
131c1d0c72aSopenharmony_ci   4. Redistribution. You may reproduce and distribute copies of the
132c1d0c72aSopenharmony_ci      Work or Derivative Works thereof in any medium, with or without
133c1d0c72aSopenharmony_ci      modifications, and in Source or Object form, provided that You
134c1d0c72aSopenharmony_ci      meet the following conditions:
135c1d0c72aSopenharmony_ci
136c1d0c72aSopenharmony_ci      (a) You must give any other recipients of the Work or
137c1d0c72aSopenharmony_ci          Derivative Works a copy of this License; and
138c1d0c72aSopenharmony_ci
139c1d0c72aSopenharmony_ci      (b) You must cause any modified files to carry prominent notices
140c1d0c72aSopenharmony_ci          stating that You changed the files; and
141c1d0c72aSopenharmony_ci
142c1d0c72aSopenharmony_ci      (c) You must retain, in the Source form of any Derivative Works
143c1d0c72aSopenharmony_ci          that You distribute, all copyright, patent, trademark, and
144c1d0c72aSopenharmony_ci          attribution notices from the Source form of the Work,
145c1d0c72aSopenharmony_ci          excluding those notices that do not pertain to any part of
146c1d0c72aSopenharmony_ci          the Derivative Works; and
147c1d0c72aSopenharmony_ci
148c1d0c72aSopenharmony_ci      (d) If the Work includes a "NOTICE" text file as part of its
149c1d0c72aSopenharmony_ci          distribution, then any Derivative Works that You distribute must
150c1d0c72aSopenharmony_ci          include a readable copy of the attribution notices contained
151c1d0c72aSopenharmony_ci          within such NOTICE file, excluding those notices that do not
152c1d0c72aSopenharmony_ci          pertain to any part of the Derivative Works, in at least one
153c1d0c72aSopenharmony_ci          of the following places: within a NOTICE text file distributed
154c1d0c72aSopenharmony_ci          as part of the Derivative Works; within the Source form or
155c1d0c72aSopenharmony_ci          documentation, if provided along with the Derivative Works; or,
156c1d0c72aSopenharmony_ci          within a display generated by the Derivative Works, if and
157c1d0c72aSopenharmony_ci          wherever such third-party notices normally appear. The contents
158c1d0c72aSopenharmony_ci          of the NOTICE file are for informational purposes only and
159c1d0c72aSopenharmony_ci          do not modify the License. You may add Your own attribution
160c1d0c72aSopenharmony_ci          notices within Derivative Works that You distribute, alongside
161c1d0c72aSopenharmony_ci          or as an addendum to the NOTICE text from the Work, provided
162c1d0c72aSopenharmony_ci          that such additional attribution notices cannot be construed
163c1d0c72aSopenharmony_ci          as modifying the License.
164c1d0c72aSopenharmony_ci
165c1d0c72aSopenharmony_ci      You may add Your own copyright statement to Your modifications and
166c1d0c72aSopenharmony_ci      may provide additional or different license terms and conditions
167c1d0c72aSopenharmony_ci      for use, reproduction, or distribution of Your modifications, or
168c1d0c72aSopenharmony_ci      for any such Derivative Works as a whole, provided Your use,
169c1d0c72aSopenharmony_ci      reproduction, and distribution of the Work otherwise complies with
170c1d0c72aSopenharmony_ci      the conditions stated in this License.
171c1d0c72aSopenharmony_ci
172c1d0c72aSopenharmony_ci   5. Submission of Contributions. Unless You explicitly state otherwise,
173c1d0c72aSopenharmony_ci      any Contribution intentionally submitted for inclusion in the Work
174c1d0c72aSopenharmony_ci      by You to the Licensor shall be under the terms and conditions of
175c1d0c72aSopenharmony_ci      this License, without any additional terms or conditions.
176c1d0c72aSopenharmony_ci      Notwithstanding the above, nothing herein shall supersede or modify
177c1d0c72aSopenharmony_ci      the terms of any separate license agreement you may have executed
178c1d0c72aSopenharmony_ci      with Licensor regarding such Contributions.
179c1d0c72aSopenharmony_ci
180c1d0c72aSopenharmony_ci   6. Trademarks. This License does not grant permission to use the trade
181c1d0c72aSopenharmony_ci      names, trademarks, service marks, or product names of the Licensor,
182c1d0c72aSopenharmony_ci      except as required for reasonable and customary use in describing the
183c1d0c72aSopenharmony_ci      origin of the Work and reproducing the content of the NOTICE file.
184c1d0c72aSopenharmony_ci
185c1d0c72aSopenharmony_ci   7. Disclaimer of Warranty. Unless required by applicable law or
186c1d0c72aSopenharmony_ci      agreed to in writing, Licensor provides the Work (and each
187c1d0c72aSopenharmony_ci      Contributor provides its Contributions) on an "AS IS" BASIS,
188c1d0c72aSopenharmony_ci      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
189c1d0c72aSopenharmony_ci      implied, including, without limitation, any warranties or conditions
190c1d0c72aSopenharmony_ci      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
191c1d0c72aSopenharmony_ci      PARTICULAR PURPOSE. You are solely responsible for determining the
192c1d0c72aSopenharmony_ci      appropriateness of using or redistributing the Work and assume any
193c1d0c72aSopenharmony_ci      risks associated with Your exercise of permissions under this License.
194c1d0c72aSopenharmony_ci
195c1d0c72aSopenharmony_ci   8. Limitation of Liability. In no event and under no legal theory,
196c1d0c72aSopenharmony_ci      whether in tort (including negligence), contract, or otherwise,
197c1d0c72aSopenharmony_ci      unless required by applicable law (such as deliberate and grossly
198c1d0c72aSopenharmony_ci      negligent acts) or agreed to in writing, shall any Contributor be
199c1d0c72aSopenharmony_ci      liable to You for damages, including any direct, indirect, special,
200c1d0c72aSopenharmony_ci      incidental, or consequential damages of any character arising as a
201c1d0c72aSopenharmony_ci      result of this License or out of the use or inability to use the
202c1d0c72aSopenharmony_ci      Work (including but not limited to damages for loss of goodwill,
203c1d0c72aSopenharmony_ci      work stoppage, computer failure or malfunction, or any and all
204c1d0c72aSopenharmony_ci      other commercial damages or losses), even if such Contributor
205c1d0c72aSopenharmony_ci      has been advised of the possibility of such damages.
206c1d0c72aSopenharmony_ci
207c1d0c72aSopenharmony_ci   9. Accepting Warranty or Additional Liability. While redistributing
208c1d0c72aSopenharmony_ci      the Work or Derivative Works thereof, You may choose to offer,
209c1d0c72aSopenharmony_ci      and charge a fee for, acceptance of support, warranty, indemnity,
210c1d0c72aSopenharmony_ci      or other liability obligations and/or rights consistent with this
211c1d0c72aSopenharmony_ci      License. However, in accepting such obligations, You may act only
212c1d0c72aSopenharmony_ci      on Your own behalf and on Your sole responsibility, not on behalf
213c1d0c72aSopenharmony_ci      of any other Contributor, and only if You agree to indemnify,
214c1d0c72aSopenharmony_ci      defend, and hold each Contributor harmless for any liability
215c1d0c72aSopenharmony_ci      incurred by, or claims asserted against, such Contributor by reason
216c1d0c72aSopenharmony_ci      of your accepting any such warranty or additional liability.
217c1d0c72aSopenharmony_ci
218c1d0c72aSopenharmony_ci   END OF TERMS AND CONDITIONS
219c1d0c72aSopenharmony_ci
220c1d0c72aSopenharmony_cic) GNU General Public License version 2, (https://opensource.org/licenses/GPL-2.0)
221c1d0c72aSopenharmony_ciThis library is free software; you can redistribute it and/or
222c1d0c72aSopenharmony_cimodify it under the terms of the GNU General Public License as
223c1d0c72aSopenharmony_cipublished by the Free Software Foundation; either version 2 of the
224c1d0c72aSopenharmony_ciLicense, or (at your option) any later version.
225c1d0c72aSopenharmony_ci
226c1d0c72aSopenharmony_ciThis library is distributed in the hope that it will be useful,
227c1d0c72aSopenharmony_cibut WITHOUT ANY WARRANTY; without even the implied warranty of
228c1d0c72aSopenharmony_ciMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
229c1d0c72aSopenharmony_ciGNU General Public License for more details.
230c1d0c72aSopenharmony_ci
231c1d0c72aSopenharmony_ciYou should have received a copy of the GNU General Public
232c1d0c72aSopenharmony_ciLicense along with this library; if not, write to the Free
233c1d0c72aSopenharmony_ciSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
234c1d0c72aSopenharmony_ciMA 02110-1301 USA
235