1 /* 2 * Copyright (C) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 #ifndef _HIMEDIA_BASE_H_ 19 #define _HIMEDIA_BASE_H_ 20 21 #include "himedia.h" 22 23 // bus 24 int himedia_bus_init(void); 25 void himedia_bus_exit(void); 26 27 // device 28 int himedia_device_register(pm_basedev *pdev); 29 void himedia_device_unregister(pm_basedev *pdev); 30 int himedia_device_add(pm_basedev *pdev); 31 void himedia_device_del(pm_basedev *pdev); 32 void himedia_device_put(pm_basedev *pdev); 33 pm_basedev *himedia_device_alloc(const char *name, int id); 34 35 // driver 36 int himedia_driver_register(pm_basedrv *drv); 37 void himedia_driver_unregister(pm_basedrv *drv); 38 void himedia_driver_release(pm_basedrv *drv); 39 pm_basedrv *himedia_driver_alloc(const char *name, struct module *owner, 40 pm_baseops *ops); 41 42 #endif 43