blob: 77a8b50a5baf1e5e00caca8f939f807273206f71 [file] [log] [blame]
Abhimanyu Kapurc75b2e12016-02-22 18:15:13 -08001/* Copyright (c) 2014, 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 */
24struct esoc_desc {
25 const char *name;
26 const char *link;
27 void *priv;
28};
29
30#ifdef CONFIG_ESOC_CLIENT
31/* Can return probe deferral */
32struct esoc_desc *devm_register_esoc_client(struct device *dev,
33 const char *name);
34void devm_unregister_esoc_client(struct device *dev,
35 struct esoc_desc *esoc_desc);
36int esoc_register_client_notifier(struct notifier_block *nb);
37#else
38static inline struct esoc_desc *devm_register_esoc_client(struct device *dev,
39 const char *name)
40{
41 return NULL;
42}
43static inline void devm_unregister_esoc_client(struct device *dev,
44 struct esoc_desc *esoc_desc)
45{
46}
47static inline int esoc_register_client_notifier(struct notifier_block *nb)
48{
49 return -EIO;
50}
51#endif
52#endif