aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm831x-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-09-11 03:16:36 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-09-14 03:51:54 -0400
commit55692af5eb587f7592d6c2713e1e0eeaab0f6c31 (patch)
tree327c88f0a30ce2a7090646fdf41b365bd90e7ee3 /drivers/mfd/wm831x-core.c
parent92d801390c1d0659fd52008336ae9daebdfd7509 (diff)
mfd: core: Push irqdomain mapping out into devices
Currently the MFD core supports remapping MFD cell interrupts using an irqdomain but only if the MFD is being instantiated using device tree and only if the device tree bindings use the pattern of registering IPs in the device tree with compatible properties. This will be actively harmful for drivers which support non-DT platforms and use this pattern for their DT bindings as it will mean that the core will silently change remapping behaviour and it is also limiting for drivers which don't do DT with this particular pattern. There is also a potential fragility if there are interrupts not associated with MFD cells and all the cells are omitted from the device tree for some reason. Instead change the code to take an IRQ domain as an optional argument, allowing drivers to take the decision about the parent domain for their interrupts. The one current user of this feature is ab8500-core, it has the domain lookup pushed out into the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm831x-core.c')
-rw-r--r--drivers/mfd/wm831x-core.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c
index 2e5d58eb2ec1..521340a708d3 100644
--- a/drivers/mfd/wm831x-core.c
+++ b/drivers/mfd/wm831x-core.c
@@ -1787,27 +1787,27 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
1787 case WM8310: 1787 case WM8310:
1788 ret = mfd_add_devices(wm831x->dev, wm831x_num, 1788 ret = mfd_add_devices(wm831x->dev, wm831x_num,
1789 wm8310_devs, ARRAY_SIZE(wm8310_devs), 1789 wm8310_devs, ARRAY_SIZE(wm8310_devs),
1790 NULL, 0); 1790 NULL, 0, NULL);
1791 break; 1791 break;
1792 1792
1793 case WM8311: 1793 case WM8311:
1794 ret = mfd_add_devices(wm831x->dev, wm831x_num, 1794 ret = mfd_add_devices(wm831x->dev, wm831x_num,
1795 wm8311_devs, ARRAY_SIZE(wm8311_devs), 1795 wm8311_devs, ARRAY_SIZE(wm8311_devs),
1796 NULL, 0); 1796 NULL, 0, NULL);
1797 if (!pdata || !pdata->disable_touch) 1797 if (!pdata || !pdata->disable_touch)
1798 mfd_add_devices(wm831x->dev, wm831x_num, 1798 mfd_add_devices(wm831x->dev, wm831x_num,
1799 touch_devs, ARRAY_SIZE(touch_devs), 1799 touch_devs, ARRAY_SIZE(touch_devs),
1800 NULL, 0); 1800 NULL, 0, NULL);
1801 break; 1801 break;
1802 1802
1803 case WM8312: 1803 case WM8312:
1804 ret = mfd_add_devices(wm831x->dev, wm831x_num, 1804 ret = mfd_add_devices(wm831x->dev, wm831x_num,
1805 wm8312_devs, ARRAY_SIZE(wm8312_devs), 1805 wm8312_devs, ARRAY_SIZE(wm8312_devs),
1806 NULL, 0); 1806 NULL, 0, NULL);
1807 if (!pdata || !pdata->disable_touch) 1807 if (!pdata || !pdata->disable_touch)
1808 mfd_add_devices(wm831x->dev, wm831x_num, 1808 mfd_add_devices(wm831x->dev, wm831x_num,
1809 touch_devs, ARRAY_SIZE(touch_devs), 1809 touch_devs, ARRAY_SIZE(touch_devs),
1810 NULL, 0); 1810 NULL, 0, NULL);
1811 break; 1811 break;
1812 1812
1813 case WM8320: 1813 case WM8320:
@@ -1816,7 +1816,7 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
1816 case WM8326: 1816 case WM8326:
1817 ret = mfd_add_devices(wm831x->dev, wm831x_num, 1817 ret = mfd_add_devices(wm831x->dev, wm831x_num,
1818 wm8320_devs, ARRAY_SIZE(wm8320_devs), 1818 wm8320_devs, ARRAY_SIZE(wm8320_devs),
1819 NULL, 0); 1819 NULL, 0, NULL);
1820 break; 1820 break;
1821 1821
1822 default: 1822 default:
@@ -1841,7 +1841,7 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
1841 if (ret & WM831X_XTAL_ENA) { 1841 if (ret & WM831X_XTAL_ENA) {
1842 ret = mfd_add_devices(wm831x->dev, wm831x_num, 1842 ret = mfd_add_devices(wm831x->dev, wm831x_num,
1843 rtc_devs, ARRAY_SIZE(rtc_devs), 1843 rtc_devs, ARRAY_SIZE(rtc_devs),
1844 NULL, 0); 1844 NULL, 0, NULL);
1845 if (ret != 0) { 1845 if (ret != 0) {
1846 dev_err(wm831x->dev, "Failed to add RTC: %d\n", ret); 1846 dev_err(wm831x->dev, "Failed to add RTC: %d\n", ret);
1847 goto err_irq; 1847 goto err_irq;
@@ -1854,7 +1854,7 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
1854 /* Treat errors as non-critical */ 1854 /* Treat errors as non-critical */
1855 ret = mfd_add_devices(wm831x->dev, wm831x_num, backlight_devs, 1855 ret = mfd_add_devices(wm831x->dev, wm831x_num, backlight_devs,
1856 ARRAY_SIZE(backlight_devs), NULL, 1856 ARRAY_SIZE(backlight_devs), NULL,
1857 0); 1857 0, NULL);
1858 if (ret < 0) 1858 if (ret < 0)
1859 dev_err(wm831x->dev, "Failed to add backlight: %d\n", 1859 dev_err(wm831x->dev, "Failed to add backlight: %d\n",
1860 ret); 1860 ret);