list_add(&clkdm->node, &clkdm_list);
+ pwrdm_add_clkdm(pwrdm, clkdm);
+
pr_debug("clockdomain: registered %s\n", clkdm->name);
ret = 0;
if (!clkdm)
return -EINVAL;
+ pwrdm_del_clkdm(clkdm->pwrdm, clkdm);
+
mutex_lock(&clkdm_mutex);
list_del(&clkdm->node);
mutex_unlock(&clkdm_mutex);
}
+/**
+ * clkdm_get_pwrdm - return a ptr to the pwrdm that this clkdm resides in
+ * @clkdm: struct clockdomain *
+ *
+ * Return a pointer to the struct powerdomain that the specified clockdomain
+ * 'clkdm' exists in, or returns NULL if clkdm argument is NULL.
+ */
+struct powerdomain *clkdm_get_pwrdm(struct clockdomain *clkdm)
+{
+ if (!clkdm)
+ return NULL;
+
+ return clkdm->pwrdm;
+}
+
+
/* Hardware clockdomain control */
/**