aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rational.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-06-11 23:31:52 +0200
committerIngo Molnar <mingo@elte.hu>2009-06-11 23:31:52 +0200
commit0d5959723e1db3fd7323c198a50c16cecf96c7a9 (patch)
tree802b623fff261ebcbbddadf84af5524398364a18 /include/linux/rational.h
parentx86, mce: Add boot options for corrected errors (diff)
parentMerge branch 'for-linus' of git://linux-arm.org/linux-2.6 (diff)
downloadlinux-dev-0d5959723e1db3fd7323c198a50c16cecf96c7a9.tar.xz
linux-dev-0d5959723e1db3fd7323c198a50c16cecf96c7a9.zip
Merge branch 'linus' into x86/mce3
Conflicts: arch/x86/kernel/cpu/mcheck/mce_64.c arch/x86/kernel/irq.c Merge reason: Resolve the conflicts above. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/rational.h')
-rw-r--r--include/linux/rational.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/rational.h b/include/linux/rational.h
new file mode 100644
index 000000000000..4f532fcd9eea
--- /dev/null
+++ b/include/linux/rational.h
@@ -0,0 +1,19 @@
+/*
+ * rational fractions
+ *
+ * Copyright (C) 2009 emlix GmbH, Oskar Schirmer <os@emlix.com>
+ *
+ * helper functions when coping with rational numbers,
+ * e.g. when calculating optimum numerator/denominator pairs for
+ * pll configuration taking into account restricted register size
+ */
+
+#ifndef _LINUX_RATIONAL_H
+#define _LINUX_RATIONAL_H
+
+void rational_best_approximation(
+ unsigned long given_numerator, unsigned long given_denominator,
+ unsigned long max_numerator, unsigned long max_denominator,
+ unsigned long *best_numerator, unsigned long *best_denominator);
+
+#endif /* _LINUX_RATIONAL_H */