summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmad Khalifa <ahmad@khalifa.ws>2022-10-05 00:01:01 +0300
committerGuenter Roeck <linux@roeck-us.net>2022-12-05 03:45:01 +0300
commit12c44ab8b401c29d8d3569aaea34da662b8ece1d (patch)
tree23003118c2de90ccbe6b2032aec84995a18d2aea
parent415519ad6966ce35f2535fc3ff95549414beb032 (diff)
downloadlinux-12c44ab8b401c29d8d3569aaea34da662b8ece1d.tar.xz
hwmon: (it87) Add param to ignore ACPI resource conflicts
Add parameter to ignore ACPI resource conflicts as an alternate to using 'acpi_enforce_resources=lax'. Some BIOSes reserve resources and don't use them and the system wide parameter may result in failures to certain drivers. Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws> Link: https://lore.kernel.org/r/20221004210100.540120-2-ahmad@khalifa.ws Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/hwmon/it87.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 7bd154ba351b..e920dd26225f 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -69,6 +69,10 @@ static unsigned short force_id;
module_param(force_id, ushort, 0);
MODULE_PARM_DESC(force_id, "Override the detected device ID");
+static bool ignore_resource_conflict;
+module_param(ignore_resource_conflict, bool, 0);
+MODULE_PARM_DESC(ignore_resource_conflict, "Ignore ACPI resource conflict");
+
static struct platform_device *it87_pdev[2];
#define REG_2E 0x2e /* The register to read/write */
@@ -3261,8 +3265,10 @@ static int __init it87_device_add(int index, unsigned short address,
int err;
err = acpi_check_resource_conflict(&res);
- if (err)
- return err;
+ if (err) {
+ if (!ignore_resource_conflict)
+ return err;
+ }
pdev = platform_device_alloc(DRVNAME, address);
if (!pdev)