2014-03-04 06:58:07 -07:00
|
|
|
/* visorchipset.h
|
|
|
|
*
|
2015-07-16 10:40:48 -06:00
|
|
|
* Copyright (C) 2010 - 2015 UNISYS CORPORATION
|
2014-03-04 06:58:07 -07:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
2015-07-16 10:40:48 -06:00
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms and conditions of the GNU General Public License,
|
|
|
|
* version 2, as published by the Free Software Foundation.
|
2014-03-04 06:58:07 -07:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
|
|
|
|
* NON INFRINGEMENT. See the GNU General Public License for more
|
|
|
|
* details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VISORCHIPSET_H__
|
|
|
|
#define __VISORCHIPSET_H__
|
|
|
|
|
2014-05-06 07:58:23 -06:00
|
|
|
#include <linux/uuid.h>
|
|
|
|
|
2014-03-04 06:58:07 -07:00
|
|
|
#include "controlvmchannel.h"
|
|
|
|
#include "vbusdeviceinfo.h"
|
|
|
|
#include "vbushelper.h"
|
|
|
|
|
|
|
|
/* These functions will be called from within visorchipset when certain
|
|
|
|
* events happen. (The implementation of these functions is outside of
|
|
|
|
* visorchipset.)
|
|
|
|
*/
|
2014-10-31 07:57:32 -06:00
|
|
|
struct visorchipset_busdev_notifiers {
|
2015-06-04 07:22:41 -06:00
|
|
|
void (*bus_create)(struct visor_device *bus_info);
|
|
|
|
void (*bus_destroy)(struct visor_device *bus_info);
|
2015-06-04 07:22:42 -06:00
|
|
|
void (*device_create)(struct visor_device *bus_info);
|
|
|
|
void (*device_destroy)(struct visor_device *bus_info);
|
|
|
|
void (*device_pause)(struct visor_device *bus_info);
|
|
|
|
void (*device_resume)(struct visor_device *bus_info);
|
2014-10-31 07:57:32 -06:00
|
|
|
};
|
2014-03-04 06:58:07 -07:00
|
|
|
|
|
|
|
/* These functions live inside visorchipset, and will be called to indicate
|
|
|
|
* responses to specific events (by code outside of visorchipset).
|
|
|
|
* For now, the value for each response is simply either:
|
|
|
|
* 0 = it worked
|
|
|
|
* -1 = it failed
|
|
|
|
*/
|
2014-10-31 07:57:33 -06:00
|
|
|
struct visorchipset_busdev_responders {
|
2015-06-04 07:22:41 -06:00
|
|
|
void (*bus_create)(struct visor_device *p, int response);
|
|
|
|
void (*bus_destroy)(struct visor_device *p, int response);
|
2015-06-04 07:22:42 -06:00
|
|
|
void (*device_create)(struct visor_device *p, int response);
|
|
|
|
void (*device_destroy)(struct visor_device *p, int response);
|
|
|
|
void (*device_pause)(struct visor_device *p, int response);
|
|
|
|
void (*device_resume)(struct visor_device *p, int response);
|
2014-10-31 07:57:33 -06:00
|
|
|
};
|
2014-03-04 06:58:07 -07:00
|
|
|
|
|
|
|
/** Register functions (in the bus driver) to get called by visorchipset
|
2015-05-05 16:36:39 -06:00
|
|
|
* whenever a bus or device appears for which this guest is to be the
|
|
|
|
* client for. visorchipset will fill in <responders>, to indicate
|
|
|
|
* functions the bus driver should call to indicate message responses.
|
2014-03-04 06:58:07 -07:00
|
|
|
*/
|
|
|
|
void
|
2015-05-05 16:36:39 -06:00
|
|
|
visorchipset_register_busdev(
|
2014-10-31 07:57:32 -06:00
|
|
|
struct visorchipset_busdev_notifiers *notifiers,
|
2014-10-31 07:57:33 -06:00
|
|
|
struct visorchipset_busdev_responders *responders,
|
2014-10-31 07:57:35 -06:00
|
|
|
struct ultra_vbus_deviceinfo *driver_info);
|
2014-03-04 06:58:07 -07:00
|
|
|
|
2015-05-05 16:36:15 -06:00
|
|
|
/* visorbus init and exit functions */
|
2015-05-05 16:37:02 -06:00
|
|
|
int visorbus_init(void);
|
2015-05-05 16:36:15 -06:00
|
|
|
void visorbus_exit(void);
|
2014-03-04 06:58:07 -07:00
|
|
|
#endif
|