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:46 +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,
	Alexandre Torgue <alexandre.torgue@...ricsson.com>,
	Lee Jones <lee.jones@...aro.org>
Subject: [PATCH 15/35] mfd: ab8500-debugfs: Add tests for ab8540 based platform initialisations

From: Alexandre Torgue <alexandre.torgue@...ricsson.com>

Signed-off-by: Alexandre Torgue <alexandre.torgue@...ricsson.com>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@...ricsson.com>
Reviewed-by: Mattias WALLIN <mattias.wallin@...ricsson.com>
Tested-by: Maxime COQUELIN <maxime.coquelin@...ricsson.com>
---
 drivers/mfd/ab8500-core.c    |   11 +++++++----
 drivers/mfd/ab8500-debugfs.c |    2 ++
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index e82cf73..f5ceb2e 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -1296,7 +1296,8 @@ static ssize_t show_chip_id(struct device *dev,
 	ab8500 = dev_get_drvdata(dev);
 	if(ab8500) {
 		chip_id = ab8500->chip_id;
-		if((is_ab8505(ab8500) || is_ab9540(ab8500)) && ab8500->version != 0xFF)
+		if ((is_ab8505(ab8500) || is_ab9540(ab8500)
+			|| is_ab8540(ab8500)) && ab8500->version != 0xFF)
 			chip_id = (ab8500->version << 8) | chip_id;
 	}
 	return sprintf(buf, "%#x\n", chip_id);
@@ -1597,7 +1598,7 @@ static int ab8500_probe(struct platform_device *pdev)
 
 	/*  Activate this feature only in ab9540 */
 	/*  till tests are done on ab8500 1p2 or later*/
-	if (is_ab9540(ab8500)) {
+	if (is_ab9540(ab8500) || is_ab8540(ab8500))
 		ret = devm_request_threaded_irq(&pdev->dev, ab8500->irq, NULL,
 						ab8500_hierarchical_irq,
 						IRQF_ONESHOT | IRQF_NO_SUSPEND,
@@ -1640,7 +1641,8 @@ static int ab8500_probe(struct platform_device *pdev)
 			dev_err(ab8500->dev, "error adding bm devices\n");
 	}
 
-	if (is_ab9540(ab8500))
+	if (((is_ab8505(ab8500) || is_ab9540(ab8500)) &&
+			ab8500->chip_id >= AB8500_CUT2P0) || is_ab8540(ab8500))
 		ret = sysfs_create_group(&ab8500->dev->kobj,
 					&ab9540_attr_group);
 	else
@@ -1656,7 +1658,8 @@ static int ab8500_remove(struct platform_device *pdev)
 {
 	struct ab8500 *ab8500 = platform_get_drvdata(pdev);
 
-	if (is_ab9540(ab8500))
+	if (((is_ab8505(ab8500) || is_ab9540(ab8500)) &&
+			ab8500->chip_id >= AB8500_CUT2P0) || is_ab8540(ab8500))
 		sysfs_remove_group(&ab8500->dev->kobj, &ab9540_attr_group);
 	else
 		sysfs_remove_group(&ab8500->dev->kobj, &ab8500_attr_group);
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
index 51b0e97..3eeab01 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -1942,6 +1942,8 @@ static int ab8500_debug_probe(struct platform_device *plf)
 		num_interrupt_lines = AB8505_NR_IRQS;
 	else if (is_ab9540(ab8500))
 		num_interrupt_lines = AB9540_NR_IRQS;
+	else if (is_ab8540(ab8500))
+		num_interrupt_lines = AB8540_NR_IRQS;
 
 	file = debugfs_create_file("interrupts", (S_IRUGO),
 	    ab8500_dir, &plf->dev, &ab8500_interrupts_fops);
-- 
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