lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20060930022428.e27d4c53.eugeny.mints@gmail.com>
Date:	Sat, 30 Sep 2006 02:24:28 +0400
From:	"Eugeny S. Mints" <eugeny.mints@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	linux-pm@...ts.osdl.org, matt@...adgs.com, amit.kucheria@...ia.com,
	igor.stoppa@...ia.com, ext-Tuukka.Tikkanen@...ia.com
Subject: [RFC] OMAP1 PM Core,  Platform Power Parameter 1/2

Basic building block for PM Core layer is platform power parameter concept. A platform power parameter is a name, get and set methods.  

Although an PM Core implementation is completely arch specific any PM Core is
supposed to utilize platform power parameter concept.

Also any PM Core is supposed to export names of all platform power parameters
available on a platform. Any entity which registeres operating points is primary
consumer of platform_pwr_param_get_names() interface.

(Probably this interface routine might be moved to be a part of PowerOP Core 
interface)

diff --git a/include/linux/plat_pwr_param.h b/include/linux/plat_pwr_param.h
new file mode 100644
index 0000000..3a78d2b
--- /dev/null
+++ b/include/linux/plat_pwr_param.h
@@ -0,0 +1,27 @@
+/*
+ * Interface to the list of platfrom power parameter names available on a
+ * platform
+ *
+ * Author: Eugeny S. Mints <eugeny@...adgs.com>
+ *
+ * 2006 (c) Nomad Global Solutions, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ *
+ * This is used by an operating point registration entity/module 
+ */
+
+#ifndef __PLAT_PWR_PARAM_H__
+#define __PLAT_PWR_PARAM_H__
+
+/* 
+ * FIXME: for struct attribute; may be we need get rid of sysfs header 
+ * dependency
+ */
+#include <linux/sysfs.h>
+
+int
+platform_pwr_param_get_names(struct attribute ***platform_pwr_params_names);
+
+#endif /*__PLAT_PWR_PARAM_H__*/
diff --git a/include/linux/pm_core.h b/include/linux/pm_core.h
new file mode 100644
index 0000000..a166bc5
--- /dev/null
+++ b/include/linux/pm_core.h
@@ -0,0 +1,46 @@
+/*
+ * Generic platform power parameter interface 
+ *
+ * Author: Eugeny S. Mints <eugeny@...adgs.com>
+ *
+ * 2006 (c) Nomad Global Solutions, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ *
+ * This _arch_ _independent_ header defines concept of platform power parameter
+ * to be used by any PM Core layer arch specific implementation
+ *
+ * NOTE: this header is designed to be included by PM Core implementations only
+ */
+
+#ifndef __PM_CORE_H__
+#define __PM_CORE_H__
+
+/* 
+ * FIXME: for struct attribute; may be we need get rid of sysfs header 
+ * dependency
+ */
+#include <linux/sysfs.h>
+
+struct platform_pwr_param {
+	struct attribute attr;
+	int  (*show) (void *md_opt, int *value);
+	void (*store) (void *md_opt, int value);
+};
+
+#define platform_pwr_param_init(_name) \
+static struct platform_pwr_param _name##_attr = { \
+	.attr   = {				\
+		.name = __stringify(_name),	\
+		.mode = 0644,			\
+		.owner = THIS_MODULE,		\
+	},					\
+	.show   = _name##_show,			\
+	.store  = _name##_store,		\
+}
+
+#define to_platform_pwr_param(_attr) container_of((_attr), \
+	struct platform_pwr_param, attr)
+
+#endif /*__PM_CORE_H__*/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ