OSDN Git Service

lz4: fix wrong compress buffer size for 64-bits
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / include / linux / esoc_client.h
1 /* Copyright (c) 2014, 2017, The Linux Foundation. All rights reserved.
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License version 2 and
5  * only version 2 as published by the Free Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  */
12 #ifndef __ESOC_CLIENT_H_
13 #define __ESOC_CLIENT_H_
14
15 #include <linux/device.h>
16 #include <linux/esoc_ctrl.h>
17 #include <linux/notifier.h>
18
19 /*
20  * struct esoc_desc: Describes an external soc
21  * @name: external soc name
22  * @priv: private data for external soc
23  */
24 struct esoc_desc {
25         const char *name;
26         const char *link;
27         const char *link_info;
28         void *priv;
29 };
30
31 #ifdef CONFIG_ESOC_CLIENT
32 /* Can return probe deferral */
33 struct esoc_desc *devm_register_esoc_client(struct device *dev,
34                                                         const char *name);
35 void devm_unregister_esoc_client(struct device *dev,
36                                                 struct esoc_desc *esoc_desc);
37 int esoc_register_client_notifier(struct notifier_block *nb);
38 #else
39 static inline struct esoc_desc *devm_register_esoc_client(struct device *dev,
40                                                         const char *name)
41 {
42         return NULL;
43 }
44 static inline void devm_unregister_esoc_client(struct device *dev,
45                                                 struct esoc_desc *esoc_desc)
46 {
47         return;
48 }
49 static inline int esoc_register_client_notifier(struct notifier_block *nb)
50 {
51         return -EIO;
52 }
53 #endif
54 #endif