Subversion Repositories Kolibri OS

Rev

Rev 1408 | Rev 1970 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1408 Rev 1412
Line 1... Line 1...
1
#ifndef _LINUX_FIRMWARE_H
1
#ifndef _LINUX_FIRMWARE_H
2
#define _LINUX_FIRMWARE_H
2
#define _LINUX_FIRMWARE_H
Line 3... Line -...
3
 
-
 
4
#include 
3
 
5
#include 
4
#include 
-
 
5
#include 
-
 
6
#include 
Line 6... Line 7...
6
//#include 
7
#include 
7
 
8
 
Line -... Line 9...
-
 
9
#define FW_ACTION_NOHOTPLUG 0
-
 
10
#define FW_ACTION_HOTPLUG 1
-
 
11
 
-
 
12
struct device;
-
 
13
 
-
 
14
struct platform_device
-
 
15
{
8
#define FW_ACTION_NOHOTPLUG 0
16
	struct device dev;
9
#define FW_ACTION_HOTPLUG 1
17
};
10
 
18
 
11
struct firmware {
19
struct firmware {
Line 12... Line -...
12
	size_t size;
-
 
Line 13... Line 20...
13
	const u8 *data;
20
	size_t size;
14
};
21
	const u8 *data;
15
 
22
};
16
struct device;
23
 
Line 31... Line 38...
31
 
38
 
32
#define DECLARE_BUILTIN_FIRMWARE_SIZE(name, blob, size)			     \
39
#define DECLARE_BUILTIN_FIRMWARE_SIZE(name, blob, size)			     \
33
	static const struct builtin_fw __fw_concat(__builtin_fw,__COUNTER__) \
40
	static const struct builtin_fw __fw_concat(__builtin_fw,__COUNTER__) \
Line 34... Line -...
34
	__used __section(.builtin_fw) = { name, blob, size }
-
 
35
 
41
	__used __section(.builtin_fw) = { name, blob, size }
36
#if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE))
42
 
37
int request_firmware(const struct firmware **fw, const char *name,
43
int request_firmware(const struct firmware **fw, const char *name,
38
		     struct device *device);
44
		     struct device *device);
39
int request_firmware_nowait(
45
int request_firmware_nowait(
40
	struct module *module, int uevent,
46
	struct module *module, int uevent,
Line 41... Line 47...
41
	const char *name, struct device *device, void *context,
47
	const char *name, struct device *device, void *context,
42
	void (*cont)(const struct firmware *fw, void *context));
-
 
43
 
-
 
44
void release_firmware(const struct firmware *fw);
-
 
45
#else
-
 
46
static inline int request_firmware(const struct firmware **fw,
-
 
47
				   const char *name,
-
 
48
				   struct device *device)
-
 
49
{
-
 
50
	return -EINVAL;
-
 
51
}
-
 
52
static inline int request_firmware_nowait(
-
 
53
	struct module *module, int uevent,
-
 
54
	const char *name, struct device *device, void *context,
-
 
55
	void (*cont)(const struct firmware *fw, void *context))
-
 
Line -... Line 48...
-
 
48
	void (*cont)(const struct firmware *fw, void *context));
-
 
49
 
-
 
50
void release_firmware(const struct firmware *fw);
-
 
51
 
-
 
52
 
-
 
53
#define platform_device_unregister(x)
-
 
54
 
-
 
55
struct platform_device
-
 
56
       *platform_device_register_simple(const char*, int, void*, unsigned int);
-
 
57
 
56
{
58
#define MAX_ERRNO   4095
57
	return -EINVAL;
59
 
-
 
60
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
58
}
61
 
59
 
-
 
Line 60... Line 62...
60
static inline void release_firmware(const struct firmware *fw)
62
static inline long IS_ERR(const void *ptr)