aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/enclosure.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/enclosure.h')
-rw-r--r--include/linux/enclosure.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/enclosure.h b/include/linux/enclosure.h
index 9a33c5f7e126..7be22da321f3 100644
--- a/include/linux/enclosure.h
+++ b/include/linux/enclosure.h
@@ -79,6 +79,12 @@ struct enclosure_component_callbacks {
79 int (*set_locate)(struct enclosure_device *, 79 int (*set_locate)(struct enclosure_device *,
80 struct enclosure_component *, 80 struct enclosure_component *,
81 enum enclosure_component_setting); 81 enum enclosure_component_setting);
82 void (*get_power_status)(struct enclosure_device *,
83 struct enclosure_component *);
84 int (*set_power_status)(struct enclosure_device *,
85 struct enclosure_component *,
86 int);
87 int (*show_id)(struct enclosure_device *, char *buf);
82}; 88};
83 89
84 90
@@ -91,7 +97,9 @@ struct enclosure_component {
91 int fault; 97 int fault;
92 int active; 98 int active;
93 int locate; 99 int locate;
100 int slot;
94 enum enclosure_status status; 101 enum enclosure_status status;
102 int power_status;
95}; 103};
96 104
97struct enclosure_device { 105struct enclosure_device {
@@ -120,8 +128,9 @@ enclosure_register(struct device *, const char *, int,
120 struct enclosure_component_callbacks *); 128 struct enclosure_component_callbacks *);
121void enclosure_unregister(struct enclosure_device *); 129void enclosure_unregister(struct enclosure_device *);
122struct enclosure_component * 130struct enclosure_component *
123enclosure_component_register(struct enclosure_device *, unsigned int, 131enclosure_component_alloc(struct enclosure_device *, unsigned int,
124 enum enclosure_component_type, const char *); 132 enum enclosure_component_type, const char *);
133int enclosure_component_register(struct enclosure_component *);
125int enclosure_add_device(struct enclosure_device *enclosure, int component, 134int enclosure_add_device(struct enclosure_device *enclosure, int component,
126 struct device *dev); 135 struct device *dev);
127int enclosure_remove_device(struct enclosure_device *, struct device *); 136int enclosure_remove_device(struct enclosure_device *, struct device *);