diff options
Diffstat (limited to 'arch/arm/mach-mxs/devices/platform-mxs-pwm.c')
-rw-r--r-- | arch/arm/mach-mxs/devices/platform-mxs-pwm.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-mxs/devices/platform-mxs-pwm.c b/arch/arm/mach-mxs/devices/platform-mxs-pwm.c new file mode 100644 index 000000000000..680f5a902936 --- /dev/null +++ b/arch/arm/mach-mxs/devices/platform-mxs-pwm.c | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Sascha Hauer <s.hauer@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <asm/sizes.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | struct platform_device *__init mxs_add_mxs_pwm(resource_size_t iobase, int id) | ||
13 | { | ||
14 | struct resource res = { | ||
15 | .flags = IORESOURCE_MEM, | ||
16 | }; | ||
17 | |||
18 | res.start = iobase + 0x10 + 0x20 * id; | ||
19 | res.end = res.start + 0x1f; | ||
20 | |||
21 | return mxs_add_platform_device("mxs-pwm", id, &res, 1, NULL, 0); | ||
22 | } | ||