Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: Allow for bypass of cell resource conflict check

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>

authored by

Daniel Drake and committed by
Samuel Ortiz
5f2545fa 2d95ae3b

+8 -3
+5 -3
drivers/mfd/mfd-core.c
··· 65 65 res[r].end = cell->resources[r].end; 66 66 } 67 67 68 - ret = acpi_check_resource_conflict(res); 69 - if (ret) 70 - goto fail_res; 68 + if (!cell->ignore_resource_conflicts) { 69 + ret = acpi_check_resource_conflict(res); 70 + if (ret) 71 + goto fail_res; 72 + } 71 73 } 72 74 73 75 ret = platform_device_add_resources(pdev, res, cell->num_resources);
+3
include/linux/mfd/core.h
··· 44 44 */ 45 45 int num_resources; 46 46 const struct resource *resources; 47 + 48 + /* don't check for resource conflicts */ 49 + bool ignore_resource_conflicts; 47 50 }; 48 51 49 52 extern int mfd_add_devices(struct device *parent, int id,