summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/ChangeLog5
-rw-r--r--nuttx/Documentation/NuttxPortingGuide.html18
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_idle.c2
-rw-r--r--nuttx/arch/sim/src/up_head.c6
-rw-r--r--nuttx/arch/sim/src/up_idle.c6
-rw-r--r--nuttx/drivers/Makefile4
-rw-r--r--nuttx/drivers/power/Make.defs (renamed from nuttx/drivers/pm/Make.defs)20
-rw-r--r--nuttx/drivers/power/max1704x.c208
-rw-r--r--nuttx/drivers/power/pm_activity.c (renamed from nuttx/drivers/pm/pm_activity.c)6
-rw-r--r--nuttx/drivers/power/pm_changestate.c (renamed from nuttx/drivers/pm/pm_changestate.c)8
-rw-r--r--nuttx/drivers/power/pm_checkstate.c (renamed from nuttx/drivers/pm/pm_checkstate.c)8
-rw-r--r--nuttx/drivers/power/pm_initialize.c (renamed from nuttx/drivers/pm/pm_initialize.c)8
-rw-r--r--nuttx/drivers/power/pm_internal.h (renamed from nuttx/drivers/pm/pm_internal.h)14
-rw-r--r--nuttx/drivers/power/pm_register.c (renamed from nuttx/drivers/pm/pm_register.c)8
-rw-r--r--nuttx/drivers/power/pm_update.c (renamed from nuttx/drivers/pm/pm_update.c)8
-rw-r--r--nuttx/include/nuttx/power/pm.h (renamed from nuttx/include/nuttx/pm.h)8
16 files changed, 279 insertions, 58 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index c2ad02c0c..9d8545fb2 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -2386,4 +2386,9 @@
CAN IDs.
* arch/arm/src/lpc17xx/lpc17_can.c: Add support for extended (29-bit) CAN IDs.
* arch/arm/src/stm32/stm32_can.c: Add support for extended (29-bit) CAN IDs.
+ * include/nuttx/power/pm.h: Move include/nuttx/pm.h into a sub-directory named
+ power.
+ * drivers/power: Rename the drivers/pm directory to power
+ * drivers/power/max1704x.c: Add a skeleton file that will eventually become
+ the MAX17040x battery driver.
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index 7ef4e522a..62f5d1d11 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -3331,18 +3331,18 @@ extern void up_ledoff(int led);
<code>SLEEP</code> (some MCUs may even require going through reset).
</dl>
<p>
- These various states are represented with type <code>enum pm_state_e</code> in <code>include/nuttx/pm.h</code>.
+ These various states are represented with type <code>enum pm_state_e</code> in <code>include/nuttx/power/pm.h</code>.
</p>
<h3><a name="pminterfaces">6.4.2 Interfaces</a></h3>
<p>
- All PM interfaces are declared in the file <code>include/nuttx/pm.h</code>.
+ All PM interfaces are declared in the file <code>include/nuttx/power/pm.h</code>.
</p>
<h4><a name="pminitialize">6.4.2.1 pm_initialize()</a></h4>
<p><b>Function Prototype:</b></p>
<ul><pre>
-#include &lt;nuttx/pm.h&gt;
+#include &lt;nuttx/power/pm.h&gt;
void pm_initialize(void);
</pre></ul>
<p><b>Description:</b>
@@ -3359,7 +3359,7 @@ None
<h4><a name="pmregister">6.4.2.2 pm_register()</a></h4>
<p><b>Function Prototype:</b></p>
<ul><pre>
-#include &lt;nuttx/pm.h&gt;
+#include &lt;nuttx/power/pm.h&gt;
int pm_register(FAR struct pm_callback_s *callbacks);
</pre></ul>
<p><b>Description:</b>
@@ -3379,7 +3379,7 @@ Zero (<code>OK</code>) on success; otherwise a negater <code>errno</code> value
<h4><a name="pmactivity">6.4.2.3 pm_activity()</a></h4>
<p><b>Function Prototype:</b></p>
<ul><pre>
-#include &lt;nuttx/pm.h&gt;
+#include &lt;nuttx/power/pm.h&gt;
void pm_activity(int priority);
</pre></ul>
<p><b>Description:</b>
@@ -3406,7 +3406,7 @@ void pm_activity(int priority);
<h4><a name="pmcheckstate">6.4.2.4 pm_checkstate()</a></h4>
<p><b>Function Prototype:</b></p>
<ul><pre>
-#include &lt;nuttx/pm.h&gt;
+#include &lt;nuttx/power/pm.h&gt;
enum pm_state_e pm_checkstate(void);
</pre></ul>
<p><b>Description:</b>
@@ -3433,7 +3433,7 @@ enum pm_state_e pm_checkstate(void);
<h4><a name="pmchangestate">6.4.2.5 pm_changestate()</a></h4>
<p><b>Function Prototype:</b></p>
<ul><pre>
-#include &lt;nuttx/pm.h&gt;
+#include &lt;nuttx/power/pm.h&gt;
int pm_changestate(enum pm_state_e newstate);
</pre></ul>
<p><b>Description:</b>
@@ -3461,7 +3461,7 @@ enum pm_state_e pm_checkstate(void);
<h3><a name="pmcallbacks">6.4.3 Callbacks</a></h3>
<p>
The <code>struct pm_callback_s</code> includes the pointers to the driver callback functions.
- This structure is defined <code>include/nuttx/pm.h</code>.
+ This structure is defined <code>include/nuttx/power/pm.h</code>.
These callback functions can be used to provide power management information to the driver.
</p>
@@ -3496,7 +3496,7 @@ int (*prepare)(FAR struct pm_callback_s *cb, enum pm_state_e pmstate);
<h4><a name="pmnotify">6.4.3.1 notify()</a></h4>
<p><b>Function Prototype:</b></p>
<ul><pre>
-#include &lt;nuttx/pm.h&gt;
+#include &lt;nuttx/power/pm.h&gt;
void (*notify)(FAR struct pm_callback_s *cb, enum pm_state_e pmstate);
</pre></ul>
<p><b>Description:</b>
diff --git a/nuttx/arch/arm/src/stm32/stm32_idle.c b/nuttx/arch/arm/src/stm32/stm32_idle.c
index ec78861c8..b5fd9fcb3 100644
--- a/nuttx/arch/arm/src/stm32/stm32_idle.c
+++ b/nuttx/arch/arm/src/stm32/stm32_idle.c
@@ -41,7 +41,7 @@
#include <nuttx/config.h>
#include <nuttx/arch.h>
-#include <nuttx/pm.h>
+#include <nuttx/power/pm.h>
#include <arch/irq.h>
diff --git a/nuttx/arch/sim/src/up_head.c b/nuttx/arch/sim/src/up_head.c
index 431d417de..7326e73dc 100644
--- a/nuttx/arch/sim/src/up_head.c
+++ b/nuttx/arch/sim/src/up_head.c
@@ -1,8 +1,8 @@
/****************************************************************************
* up_head.c
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007-2009, 2011-2112 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -47,7 +47,7 @@
#include <nuttx/init.h>
#include <nuttx/arch.h>
-#include <nuttx/pm.h>
+#include <nuttx/power/pm.h>
/****************************************************************************
* Private Data
diff --git a/nuttx/arch/sim/src/up_idle.c b/nuttx/arch/sim/src/up_idle.c
index d7397ba22..c66b3b770 100644
--- a/nuttx/arch/sim/src/up_idle.c
+++ b/nuttx/arch/sim/src/up_idle.c
@@ -1,8 +1,8 @@
/****************************************************************************
* up_idle.c
*
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,7 +42,7 @@
#include <time.h>
#include <nuttx/arch.h>
-#include <nuttx/pm.h>
+#include <nuttx/power/pm.h>
#include "up_internal.h"
diff --git a/nuttx/drivers/Makefile b/nuttx/drivers/Makefile
index 4254acac0..9d804871e 100644
--- a/nuttx/drivers/Makefile
+++ b/nuttx/drivers/Makefile
@@ -1,7 +1,7 @@
############################################################################
# drivers/Makefile
#
-# Copyright (C) 2007-2011 Gregory Nutt. All rights reserved.
+# Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@ include mmcsd/Make.defs
include mtd/Make.defs
include net/Make.defs
include pipes/Make.defs
-include pm/Make.defs
+include power/Make.defs
include sensors/Make.defs
include serial/Make.defs
include usbdev/Make.defs
diff --git a/nuttx/drivers/pm/Make.defs b/nuttx/drivers/power/Make.defs
index 6204973f5..91102c1e9 100644
--- a/nuttx/drivers/pm/Make.defs
+++ b/nuttx/drivers/power/Make.defs
@@ -1,8 +1,8 @@
############################################################################
-# drivers/pm/Make.defs
+# drivers/power/Make.defs
#
-# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -41,10 +41,18 @@ ifeq ($(CONFIG_PM),y)
CSRCS += pm_activity.c pm_changestate.c pm_checkstate.c pm_initialize.c pm_register.c pm_update.c
+# Add I2C devices
+
+ifeq ($(CONFIG_I2C),y)
+ifeq ($(CONFIG_I2C_MAX1704X),y)
+CSRCS += max1704x.c
+endif
+endif
+
# Include power management in the build
-DEPPATH += --dep-path pm
-VPATH += :pm
-CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/pm}
+DEPPATH += --dep-path power
+VPATH += :power
+CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/power}
endif
diff --git a/nuttx/drivers/power/max1704x.c b/nuttx/drivers/power/max1704x.c
new file mode 100644
index 000000000..bba53478a
--- /dev/null
+++ b/nuttx/drivers/power/max1704x.c
@@ -0,0 +1,208 @@
+/****************************************************************************
+ * drivers/power/max1704x.c
+ * Character driver for the STMicroMAX1704x Temperature Sensor
+ *
+ * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <errno.h>
+#include <debug.h>
+
+#if defined(CONFIG_I2C) && defined(CONFIG_I2C_MAX1704X)
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private
+ ****************************************************************************/
+
+struct max1704x_dev_s
+{
+ FAR struct i2c_dev_s *i2c; /* I2C interface */
+ uint8_t addr; /* I2C address */
+};
+
+/****************************************************************************
+ * Private Function Prototypes
+ ****************************************************************************/
+/* I2C Helpers */
+
+/* Character driver methods */
+
+static int max1704x_open(FAR struct file *filep);
+static int max1704x_close(FAR struct file *filep);
+static ssize_t max1704x_read(FAR struct file *, FAR char *, size_t);
+static ssize_t max1704x_write(FAR struct file *filep, FAR const char *buffer, size_t buflen);
+static int max1704x_ioctl(FAR struct file *filep,int cmd,unsigned long arg);
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static const struct file_operations g_max1704xfopg =
+{
+ max1704x_open,
+ max1704x_close,
+ max1704x_read,
+ max1704x_write,
+ 0,
+ max1704x_ioctl
+#ifndef CONFIG_DISABLE_POLL
+ , 0
+#endif
+};
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+/****************************************************************************
+ * Name: max1704x_open
+ *
+ * Description:
+ * This function is called whenever theMAX1704x device is opened.
+ *
+ ****************************************************************************/
+
+static int max1704x_open(FAR struct file *filep)
+{
+ return OK;
+}
+
+/****************************************************************************
+ * Name: max1704x_close
+ *
+ * Description:
+ * This routine is called when theMAX1704x device is closed.
+ *
+ ****************************************************************************/
+
+static int max1704x_close(FAR struct file *filep)
+{
+ return OK;
+}
+
+/****************************************************************************
+ * Name: max1704x_read
+ ****************************************************************************/
+
+static ssize_t max1704x_read(FAR struct file *filep, FAR char *buffer, size_t buflen)
+{
+ retrun 0;
+}
+
+/****************************************************************************
+ * Name: max1704x_write
+ ****************************************************************************/
+
+static ssize_t max1704x_write(FAR struct file *filep, FAR const char *buffer,
+ size_t buflen)
+{
+ return -EACCESS;
+}
+
+/****************************************************************************
+ * Name: max1704x_ioctl
+ ****************************************************************************/
+
+static int max1704x_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
+{
+ FAR struct inode *inode = filep->f_inode;
+ FAR struct max1704x_dev_s *priv = inode->i_private;
+ int ret = OK;
+
+ switch (cmd)
+ {
+ default:
+ i2cdbg("Unrecognized cmd: %d\n", cmd);
+ ret = -ENOTTY;
+ break;
+ }
+
+ return ret;
+}
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: max1704x_register
+ *
+ * Description:
+ * Register theMAX1704x character device as 'devpath'
+ *
+ * Input Parameters:
+ * devpath - The full path to the driver to register. E.g., "/dev/temp0"
+ * i2c - An instance of the I2C interface to use to communicate with the MAX1704x
+ * addr - The I2C address of the MAX1704x.
+ *
+ * Returned Value:
+ * Zero (OK) on success; a negated errno value on failure.
+ *
+ ****************************************************************************/
+
+int max1704x_register(FAR const char *devpath, FAR struct i2c_dev_s *i2c, uint8_t addr)
+{
+ FAR struct max1704x_dev_s *priv;
+ int ret;
+
+ /* Initialize theMAX1704x device structure */
+
+ priv = (FAR struct max1704x_dev_s *)kzalloc(sizeof(struct max1704x_dev_s));
+ if (!priv)
+ {
+ i2cdbg("Failed to allocate instance\n");
+ return -ENOMEM;
+ }
+
+ priv->i2c = i2c;
+ priv->addr = addr;
+
+ /* Register the character driver */
+
+ ret = register_driver(devpath, &g_max1704xfopg, 0555, priv);
+ if (ret < 0)
+ {
+ i2cdbg("Failed to register driver: %d\n", ret);
+ free(priv);
+ }
+ return ret;
+}
+#endif /* CONFIG_I2C && CONFIG_I2C_MAX1704X */
diff --git a/nuttx/drivers/pm/pm_activity.c b/nuttx/drivers/power/pm_activity.c
index dd908b949..8cef46684 100644
--- a/nuttx/drivers/pm/pm_activity.c
+++ b/nuttx/drivers/power/pm_activity.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * drivers/pm/pm_activity.c
+ * drivers/power/pm_activity.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <nuttx/pm.h>
+#include <nuttx/power/pm.h>
#include <nuttx/clock.h>
#include <arch/irq.h>
diff --git a/nuttx/drivers/pm/pm_changestate.c b/nuttx/drivers/power/pm_changestate.c
index 50fa0640f..27d17ce88 100644
--- a/nuttx/drivers/pm/pm_changestate.c
+++ b/nuttx/drivers/power/pm_changestate.c
@@ -1,8 +1,8 @@
/****************************************************************************
- * drivers/pm/pm_changestate.c
+ * drivers/power/pm_changestate.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <nuttx/pm.h>
+#include <nuttx/power/pm.h>
#include <arch/irq.h>
#include "pm_internal.h"
diff --git a/nuttx/drivers/pm/pm_checkstate.c b/nuttx/drivers/power/pm_checkstate.c
index 9ecff862e..9b0e1045e 100644
--- a/nuttx/drivers/pm/pm_checkstate.c
+++ b/nuttx/drivers/power/pm_checkstate.c
@@ -1,8 +1,8 @@
/****************************************************************************
- * drivers/pm/pm_checkstate.c
+ * drivers/power/pm_checkstate.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <nuttx/pm.h>
+#include <nuttx/power/pm.h>
#include <nuttx/clock.h>
#include <arch/irq.h>
diff --git a/nuttx/drivers/pm/pm_initialize.c b/nuttx/drivers/power/pm_initialize.c
index 70cd8d7e6..9401fba9e 100644
--- a/nuttx/drivers/pm/pm_initialize.c
+++ b/nuttx/drivers/power/pm_initialize.c
@@ -1,8 +1,8 @@
/****************************************************************************
- * drivers/pm/pm_initialize.c
+ * drivers/power/pm_initialize.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -41,7 +41,7 @@
#include <semaphore.h>
-#include <nuttx/pm.h>
+#include <nuttx/power/pm.h>
#include "pm_internal.h"
diff --git a/nuttx/drivers/pm/pm_internal.h b/nuttx/drivers/power/pm_internal.h
index b3e610ba0..0ae4722da 100644
--- a/nuttx/drivers/pm/pm_internal.h
+++ b/nuttx/drivers/power/pm_internal.h
@@ -1,8 +1,8 @@
/****************************************************************************
- * drivers/pm/pm_internal.h
+ * drivers/power/pm_internal.h
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -33,8 +33,8 @@
*
****************************************************************************/
-#ifndef __DRIVERS_PM_PM_INTERNAL_H
-#define __DRIVERS_PM_PM_INTERNAL_H
+#ifndef __DRIVERS_POWER_PM_INTERNAL_H
+#define __DRIVERS_POWER_PM_INTERNAL_H
/****************************************************************************
* Included Files
@@ -45,7 +45,7 @@
#include <semaphore.h>
#include <queue.h>
-#include <nuttx/pm.h>
+#include <nuttx/power/pm.h>
#include <nuttx/wqueue.h>
#ifdef CONFIG_PM
@@ -207,4 +207,4 @@ EXTERN void pm_update(int16_t accum);
#endif
#endif /* CONFIG_PM */
-#endif /* #define __DRIVERS_PM_PM_INTERNAL_H */
+#endif /* #define __DRIVERS_POWER_PM_INTERNAL_H */
diff --git a/nuttx/drivers/pm/pm_register.c b/nuttx/drivers/power/pm_register.c
index 41d4bb836..19f94cb02 100644
--- a/nuttx/drivers/pm/pm_register.c
+++ b/nuttx/drivers/power/pm_register.c
@@ -1,8 +1,8 @@
/****************************************************************************
- * drivers/pm/pm_register.c
+ * drivers/power/pm_register.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,7 +42,7 @@
#include <queue.h>
#include <assert.h>
-#include <nuttx/pm.h>
+#include <nuttx/power/pm.h>
#include "pm_internal.h"
diff --git a/nuttx/drivers/pm/pm_update.c b/nuttx/drivers/power/pm_update.c
index 336bee5ef..ae5e1f840 100644
--- a/nuttx/drivers/pm/pm_update.c
+++ b/nuttx/drivers/power/pm_update.c
@@ -1,8 +1,8 @@
/****************************************************************************
- * drivers/pm/pm_update.c
+ * drivers/power/pm_update.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -41,7 +41,7 @@
#include <assert.h>
-#include <nuttx/pm.h>
+#include <nuttx/power/pm.h>
#include <nuttx/wqueue.h>
#include "pm_internal.h"
diff --git a/nuttx/include/nuttx/pm.h b/nuttx/include/nuttx/power/pm.h
index 308960fdb..7c9433c22 100644
--- a/nuttx/include/nuttx/pm.h
+++ b/nuttx/include/nuttx/power/pm.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * include/nuttx/pm.h
+ * include/nuttx/power/pm.h
* NuttX Power Management Interfaces
*
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
@@ -61,8 +61,8 @@
* +-------+------+--------+
*/
-#ifndef __INCLUDE_NUTTX_PM_H
-#define __INCLUDE_NUTTX_PM_H
+#ifndef __INCLUDE_NUTTX_POWER_PM_H
+#define __INCLUDE_NUTTX_POWER_PM_H
/****************************************************************************
* Included Files
@@ -481,4 +481,4 @@ EXTERN int pm_changestate(enum pm_state_e newstate);
# define pm_changestate(state)
#endif /* CONFIG_PM */
-#endif /* __INCLUDE_NUTTX_PM_H */
+#endif /* __INCLUDE_NUTTX_POWER_PM_H */