summaryrefslogtreecommitdiff
path: root/nuttx/drivers
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-09-04 22:16:10 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-09-04 22:16:10 +0000
commitcc34367c9f9c0807f69cc1a987d25be19fd83c23 (patch)
tree5f6701e91b717ba6f346835ce4cfb65c162080c8 /nuttx/drivers
parent7e1e02b8a0fc6f448892b82203a4a77606eb83c9 (diff)
downloadpx4-nuttx-cc34367c9f9c0807f69cc1a987d25be19fd83c23.tar.gz
px4-nuttx-cc34367c9f9c0807f69cc1a987d25be19fd83c23.tar.bz2
px4-nuttx-cc34367c9f9c0807f69cc1a987d25be19fd83c23.zip
Update PM documentation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3937 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers')
-rw-r--r--nuttx/drivers/README.txt6
-rw-r--r--nuttx/drivers/pm/pm_activity.c6
-rw-r--r--nuttx/drivers/pm/pm_changestate.c10
-rw-r--r--nuttx/drivers/pm/pm_checkstate.c8
4 files changed, 18 insertions, 12 deletions
diff --git a/nuttx/drivers/README.txt b/nuttx/drivers/README.txt
index 3c337956f..e5a1483b2 100644
--- a/nuttx/drivers/README.txt
+++ b/nuttx/drivers/README.txt
@@ -81,6 +81,12 @@ pipes/
FIFO and named pipe drivers. Standard interfaces are declared
in include/unistd.h
+pm/
+ Power management (PM) driver interfaces. These interfaces are used
+ to manage power usage of a platform by monitoring driver activity
+ and by placing drivers into reduce power usage modes when the
+ drivers are not active.
+
sensors/
Drivers for various sensors
diff --git a/nuttx/drivers/pm/pm_activity.c b/nuttx/drivers/pm/pm_activity.c
index f1518520b..a0bae76fa 100644
--- a/nuttx/drivers/pm/pm_activity.c
+++ b/nuttx/drivers/pm/pm_activity.c
@@ -81,13 +81,13 @@
* Description:
* This function is called by a device driver to indicate that it is
* performing meaningful activities (non-idle). This increment an activty
- * cound and/or will restart a idle timer and prevent entering IDLE
+ * count and/or will restart a idle timer and prevent entering reduced
* power states.
*
* Input Parameters:
- * priority - activity priority, range 0-9. Larger values correspond to
+ * priority - Activity priority, range 0-9. Larger values correspond to
* higher priorities. Higher priority activity can prevent the system
- * fromentering reduced power states for a longer period of time.
+ * from entering reduced power states for a longer period of time.
*
* As an example, a button press might be higher priority activity because
* it means that the user is actively interacting with the device.
diff --git a/nuttx/drivers/pm/pm_changestate.c b/nuttx/drivers/pm/pm_changestate.c
index e98e46236..50fa0640f 100644
--- a/nuttx/drivers/pm/pm_changestate.c
+++ b/nuttx/drivers/pm/pm_changestate.c
@@ -77,7 +77,7 @@
* Prepare every driver for the state change.
*
* Input Parameters:
- * newstate - Idenfifies the new PM state
+ * newstate - Identifies the new PM state
*
* Returned Value:
* 0 (OK) means that the callback function for all registered drivers
@@ -122,7 +122,7 @@ static int pm_prepall(enum pm_state_e newstate)
* Inform all drivers of the state change.
*
* Input Parameters:
- * newstate - Idenfifies the new PM state
+ * newstate - Identifies the new PM state
*
* Returned Value:
* None
@@ -147,7 +147,7 @@ static inline void pm_changeall(enum pm_state_e newstate)
{
/* Yes.. notify the driver */
- (void)cb->notify(cb, newstate);
+ cb->notify(cb, newstate);
}
}
}
@@ -160,12 +160,12 @@ static inline void pm_changeall(enum pm_state_e newstate)
* Name: pm_changestate
*
* Description:
- * This function is used to platform-specific power managmeent logic. It
+ * This function is used by platform-specific power management logic. It
* will announce the power management power management state change to all
* drivers that have registered for power management event callbacks.
*
* Input Parameters:
- * newstate - Idenfifies the new PM state
+ * newstate - Identifies the new PM state
*
* Returned Value:
* 0 (OK) means that the callback function for all registered drivers
diff --git a/nuttx/drivers/pm/pm_checkstate.c b/nuttx/drivers/pm/pm_checkstate.c
index 6b23ad05c..3a7f13d47 100644
--- a/nuttx/drivers/pm/pm_checkstate.c
+++ b/nuttx/drivers/pm/pm_checkstate.c
@@ -93,10 +93,10 @@
* even if there is activity.
*
* NOTE: That these two steps are separated in time and, hence, the IDLE
- * could be suspended for a long period of time between calling
- * pm_checkstate() and pm_changestate(). There it is recommended that
- * the IDLE loop make these calls atomic by either disabling interrupts
- * until the state change is completed.
+ * loop could be suspended for a long period of time between calling
+ * pm_checkstate() and pm_changestate(). The IDLE loop may need to make
+ * these calls atomic by either disabling interrupts until the state change
+ * is completed.
*
* Input Parameters:
* None