a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/*
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Copyright © 2012 Red Hat.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Permission is hereby granted, free of charge, to any person obtaining a
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * copy of this software and associated documentation files (the "Software"),
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * to deal in the Software without restriction, including without limitation
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * and/or sell copies of the Software, and to permit persons to whom the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Software is furnished to do so, subject to the following conditions:
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * The above copyright notice and this permission notice shall be included in
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * all copies or substantial portions of the Software.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * DEALINGS IN THE SOFTWARE.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Author: Dave Airlie <airlied@redhat.com>
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#ifndef XF86_PLATFORM_BUS_H
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define XF86_PLATFORM_BUS_H
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#include "hotplug.h"
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncstruct xf86_platform_device {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync struct OdevAttributes *attribs;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync /* for PCI devices */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync struct pci_device *pdev;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync};
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#ifdef XSERVER_PLATFORM_BUS
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncint xf86platformProbe(void);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncint xf86platformProbeDev(DriverPtr drvp);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern int xf86_num_platform_devices;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern char *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncxf86_get_platform_attrib(int index, int attrib_id);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern int
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncxf86_add_platform_device(struct OdevAttributes *attribs);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern int
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncxf86_remove_platform_device(int dev_index);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern Bool
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncxf86_add_platform_device_attrib(int index, int attrib_id, char *attrib_str);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern int
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncxf86platformAddDevice(int index);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncxf86platformRemoveDevice(int index);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern _X_EXPORT char *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncxf86_get_platform_device_attrib(struct xf86_platform_device *device, int attrib_id);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern _X_EXPORT Bool
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncxf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *busid);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern _X_EXPORT int
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncxf86PlatformMatchDriver(char *matches[], int nmatches);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#endif
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#endif