diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/of.h | 12 | ||||
-rw-r--r-- | include/linux/of_device.h | 2 | ||||
-rw-r--r-- | include/linux/pata_platform.h | 9 | ||||
-rw-r--r-- | include/linux/phy_fixed.h | 51 | ||||
-rw-r--r-- | include/linux/pmu.h | 36 |
5 files changed, 44 insertions, 66 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 5c39b9270ff7..b5f33efcb8e2 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <linux/bitops.h> | 19 | #include <linux/bitops.h> |
20 | #include <linux/mod_devicetable.h> | ||
20 | 21 | ||
21 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
22 | 23 | ||
@@ -41,11 +42,20 @@ extern struct device_node *of_find_compatible_node(struct device_node *from, | |||
41 | #define for_each_compatible_node(dn, type, compatible) \ | 42 | #define for_each_compatible_node(dn, type, compatible) \ |
42 | for (dn = of_find_compatible_node(NULL, type, compatible); dn; \ | 43 | for (dn = of_find_compatible_node(NULL, type, compatible); dn; \ |
43 | dn = of_find_compatible_node(dn, type, compatible)) | 44 | dn = of_find_compatible_node(dn, type, compatible)) |
45 | extern struct device_node *of_find_matching_node(struct device_node *from, | ||
46 | const struct of_device_id *matches); | ||
47 | #define for_each_matching_node(dn, matches) \ | ||
48 | for (dn = of_find_matching_node(NULL, matches); dn; \ | ||
49 | dn = of_find_matching_node(dn, matches)) | ||
44 | extern struct device_node *of_find_node_by_path(const char *path); | 50 | extern struct device_node *of_find_node_by_path(const char *path); |
45 | extern struct device_node *of_find_node_by_phandle(phandle handle); | 51 | extern struct device_node *of_find_node_by_phandle(phandle handle); |
46 | extern struct device_node *of_get_parent(const struct device_node *node); | 52 | extern struct device_node *of_get_parent(const struct device_node *node); |
47 | extern struct device_node *of_get_next_child(const struct device_node *node, | 53 | extern struct device_node *of_get_next_child(const struct device_node *node, |
48 | struct device_node *prev); | 54 | struct device_node *prev); |
55 | #define for_each_child_of_node(parent, child) \ | ||
56 | for (child = of_get_next_child(parent, NULL); child != NULL; \ | ||
57 | child = of_get_next_child(parent, child)) | ||
58 | |||
49 | extern struct property *of_find_property(const struct device_node *np, | 59 | extern struct property *of_find_property(const struct device_node *np, |
50 | const char *name, | 60 | const char *name, |
51 | int *lenp); | 61 | int *lenp); |
@@ -56,5 +66,7 @@ extern const void *of_get_property(const struct device_node *node, | |||
56 | int *lenp); | 66 | int *lenp); |
57 | extern int of_n_addr_cells(struct device_node *np); | 67 | extern int of_n_addr_cells(struct device_node *np); |
58 | extern int of_n_size_cells(struct device_node *np); | 68 | extern int of_n_size_cells(struct device_node *np); |
69 | extern const struct of_device_id *of_match_node( | ||
70 | const struct of_device_id *matches, const struct device_node *node); | ||
59 | 71 | ||
60 | #endif /* _LINUX_OF_H */ | 72 | #endif /* _LINUX_OF_H */ |
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 212bffb2b174..6dc11959770c 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h | |||
@@ -10,8 +10,6 @@ | |||
10 | 10 | ||
11 | #define to_of_device(d) container_of(d, struct of_device, dev) | 11 | #define to_of_device(d) container_of(d, struct of_device, dev) |
12 | 12 | ||
13 | extern const struct of_device_id *of_match_node( | ||
14 | const struct of_device_id *matches, const struct device_node *node); | ||
15 | extern const struct of_device_id *of_match_device( | 13 | extern const struct of_device_id *of_match_device( |
16 | const struct of_device_id *matches, const struct of_device *dev); | 14 | const struct of_device_id *matches, const struct of_device *dev); |
17 | 15 | ||
diff --git a/include/linux/pata_platform.h b/include/linux/pata_platform.h index 5799e8d50623..6a7a92db294c 100644 --- a/include/linux/pata_platform.h +++ b/include/linux/pata_platform.h | |||
@@ -15,4 +15,13 @@ struct pata_platform_info { | |||
15 | unsigned int irq_flags; | 15 | unsigned int irq_flags; |
16 | }; | 16 | }; |
17 | 17 | ||
18 | extern int __devinit __pata_platform_probe(struct device *dev, | ||
19 | struct resource *io_res, | ||
20 | struct resource *ctl_res, | ||
21 | struct resource *irq_res, | ||
22 | unsigned int ioport_shift, | ||
23 | int __pio_mask); | ||
24 | |||
25 | extern int __devexit __pata_platform_remove(struct device *dev); | ||
26 | |||
18 | #endif /* __LINUX_PATA_PLATFORM_H */ | 27 | #endif /* __LINUX_PATA_PLATFORM_H */ |
diff --git a/include/linux/phy_fixed.h b/include/linux/phy_fixed.h index 04ba70d49fb8..509d8f5f984e 100644 --- a/include/linux/phy_fixed.h +++ b/include/linux/phy_fixed.h | |||
@@ -1,38 +1,31 @@ | |||
1 | #ifndef __PHY_FIXED_H | 1 | #ifndef __PHY_FIXED_H |
2 | #define __PHY_FIXED_H | 2 | #define __PHY_FIXED_H |
3 | 3 | ||
4 | #define MII_REGS_NUM 29 | ||
5 | |||
6 | /* max number of virtual phy stuff */ | ||
7 | #define MAX_PHY_AMNT 10 | ||
8 | /* | ||
9 | The idea is to emulate normal phy behavior by responding with | ||
10 | pre-defined values to mii BMCR read, so that read_status hook could | ||
11 | take all the needed info. | ||
12 | */ | ||
13 | |||
14 | struct fixed_phy_status { | 4 | struct fixed_phy_status { |
15 | u8 link; | 5 | int link; |
16 | u16 speed; | 6 | int speed; |
17 | u8 duplex; | 7 | int duplex; |
8 | int pause; | ||
9 | int asym_pause; | ||
18 | }; | 10 | }; |
19 | 11 | ||
20 | /*----------------------------------------------------------------------------- | 12 | #ifdef CONFIG_FIXED_PHY |
21 | * Private information hoder for mii_bus | 13 | extern int fixed_phy_add(unsigned int irq, int phy_id, |
22 | *-----------------------------------------------------------------------------*/ | 14 | struct fixed_phy_status *status); |
23 | struct fixed_info { | 15 | #else |
24 | u16 *regs; | 16 | static inline int fixed_phy_add(unsigned int irq, int phy_id, |
25 | u8 regs_num; | 17 | struct fixed_phy_status *status) |
26 | struct fixed_phy_status phy_status; | 18 | { |
27 | struct phy_device *phydev; /* pointer to the container */ | 19 | return -ENODEV; |
28 | /* link & speed cb */ | 20 | } |
29 | int (*link_update) (struct net_device *, struct fixed_phy_status *); | 21 | #endif /* CONFIG_FIXED_PHY */ |
30 | 22 | ||
31 | }; | 23 | /* |
32 | 24 | * This function issued only by fixed_phy-aware drivers, no need | |
33 | 25 | * protect it with #ifdef | |
34 | int fixed_mdio_set_link_update(struct phy_device *, | 26 | */ |
35 | int (*link_update) (struct net_device *, struct fixed_phy_status *)); | 27 | extern int fixed_phy_set_link_update(struct phy_device *phydev, |
36 | struct fixed_info *fixed_mdio_get_phydev (int phydev_ind); | 28 | int (*link_update)(struct net_device *, |
29 | struct fixed_phy_status *)); | ||
37 | 30 | ||
38 | #endif /* __PHY_FIXED_H */ | 31 | #endif /* __PHY_FIXED_H */ |
diff --git a/include/linux/pmu.h b/include/linux/pmu.h index b7824c215354..4c5f65392d36 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h | |||
@@ -159,41 +159,7 @@ extern void pmu_unlock(void); | |||
159 | extern int pmu_present(void); | 159 | extern int pmu_present(void); |
160 | extern int pmu_get_model(void); | 160 | extern int pmu_get_model(void); |
161 | 161 | ||
162 | #ifdef CONFIG_PM | 162 | extern void pmu_backlight_set_sleep(int sleep); |
163 | /* | ||
164 | * Stuff for putting the powerbook to sleep and waking it again. | ||
165 | * | ||
166 | */ | ||
167 | #include <linux/list.h> | ||
168 | |||
169 | struct pmu_sleep_notifier | ||
170 | { | ||
171 | void (*notifier_call)(struct pmu_sleep_notifier *self, int when); | ||
172 | int priority; | ||
173 | struct list_head list; | ||
174 | }; | ||
175 | |||
176 | /* Code values for calling sleep/wakeup handlers | ||
177 | */ | ||
178 | #define PBOOK_SLEEP_REQUEST 1 | ||
179 | #define PBOOK_SLEEP_NOW 2 | ||
180 | #define PBOOK_WAKE 3 | ||
181 | |||
182 | /* priority levels in notifiers */ | ||
183 | #define SLEEP_LEVEL_VIDEO 100 /* Video driver (first wake) */ | ||
184 | #define SLEEP_LEVEL_MEDIABAY 90 /* Media bay driver */ | ||
185 | #define SLEEP_LEVEL_BLOCK 80 /* IDE, SCSI */ | ||
186 | #define SLEEP_LEVEL_NET 70 /* bmac, gmac */ | ||
187 | #define SLEEP_LEVEL_MISC 60 /* Anything else */ | ||
188 | #define SLEEP_LEVEL_USERLAND 55 /* Reserved for apm_emu */ | ||
189 | #define SLEEP_LEVEL_ADB 50 /* ADB (async) */ | ||
190 | #define SLEEP_LEVEL_SOUND 40 /* Sound driver (blocking) */ | ||
191 | |||
192 | /* special register notifier functions */ | ||
193 | int pmu_register_sleep_notifier(struct pmu_sleep_notifier* notifier); | ||
194 | int pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* notifier); | ||
195 | |||
196 | #endif /* CONFIG_PM */ | ||
197 | 163 | ||
198 | #define PMU_MAX_BATTERIES 2 | 164 | #define PMU_MAX_BATTERIES 2 |
199 | 165 | ||