Skip to content

Commit

Permalink
mfd: Allow for bypass of cell resource conflict check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Drake authored and Samuel Ortiz committed Oct 28, 2010
1 parent 2d95ae3 commit 5f2545f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/mfd/mfd-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions include/linux/mfd/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5f2545f

Please sign in to comment.