blob: 7a4913d4607cb66a5bd3079ca14d7a1bf7a8737b [file] [log] [blame]
Satya Durga Srinivasu Prabhalab8a2a4e2017-03-14 16:51:50 -07001/* Copyright (c) 2014, 2017, The Linux Foundation. All rights reserved.
Abhimanyu Kapurc75b2e12016-02-22 18:15:13 -08002 *
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;
Satya Durga Srinivasu Prabhalab8a2a4e2017-03-14 16:51:50 -070027 const char *link_info;
Abhimanyu Kapurc75b2e12016-02-22 18:15:13 -080028 void *priv;
29};
30
31#ifdef CONFIG_ESOC_CLIENT
32/* Can return probe deferral */
33struct esoc_desc *devm_register_esoc_client(struct device *dev,
34 const char *name);
35void devm_unregister_esoc_client(struct device *dev,
36 struct esoc_desc *esoc_desc);
37int esoc_register_client_notifier(struct notifier_block *nb);
38#else
39static inline struct esoc_desc *devm_register_esoc_client(struct device *dev,
40 const char *name)
41{
42 return NULL;
43}
44static inline void devm_unregister_esoc_client(struct device *dev,
45 struct esoc_desc *esoc_desc)
46{
47}
48static inline int esoc_register_client_notifier(struct notifier_block *nb)
49{
50 return -EIO;
51}
52#endif
53#endif