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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 15 Feb 2013 12:56:48 +0000
From:	Lee Jones <lee.jones@...aro.org>
To:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	sameo@...ux.intel.com
Cc:	arnd@...db.de, linus.walleij@...ricsson.com,
	zhoubin <bin.zhou@...ricsson.com>,
	Lee Jones <lee.jones@...aro.org>
Subject: [PATCH 17/35] mfd: ab8500: Introduce AB8540 cuts definition

From: zhoubin <bin.zhou@...ricsson.com>

Add AB8540 cuts definition and its associated helper functions.

Signed-off-by: zhoubin <bin.zhou@...ricsson.com>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
Reviewed-by: Ying Bao JIA <yingbao.jia@...ricsson.com>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@...ricsson.com>
Reviewed-by: Mattias WALLIN <mattias.wallin@...ricsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@...ricsson.com>
Tested-by: Xiao Mei ZHANG <xiaomei.zhang@...ricsson.com>
Tested-by: Maxime COQUELIN <maxime.coquelin@...ricsson.com>
---
 include/linux/mfd/abx500/ab8500.h |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
index 7e323fc..06a8292 100644
--- a/include/linux/mfd/abx500/ab8500.h
+++ b/include/linux/mfd/abx500/ab8500.h
@@ -32,6 +32,7 @@ enum ab8500_version {
 #define AB8500_CUTEARLY	0x00
 #define AB8500_CUT1P0	0x10
 #define AB8500_CUT1P1	0x11
+#define AB8500_CUT1P2	0x12 /* Only valid for AB8540 */
 #define AB8500_CUT2P0	0x20
 #define AB8500_CUT3P0	0x30
 #define AB8500_CUT3P3	0x33
@@ -442,6 +443,31 @@ static inline int is_ab9540_2p0_or_earlier(struct ab8500 *ab)
        return (is_ab9540(ab) && (ab->chip_id < AB8500_CUT2P0));
 }
 
+static inline int is_ab8540_1p0_or_earlier(struct ab8500 *ab)
+{
+	return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT1P0);
+}
+
+static inline int is_ab8540_1p1_or_earlier(struct ab8500 *ab)
+{
+	return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT1P1);
+}
+
+static inline int is_ab8540_1p2_or_earlier(struct ab8500 *ab)
+{
+	return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT1P2);
+}
+
+static inline int is_ab8540_2p0_or_earlier(struct ab8500 *ab)
+{
+	return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT2P0);
+}
+
+static inline int is_ab8540_2p0(struct ab8500 *ab)
+{
+	return is_ab8540(ab) && (ab->chip_id == AB8500_CUT2P0);
+}
+
 #ifdef CONFIG_AB8500_DEBUG
 void ab8500_dump_all_banks(struct device *dev);
 void ab8500_debug_register_interrupt(int line);
-- 
1.7.10.4

--
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