18c2ecf20Sopenharmony_ci#ifndef _HFI1_DEVICE_H 28c2ecf20Sopenharmony_ci#define _HFI1_DEVICE_H 38c2ecf20Sopenharmony_ci/* 48c2ecf20Sopenharmony_ci * Copyright(c) 2015, 2016 Intel Corporation. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This file is provided under a dual BSD/GPLv2 license. When using or 78c2ecf20Sopenharmony_ci * redistributing this file, you may do so under either license. 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * GPL LICENSE SUMMARY 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify 128c2ecf20Sopenharmony_ci * it under the terms of version 2 of the GNU General Public License as 138c2ecf20Sopenharmony_ci * published by the Free Software Foundation. 148c2ecf20Sopenharmony_ci * 158c2ecf20Sopenharmony_ci * This program is distributed in the hope that it will be useful, but 168c2ecf20Sopenharmony_ci * WITHOUT ANY WARRANTY; without even the implied warranty of 178c2ecf20Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 188c2ecf20Sopenharmony_ci * General Public License for more details. 198c2ecf20Sopenharmony_ci * 208c2ecf20Sopenharmony_ci * BSD LICENSE 218c2ecf20Sopenharmony_ci * 228c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or without 238c2ecf20Sopenharmony_ci * modification, are permitted provided that the following conditions 248c2ecf20Sopenharmony_ci * are met: 258c2ecf20Sopenharmony_ci * 268c2ecf20Sopenharmony_ci * - Redistributions of source code must retain the above copyright 278c2ecf20Sopenharmony_ci * notice, this list of conditions and the following disclaimer. 288c2ecf20Sopenharmony_ci * - Redistributions in binary form must reproduce the above copyright 298c2ecf20Sopenharmony_ci * notice, this list of conditions and the following disclaimer in 308c2ecf20Sopenharmony_ci * the documentation and/or other materials provided with the 318c2ecf20Sopenharmony_ci * distribution. 328c2ecf20Sopenharmony_ci * - Neither the name of Intel Corporation nor the names of its 338c2ecf20Sopenharmony_ci * contributors may be used to endorse or promote products derived 348c2ecf20Sopenharmony_ci * from this software without specific prior written permission. 358c2ecf20Sopenharmony_ci * 368c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 378c2ecf20Sopenharmony_ci * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 388c2ecf20Sopenharmony_ci * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 398c2ecf20Sopenharmony_ci * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 408c2ecf20Sopenharmony_ci * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 418c2ecf20Sopenharmony_ci * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 428c2ecf20Sopenharmony_ci * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 438c2ecf20Sopenharmony_ci * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 448c2ecf20Sopenharmony_ci * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 458c2ecf20Sopenharmony_ci * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 468c2ecf20Sopenharmony_ci * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 478c2ecf20Sopenharmony_ci * 488c2ecf20Sopenharmony_ci */ 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ciint hfi1_cdev_init(int minor, const char *name, 518c2ecf20Sopenharmony_ci const struct file_operations *fops, 528c2ecf20Sopenharmony_ci struct cdev *cdev, struct device **devp, 538c2ecf20Sopenharmony_ci bool user_accessible, 548c2ecf20Sopenharmony_ci struct kobject *parent); 558c2ecf20Sopenharmony_civoid hfi1_cdev_cleanup(struct cdev *cdev, struct device **devp); 568c2ecf20Sopenharmony_ciconst char *class_name(void); 578c2ecf20Sopenharmony_ciint __init dev_init(void); 588c2ecf20Sopenharmony_civoid dev_cleanup(void); 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci#endif /* _HFI1_DEVICE_H */ 61