linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] mx51: Add PWM resources
@ 2010-11-16 18:36 Fabio Estevam
  2010-11-16 19:45 ` Uwe Kleine-König
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2010-11-16 18:36 UTC (permalink / raw)
  To: linux-arm-kernel

Add PWM resources.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

---
 arch/arm/mach-mx5/devices.c |???50 +++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-mx5/devices.h |? ? 2 +
 2 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c
index 4c7be87..ec36c3e 100644
--- a/arch/arm/mach-mx5/devices.c
+++ b/arch/arm/mach-mx5/devices.c
@@ -131,6 +131,56 @@ struct platform_device mxc_keypad_device = {
 ??? .resource = mxc_kpp_resources,
 };
 
+static struct resource mxc_pwm0_resources[] = {
+??? {
+??? ??? .start = MX51_PWM1_BASE_ADDR,
+??? ??? .end = MX51_PWM1_BASE_ADDR + 0x14,
+??? ??? .flags = IORESOURCE_MEM,
+??? },
+??? {
+??? ??? .start = MX51_MXC_INT_PWM1,
+??? ??? .end = MX51_MXC_INT_PWM1,
+??? ??? .flags = IORESOURCE_IRQ,
+??? },
+};
+
+struct platform_device mxc_pwm0_device = {
+??? .name = "mxc_pwm",
+??? .id = 0,
+??? .num_resources = ARRAY_SIZE(mxc_pwm0_resources),
+??? .resource = mxc_pwm0_resources,
+};
+
+static struct resource mxc_pwm1_resources[] = {
+??? {
+??? ??? .start = MX51_PWM2_BASE_ADDR,
+??? ??? .end = MX51_PWM2_BASE_ADDR + 0x14,
+??? ??? .flags = IORESOURCE_MEM,
+??? },
+??? {
+??? ??? .start = MX51_MXC_INT_PWM2,
+??? ??? .end = MX51_MXC_INT_PWM2,
+??? ??? .flags = IORESOURCE_IRQ,
+??? },
+};
+
+struct platform_device mxc_pwm1_device = {
+??? .name = "mxc_pwm",
+??? .id = 1,
+??? .num_resources = ARRAY_SIZE(mxc_pwm1_resources),
+??? .resource = mxc_pwm1_resources,
+};
+
+struct platform_device mxc_pwm0_backlight_device = {
+??? .name = "pwm-backlight",
+??? .id = 0,
+};
+
+struct platform_device mxc_pwm1_backlight_device = {
+??? .name = "pwm-backlight",
+??? .id = 1,
+};
+
 static struct mxc_gpio_port mxc_gpio_ports[] = {
 ??? {
 ??? ??? .chip.label = "gpio-0",
diff --git a/arch/arm/mach-mx5/devices.h b/arch/arm/mach-mx5/devices.h
index af1d07c..71a9fe9 100644
--- a/arch/arm/mach-mx5/devices.h
+++ b/arch/arm/mach-mx5/devices.h
@@ -4,3 +4,5 @@ extern struct platform_device mxc_usbdr_udc_device;
 extern struct platform_device mxc_wdt;
 extern struct platform_device mxc_hsi2c_device;
 extern struct platform_device mxc_keypad_device;
+extern struct platform_device mxc_pwm0_device;
+extern struct platform_device mxc_pwm0_backlight_device;
-- 
1.6.0.4



      

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-16 19:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-16 18:36 [PATCH 1/5] mx51: Add PWM resources Fabio Estevam
2010-11-16 19:45 ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).