staging: unisys: Convert device creation to use visor_device
[deliverable/linux.git] / drivers / staging / unisys / visorbus / visorbus_private.h
CommitLineData
12e364b9
KC
1/* visorchipset.h
2 *
f6d0c1e6 3 * Copyright (C) 2010 - 2013 UNISYS CORPORATION
12e364b9
KC
4 * All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or (at
9 * your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
14 * NON INFRINGEMENT. See the GNU General Public License for more
15 * details.
16 */
17
18#ifndef __VISORCHIPSET_H__
19#define __VISORCHIPSET_H__
20
90addb02
BR
21#include <linux/uuid.h>
22
12e364b9 23#include "controlvmchannel.h"
12e364b9
KC
24#include "vbusdeviceinfo.h"
25#include "vbushelper.h"
26
12e364b9
KC
27/* These functions will be called from within visorchipset when certain
28 * events happen. (The implementation of these functions is outside of
29 * visorchipset.)
30 */
fe90d892 31struct visorchipset_busdev_notifiers {
d32517e3
DZ
32 void (*bus_create)(struct visor_device *bus_info);
33 void (*bus_destroy)(struct visor_device *bus_info);
a298bc0b
DZ
34 void (*device_create)(struct visor_device *bus_info);
35 void (*device_destroy)(struct visor_device *bus_info);
36 void (*device_pause)(struct visor_device *bus_info);
37 void (*device_resume)(struct visor_device *bus_info);
fe90d892 38};
12e364b9
KC
39
40/* These functions live inside visorchipset, and will be called to indicate
41 * responses to specific events (by code outside of visorchipset).
42 * For now, the value for each response is simply either:
43 * 0 = it worked
44 * -1 = it failed
45 */
929aa8ae 46struct visorchipset_busdev_responders {
d32517e3
DZ
47 void (*bus_create)(struct visor_device *p, int response);
48 void (*bus_destroy)(struct visor_device *p, int response);
a298bc0b
DZ
49 void (*device_create)(struct visor_device *p, int response);
50 void (*device_destroy)(struct visor_device *p, int response);
51 void (*device_pause)(struct visor_device *p, int response);
52 void (*device_resume)(struct visor_device *p, int response);
929aa8ae 53};
12e364b9 54
12e364b9 55/** Register functions (in the bus driver) to get called by visorchipset
4da3336c
DK
56 * whenever a bus or device appears for which this guest is to be the
57 * client for. visorchipset will fill in <responders>, to indicate
58 * functions the bus driver should call to indicate message responses.
12e364b9
KC
59 */
60void
4da3336c 61visorchipset_register_busdev(
fe90d892 62 struct visorchipset_busdev_notifiers *notifiers,
929aa8ae 63 struct visorchipset_busdev_responders *responders,
1e7a59c1 64 struct ultra_vbus_deviceinfo *driver_info);
12e364b9 65
c79b28f7 66/* visorbus init and exit functions */
55c67dca 67int visorbus_init(void);
c79b28f7 68void visorbus_exit(void);
12e364b9 69#endif
This page took 0.22936 seconds and 5 git commands to generate.