aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-02-26 05:09:41 -0500
committerLee Jones <lee.jones@linaro.org>2013-03-06 23:28:06 -0500
commite436ddff5748c459853bb3fb97550a9b8b647b8d (patch)
treea695e008556b4928df544f188c0b2fd3859fcccf /drivers
parent2377e52f7ca8ebe6ba9ad0e6173915538ee4808b (diff)
mfd: ab8500-debugfs: Add tests for ab8540 based platform initialisations
Signed-off-by: Alexandre Torgue <alexandre.torgue@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com> Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com> Tested-by: Maxime COQUELIN <maxime.coquelin@stericsson.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/ab8500-core.c9
-rw-r--r--drivers/mfd/ab8500-debugfs.c2
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 0ba08a26cf73..0fc18e91310c 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -1346,6 +1346,7 @@ static ssize_t show_chip_id(struct device *dev,
1346 struct ab8500 *ab8500; 1346 struct ab8500 *ab8500;
1347 1347
1348 ab8500 = dev_get_drvdata(dev); 1348 ab8500 = dev_get_drvdata(dev);
1349
1349 return sprintf(buf, "%#x\n", ab8500 ? ab8500->chip_id : -EINVAL); 1350 return sprintf(buf, "%#x\n", ab8500 ? ab8500->chip_id : -EINVAL);
1350} 1351}
1351 1352
@@ -1676,7 +1677,7 @@ static int ab8500_probe(struct platform_device *pdev)
1676 1677
1677 /* Activate this feature only in ab9540 */ 1678 /* Activate this feature only in ab9540 */
1678 /* till tests are done on ab8500 1p2 or later*/ 1679 /* till tests are done on ab8500 1p2 or later*/
1679 if (is_ab9540(ab8500)) { 1680 if (is_ab9540(ab8500) || is_ab8540(ab8500))
1680 ret = devm_request_threaded_irq(&pdev->dev, ab8500->irq, NULL, 1681 ret = devm_request_threaded_irq(&pdev->dev, ab8500->irq, NULL,
1681 ab8500_hierarchical_irq, 1682 ab8500_hierarchical_irq,
1682 IRQF_ONESHOT | IRQF_NO_SUSPEND, 1683 IRQF_ONESHOT | IRQF_NO_SUSPEND,
@@ -1719,7 +1720,8 @@ static int ab8500_probe(struct platform_device *pdev)
1719 dev_err(ab8500->dev, "error adding bm devices\n"); 1720 dev_err(ab8500->dev, "error adding bm devices\n");
1720 } 1721 }
1721 1722
1722 if (is_ab9540(ab8500)) 1723 if (((is_ab8505(ab8500) || is_ab9540(ab8500)) &&
1724 ab8500->chip_id >= AB8500_CUT2P0) || is_ab8540(ab8500))
1723 ret = sysfs_create_group(&ab8500->dev->kobj, 1725 ret = sysfs_create_group(&ab8500->dev->kobj,
1724 &ab9540_attr_group); 1726 &ab9540_attr_group);
1725 else 1727 else
@@ -1735,7 +1737,8 @@ static int ab8500_remove(struct platform_device *pdev)
1735{ 1737{
1736 struct ab8500 *ab8500 = platform_get_drvdata(pdev); 1738 struct ab8500 *ab8500 = platform_get_drvdata(pdev);
1737 1739
1738 if (is_ab9540(ab8500)) 1740 if (((is_ab8505(ab8500) || is_ab9540(ab8500)) &&
1741 ab8500->chip_id >= AB8500_CUT2P0) || is_ab8540(ab8500))
1739 sysfs_remove_group(&ab8500->dev->kobj, &ab9540_attr_group); 1742 sysfs_remove_group(&ab8500->dev->kobj, &ab9540_attr_group);
1740 else 1743 else
1741 sysfs_remove_group(&ab8500->dev->kobj, &ab8500_attr_group); 1744 sysfs_remove_group(&ab8500->dev->kobj, &ab8500_attr_group);
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
index 55d0ff4f5b23..969e43db8485 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -1943,6 +1943,8 @@ static int ab8500_debug_probe(struct platform_device *plf)
1943 num_interrupt_lines = AB8505_NR_IRQS; 1943 num_interrupt_lines = AB8505_NR_IRQS;
1944 else if (is_ab9540(ab8500)) 1944 else if (is_ab9540(ab8500))
1945 num_interrupt_lines = AB9540_NR_IRQS; 1945 num_interrupt_lines = AB9540_NR_IRQS;
1946 else if (is_ab8540(ab8500))
1947 num_interrupt_lines = AB8540_NR_IRQS;
1946 1948
1947 file = debugfs_create_file("interrupts", (S_IRUGO), 1949 file = debugfs_create_file("interrupts", (S_IRUGO),
1948 ab8500_dir, &plf->dev, &ab8500_interrupts_fops); 1950 ab8500_dir, &plf->dev, &ab8500_interrupts_fops);