diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-17 12:24:04 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-17 12:24:04 -0400 |
| commit | ac1d426e825ab5778995f2f6f053ca2e6b45c622 (patch) | |
| tree | 75b91356ca39463e0112931aa6790802fb1e07a2 /drivers/base/platform.c | |
| parent | fda0e18c8a7a3e02747c2b045b4fcd2c920410b9 (diff) | |
| parent | a3685f00652af83f12b63e3b4ef48f29581ba48b (diff) | |
Merge branch 'devel-stable' into devel
Conflicts:
arch/arm/Kconfig
arch/arm/include/asm/system.h
arch/arm/mm/Kconfig
Diffstat (limited to 'drivers/base/platform.c')
| -rw-r--r-- | drivers/base/platform.c | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 1ba9d617d241..4b4b565c835f 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
| @@ -362,6 +362,8 @@ EXPORT_SYMBOL_GPL(platform_device_unregister); | |||
| 362 | * enumeration tasks, they don't fully conform to the Linux driver model. | 362 | * enumeration tasks, they don't fully conform to the Linux driver model. |
| 363 | * In particular, when such drivers are built as modules, they can't be | 363 | * In particular, when such drivers are built as modules, they can't be |
| 364 | * "hotplugged". | 364 | * "hotplugged". |
| 365 | * | ||
| 366 | * Returns &struct platform_device pointer on success, or ERR_PTR() on error. | ||
| 365 | */ | 367 | */ |
| 366 | struct platform_device *platform_device_register_simple(const char *name, | 368 | struct platform_device *platform_device_register_simple(const char *name, |
| 367 | int id, | 369 | int id, |
| @@ -408,6 +410,8 @@ EXPORT_SYMBOL_GPL(platform_device_register_simple); | |||
| 408 | * allocated for the device allows drivers using such devices to be | 410 | * allocated for the device allows drivers using such devices to be |
| 409 | * unloaded without waiting for the last reference to the device to be | 411 | * unloaded without waiting for the last reference to the device to be |
| 410 | * dropped. | 412 | * dropped. |
| 413 | * | ||
| 414 | * Returns &struct platform_device pointer on success, or ERR_PTR() on error. | ||
| 411 | */ | 415 | */ |
| 412 | struct platform_device *platform_device_register_data( | 416 | struct platform_device *platform_device_register_data( |
| 413 | struct device *parent, | 417 | struct device *parent, |
| @@ -559,6 +563,8 @@ EXPORT_SYMBOL_GPL(platform_driver_probe); | |||
| 559 | * | 563 | * |
| 560 | * Use this in legacy-style modules that probe hardware directly and | 564 | * Use this in legacy-style modules that probe hardware directly and |
| 561 | * register a single platform device and corresponding platform driver. | 565 | * register a single platform device and corresponding platform driver. |
| 566 | * | ||
| 567 | * Returns &struct platform_device pointer on success, or ERR_PTR() on error. | ||
| 562 | */ | 568 | */ |
| 563 | struct platform_device * __init_or_module platform_create_bundle( | 569 | struct platform_device * __init_or_module platform_create_bundle( |
| 564 | struct platform_driver *driver, | 570 | struct platform_driver *driver, |
| @@ -1052,9 +1058,11 @@ static __initdata LIST_HEAD(early_platform_driver_list); | |||
| 1052 | static __initdata LIST_HEAD(early_platform_device_list); | 1058 | static __initdata LIST_HEAD(early_platform_device_list); |
| 1053 | 1059 | ||
| 1054 | /** | 1060 | /** |
| 1055 | * early_platform_driver_register | 1061 | * early_platform_driver_register - register early platform driver |
| 1056 | * @epdrv: early_platform driver structure | 1062 | * @epdrv: early_platform driver structure |
| 1057 | * @buf: string passed from early_param() | 1063 | * @buf: string passed from early_param() |
| 1064 | * | ||
| 1065 | * Helper function for early_platform_init() / early_platform_init_buffer() | ||
| 1058 | */ | 1066 | */ |
| 1059 | int __init early_platform_driver_register(struct early_platform_driver *epdrv, | 1067 | int __init early_platform_driver_register(struct early_platform_driver *epdrv, |
| 1060 | char *buf) | 1068 | char *buf) |
| @@ -1106,9 +1114,12 @@ int __init early_platform_driver_register(struct early_platform_driver *epdrv, | |||
| 1106 | } | 1114 | } |
| 1107 | 1115 | ||
| 1108 | /** | 1116 | /** |
| 1109 | * early_platform_add_devices - add a numbers of early platform devices | 1117 | * early_platform_add_devices - adds a number of early platform devices |
| 1110 | * @devs: array of early platform devices to add | 1118 | * @devs: array of early platform devices to add |
| 1111 | * @num: number of early platform devices in array | 1119 | * @num: number of early platform devices in array |
| 1120 | * | ||
| 1121 | * Used by early architecture code to register early platform devices and | ||
| 1122 | * their platform data. | ||
| 1112 | */ | 1123 | */ |
| 1113 | void __init early_platform_add_devices(struct platform_device **devs, int num) | 1124 | void __init early_platform_add_devices(struct platform_device **devs, int num) |
| 1114 | { | 1125 | { |
| @@ -1128,8 +1139,12 @@ void __init early_platform_add_devices(struct platform_device **devs, int num) | |||
| 1128 | } | 1139 | } |
| 1129 | 1140 | ||
| 1130 | /** | 1141 | /** |
| 1131 | * early_platform_driver_register_all | 1142 | * early_platform_driver_register_all - register early platform drivers |
| 1132 | * @class_str: string to identify early platform driver class | 1143 | * @class_str: string to identify early platform driver class |
| 1144 | * | ||
| 1145 | * Used by architecture code to register all early platform drivers | ||
| 1146 | * for a certain class. If omitted then only early platform drivers | ||
| 1147 | * with matching kernel command line class parameters will be registered. | ||
| 1133 | */ | 1148 | */ |
| 1134 | void __init early_platform_driver_register_all(char *class_str) | 1149 | void __init early_platform_driver_register_all(char *class_str) |
| 1135 | { | 1150 | { |
| @@ -1151,7 +1166,7 @@ void __init early_platform_driver_register_all(char *class_str) | |||
| 1151 | } | 1166 | } |
| 1152 | 1167 | ||
| 1153 | /** | 1168 | /** |
| 1154 | * early_platform_match | 1169 | * early_platform_match - find early platform device matching driver |
| 1155 | * @epdrv: early platform driver structure | 1170 | * @epdrv: early platform driver structure |
| 1156 | * @id: id to match against | 1171 | * @id: id to match against |
| 1157 | */ | 1172 | */ |
| @@ -1169,7 +1184,7 @@ early_platform_match(struct early_platform_driver *epdrv, int id) | |||
| 1169 | } | 1184 | } |
| 1170 | 1185 | ||
| 1171 | /** | 1186 | /** |
| 1172 | * early_platform_left | 1187 | * early_platform_left - check if early platform driver has matching devices |
| 1173 | * @epdrv: early platform driver structure | 1188 | * @epdrv: early platform driver structure |
| 1174 | * @id: return true if id or above exists | 1189 | * @id: return true if id or above exists |
| 1175 | */ | 1190 | */ |
| @@ -1187,7 +1202,7 @@ static __init int early_platform_left(struct early_platform_driver *epdrv, | |||
| 1187 | } | 1202 | } |
| 1188 | 1203 | ||
| 1189 | /** | 1204 | /** |
| 1190 | * early_platform_driver_probe_id | 1205 | * early_platform_driver_probe_id - probe drivers matching class_str and id |
| 1191 | * @class_str: string to identify early platform driver class | 1206 | * @class_str: string to identify early platform driver class |
| 1192 | * @id: id to match against | 1207 | * @id: id to match against |
| 1193 | * @nr_probe: number of platform devices to successfully probe before exiting | 1208 | * @nr_probe: number of platform devices to successfully probe before exiting |
| @@ -1257,10 +1272,14 @@ static int __init early_platform_driver_probe_id(char *class_str, | |||
| 1257 | } | 1272 | } |
| 1258 | 1273 | ||
| 1259 | /** | 1274 | /** |
| 1260 | * early_platform_driver_probe | 1275 | * early_platform_driver_probe - probe a class of registered drivers |
| 1261 | * @class_str: string to identify early platform driver class | 1276 | * @class_str: string to identify early platform driver class |
| 1262 | * @nr_probe: number of platform devices to successfully probe before exiting | 1277 | * @nr_probe: number of platform devices to successfully probe before exiting |
| 1263 | * @user_only: only probe user specified early platform devices | 1278 | * @user_only: only probe user specified early platform devices |
| 1279 | * | ||
| 1280 | * Used by architecture code to probe registered early platform drivers | ||
| 1281 | * within a certain class. For probe to happen a registered early platform | ||
| 1282 | * device matching a registered early platform driver is needed. | ||
| 1264 | */ | 1283 | */ |
| 1265 | int __init early_platform_driver_probe(char *class_str, | 1284 | int __init early_platform_driver_probe(char *class_str, |
| 1266 | int nr_probe, | 1285 | int nr_probe, |
