• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeutils
  • Sitemap
  • Contact Us
 

klaptopdaemon

driver_ops.h

Go to the documentation of this file.
00001 /*
00002  * driver_ops.h 1.11 1998/11/18 07:01:50
00003  *
00004  * The contents of this file are subject to the Mozilla Public License
00005  * Version 1.0 (the "License"); you may not use this file except in
00006  * compliance with the License. You may obtain a copy of the License
00007  * at http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS"
00010  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00011  * the License for the specific language governing rights and
00012  * limitations under the License. 
00013  *
00014  * The initial developer of the original code is David A. Hinds
00015  * <dhinds@hyper.stanford.edu>.  Portions created by David A. Hinds
00016  * are Copyright (C) 1998 David A. Hinds.  All Rights Reserved.
00017  */
00018 
00019 #ifndef _LINUX_DRIVER_OPS_H
00020 #define _LINUX_DRIVER_OPS_H
00021 
00022 #ifndef DEV_NAME_LEN
00023 #define DEV_NAME_LEN    32
00024 #endif
00025 
00026 #ifdef __KERNEL__
00027 
00028 typedef struct dev_node_t {
00029     char        dev_name[DEV_NAME_LEN];
00030     u_short     major, minor;
00031     struct dev_node_t   *next;
00032 } dev_node_t;
00033 
00034 typedef struct dev_locator_t {
00035     enum { LOC_ISA, LOC_PCI } bus;
00036     union {
00037     struct {
00038         u_short io_base_1, io_base_2;
00039         u_long  mem_base;
00040         u_char  irq, dma;
00041     } isa;
00042     struct {
00043         u_char  bus;
00044         u_char  devfn;
00045     } pci;
00046     } b;
00047 } dev_locator_t;
00048 
00049 typedef struct driver_operations {
00050     char        *name;
00051     dev_node_t      *(*attach) (dev_locator_t *loc);
00052     void        (*suspend) (dev_node_t *dev);
00053     void        (*resume) (dev_node_t *dev);
00054     void        (*detach) (dev_node_t *dev);
00055 } driver_operations;
00056 
00057 int register_driver(struct driver_operations *ops);
00058 void unregister_driver(struct driver_operations *ops);
00059 
00060 #ifdef __BEOS__
00061 #define CB_ENABLER_MODULE_NAME  "bus_managers/cb_enabler/v1"
00062 typedef struct cb_enabler_module_info {
00063     bus_manager_info    binfo;
00064     int (*register_driver)(struct driver_operations *ops);
00065     void (*unregister_driver)(struct driver_operations *ops);
00066 } cb_enabler_module_info;
00067 #endif /* __BEOS__ */
00068 
00069 #endif /* __KERNEL__ */
00070 
00071 #endif /* _LINUX_DRIVER_OPS_H */

klaptopdaemon

Skip menu "klaptopdaemon"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal