vserver 1.9.5.x5
[linux-2.6.git] / include / linux / device.h
index 4bb694c..786e159 100644 (file)
@@ -61,7 +61,7 @@ struct bus_type {
        int             (*match)(struct device * dev, struct device_driver * drv);
        int             (*hotplug) (struct device *dev, char **envp, 
                                    int num_envp, char *buffer, int buffer_size);
-       int             (*suspend)(struct device * dev, u32 state);
+       int             (*suspend)(struct device * dev, pm_message_t state);
        int             (*resume)(struct device * dev);
 };
 
@@ -106,6 +106,8 @@ struct device_driver {
        struct kobject          kobj;
        struct list_head        devices;
 
+       struct module           * owner;
+
        int     (*probe)        (struct device * dev);
        int     (*remove)       (struct device * dev);
        void    (*shutdown)     (struct device * dev);
@@ -226,7 +228,10 @@ extern int class_device_create_file(struct class_device *,
                                    const struct class_device_attribute *);
 extern void class_device_remove_file(struct class_device *, 
                                     const struct class_device_attribute *);
-
+extern int class_device_create_bin_file(struct class_device *,
+                                       struct bin_attribute *);
+extern void class_device_remove_bin_file(struct class_device *,
+                                        struct bin_attribute *);
 
 struct class_interface {
        struct list_head        node;
@@ -266,12 +271,7 @@ struct device {
        void            *platform_data; /* Platform specific data (e.g. ACPI,
                                           BIOS data relevant to device) */
        struct dev_pm_info      power;
-       u32             power_state;    /* Current operating state. In
-                                          ACPI-speak, this is D0-D3, D0
-                                          being fully functional, and D3
-                                          being off. */
 
-       unsigned char *saved_state;     /* saved device state */
        u32             detach_state;   /* State to enter when device is
                                           detached from its driver. */
 
@@ -320,11 +320,13 @@ extern int device_for_each_child(struct device *, void *,
                     int (*fn)(struct device *, void *));
 
 /*
- * Manual binding of a device to driver. See drivers/base/bus.c 
+ * Manual binding of a device to driver. See drivers/base/bus.c
  * for information on use.
  */
+extern int  driver_probe_device(struct device_driver * drv, struct device * dev);
 extern void device_bind_driver(struct device * dev);
 extern void device_release_driver(struct device * dev);
+extern int  device_attach(struct device * dev);
 extern void driver_attach(struct device_driver * drv);
 
 
@@ -383,6 +385,8 @@ extern struct device platform_bus;
 
 extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int);
 extern int platform_get_irq(struct platform_device *, unsigned int);
+extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, char *);
+extern int platform_get_irq_byname(struct platform_device *, char *);
 extern int platform_add_devices(struct platform_device **, int);
 
 extern struct platform_device *platform_device_register_simple(char *, unsigned int, struct resource *, unsigned int);