* [PATCH 1/3] MFD: allow for bypass of cell resource conflict check
@ 2010-09-30 20:55 Daniel Drake
2010-10-01 10:06 ` Samuel Ortiz
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Drake @ 2010-09-30 20:55 UTC (permalink / raw)
To: sameo; +Cc: linux-kernel, laforge
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>
---
drivers/mfd/mfd-core.c | 8 +++++---
include/linux/mfd/core.h | 3 +++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 1823a57..d1c8605 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -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);
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index 11d740b..cb93d80 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -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,
--
1.7.2.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 1/3] MFD: allow for bypass of cell resource conflict check
2010-09-30 20:55 [PATCH 1/3] MFD: allow for bypass of cell resource conflict check Daniel Drake
@ 2010-10-01 10:06 ` Samuel Ortiz
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2010-10-01 10:06 UTC (permalink / raw)
To: Daniel Drake; +Cc: linux-kernel, laforge
Hi Daniel,
On Thu, Sep 30, 2010 at 09:55:36PM +0100, Daniel Drake wrote:
> 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.
Thanks a lot. All 3 patches applied.
Cheers,
Samuel.
> Signed-off-by: Daniel Drake <dsd@laptop.org>
> ---
> drivers/mfd/mfd-core.c | 8 +++++---
> include/linux/mfd/core.h | 3 +++
> 2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
> index 1823a57..d1c8605 100644
> --- a/drivers/mfd/mfd-core.c
> +++ b/drivers/mfd/mfd-core.c
> @@ -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);
> diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
> index 11d740b..cb93d80 100644
> --- a/include/linux/mfd/core.h
> +++ b/include/linux/mfd/core.h
> @@ -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,
> --
> 1.7.2.3
>
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-01 10:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-30 20:55 [PATCH 1/3] MFD: allow for bypass of cell resource conflict check Daniel Drake
2010-10-01 10:06 ` Samuel Ortiz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox