1#ifndef _CONFIG_DRIVER_H_
2#define _CONFIG_DRIVER_H_
3
4/* definitions for the /dev/misc/config driver which provides access
5 * to the device_manager via calls to ioctl().
6 */
7
8/* the magic is the ioctl */
9
10#define DM_GET_CHILD				'GCHI'
11#define DM_GET_NEXT_CHILD			'GNCH'
12#define DM_GET_PARENT				'GPAR'
13#define DM_GET_NEXT_ATTRIBUTE			'GNAT'
14#define DM_RETRIEVE_ATTRIBUTE			'RATT'
15
16struct dev_attr {
17	char		name[255];
18	type_code	type;
19	union {
20		uint8	ui8;
21		uint16	ui16;
22		uint32	ui32;
23		uint64	ui64;
24		char	string[255];
25		struct {
26			void	*data;
27			size_t	length;
28		} raw;
29	} value;
30};
31
32struct dm_ioctl_data {
33	uint32				magic;
34	struct dev_attr			*attr;
35};
36
37#define DM_DEVICE_NAME "misc/config"
38
39#endif	/* _CONFIG_DRIVER_H_ */
40