summaryrefslogtreecommitdiff
path: root/drivers/staging/nmf-cm/cm/engine/component/src/component_wrapper.c
diff options
context:
space:
mode:
authorhimansh <himanshu.agrawal@stericsson.com>2011-12-28 19:50:41 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:07:06 +0200
commiteb4ef6da1a08940f1044ea021e037b083c75e0d6 (patch)
tree4f0785f27e8496cfac420288633229a36892fdb6 /drivers/staging/nmf-cm/cm/engine/component/src/component_wrapper.c
parentcd01a620f6629ff56aa0067d62d32ab431592ca7 (diff)
Ux500 CM: Exported cm_writeAttribute to user side
ST-Ericsson ID: 373536 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: NA Change-Id: Ifc873304b8f9ec73fc3c34cec32e53e8c84bd89e Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/43927 Reviewed-by: Pierre PEIFFER <pierre.peiffer@stericsson.com> Reviewed-by: Ashish Kumar TANWER <ashish.tanwer@stericsson.com> Tested-by: Ashish Kumar TANWER <ashish.tanwer@stericsson.com>
Diffstat (limited to 'drivers/staging/nmf-cm/cm/engine/component/src/component_wrapper.c')
-rw-r--r--drivers/staging/nmf-cm/cm/engine/component/src/component_wrapper.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/staging/nmf-cm/cm/engine/component/src/component_wrapper.c b/drivers/staging/nmf-cm/cm/engine/component/src/component_wrapper.c
index 88e6b4749ec..9a5c683ed1f 100644
--- a/drivers/staging/nmf-cm/cm/engine/component/src/component_wrapper.c
+++ b/drivers/staging/nmf-cm/cm/engine/component/src/component_wrapper.c
@@ -906,6 +906,39 @@ out:
return error;
}
+/*
+ * Get a reference on a given attribute of a given component
+ */
+
+PUBLIC EXPORT_SHARED t_cm_error CM_ENGINE_WriteComponentAttribute(
+ const t_cm_instance_handle instance,
+ const char* attrName,
+ t_uint24 attrValue)
+{
+ t_cm_error error;
+ t_component_instance* component;
+
+ OSAL_LOCK_API();
+
+ component = cm_lookupComponent(instance);
+ if (NULL == component)
+ error = CM_INVALID_COMPONENT_HANDLE;
+ else
+ {
+ if ((error = cm_EEM_ForceWakeup(component->Template->dspId)) != CM_OK)
+ goto out;
+
+ //t_uint24 -> t_uint32 possible since we know it same size
+ error = cm_writeAttribute(component, attrName, attrValue);
+
+ cm_EEM_AllowSleep(component->Template->dspId);
+ }
+
+out:
+ OSAL_UNLOCK_API();
+ return error;
+}
+
/*===============================================================================
* Introspection API
*===============================================================================*/