Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f2545fa authored by Daniel Drake's avatar Daniel Drake Committed by Samuel Ortiz
Browse files

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: default avatarDaniel Drake <dsd@laptop.org>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 2d95ae3b
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -65,10 +65,12 @@ static int mfd_add_device(struct device *parent, int id,
			res[r].end   = cell->resources[r].end;
			res[r].end   = cell->resources[r].end;
		}
		}


		if (!cell->ignore_resource_conflicts) {
			ret = acpi_check_resource_conflict(res);
			ret = acpi_check_resource_conflict(res);
			if (ret)
			if (ret)
				goto fail_res;
				goto fail_res;
		}
		}
	}


	ret = platform_device_add_resources(pdev, res, cell->num_resources);
	ret = platform_device_add_resources(pdev, res, cell->num_resources);
	if (ret)
	if (ret)
+3 −0
Original line number Original line Diff line number Diff line
@@ -44,6 +44,9 @@ struct mfd_cell {
	 */
	 */
	int			num_resources;
	int			num_resources;
	const struct resource	*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,
extern int mfd_add_devices(struct device *parent, int id,