mfd: Allow for bypass of cell resource conflict check
authorDaniel Drake <dsd@laptop.org>
Thu, 30 Sep 2010 20:55:36 +0000 (21:55 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 28 Oct 2010 22:29:48 +0000 (00:29 +0200)
The upcoming VIA VX855 MFD driver needs to communicate resources
to subdevices where the resources may be claimed by ACPI.

Add a flag to mfd_cell to request that resources are not policed.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/mfd-core.c
include/linux/mfd/core.h

index 1823a57b7d8f06f083f921bd7e9cfaa4f40c98a8..d1c8605d4ed4825d12f2e7ad0c33196231f32c0b 100644 (file)
@@ -65,9 +65,11 @@ static int mfd_add_device(struct device *parent, int id,
                        res[r].end   = cell->resources[r].end;
                }
 
-               ret = acpi_check_resource_conflict(res);
-               if (ret)
-                       goto fail_res;
+               if (!cell->ignore_resource_conflicts) {
+                       ret = acpi_check_resource_conflict(res);
+                       if (ret)
+                               goto fail_res;
+               }
        }
 
        ret = platform_device_add_resources(pdev, res, cell->num_resources);
index 11d740b8831d6fa4559a2b758ff2e1f8f9695fd5..cb93d80aa642cc316749a645e1cec02d4643764e 100644 (file)
@@ -44,6 +44,9 @@ struct mfd_cell {
         */
        int                     num_resources;
        const struct resource   *resources;
+
+       /* don't check for resource conflicts */
+       bool                    ignore_resource_conflicts;
 };
 
 extern int mfd_add_devices(struct device *parent, int id,