All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] firmware: dmi_scan: add DMI_OEM_STRING support to dmi_matches
@ 2018-01-31  8:40 Alex Hung
  2018-01-31  8:40 ` [PATCH 2/2] ACPI / osi: add DMI quirk for Dell systems Alex Hung
  2018-02-05 10:26 ` [PATCH 1/2] firmware: dmi_scan: add DMI_OEM_STRING support to dmi_matches Jean Delvare
  0 siblings, 2 replies; 31+ messages in thread
From: Alex Hung @ 2018-01-31  8:40 UTC (permalink / raw)
  To: rjw, lenb, jdelvare, gregkh, davem, mika.westerberg,
	andriy.shevchenko, f.fainelli, dmitry.torokhov, kishon,
	karniksayli1995, linux-acpi, alex.hung, Mario.Limonciello

OEM strings are defined by each OEM and they contain customized and
useful OEM information. Supporting it provides more flexible uses of
the dmi_matches function.

Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 drivers/firmware/dmi_scan.c     | 8 ++++++++
 include/linux/mod_devicetable.h | 1 +
 2 files changed, 9 insertions(+)

diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 7830419..e534d1b 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -797,11 +797,19 @@ static bool dmi_matches(const struct dmi_system_id *dmi)
 			else if (dmi->matches[i].exact_match &&
 				 !strcmp(dmi_ident[s], dmi->matches[i].substr))
 				continue;
+		} else if (s == DMI_OEM_STRING) {
+			const struct dmi_device *valid;
+
+			valid = dmi_find_device(DMI_DEV_TYPE_OEM_STRING,
+						dmi->matches[i].substr, NULL);
+			if (valid)
+				continue;
 		}
 
 		/* No match */
 		return false;
 	}
+
 	return true;
 }
 
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index abb6dc2..5739c4c 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -482,6 +482,7 @@ enum dmi_field {
 	DMI_CHASSIS_VERSION,
 	DMI_CHASSIS_SERIAL,
 	DMI_CHASSIS_ASSET_TAG,
+	DMI_OEM_STRING,
 	DMI_STRING_MAX,
 };
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2018-02-15  9:44 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-31  8:40 [PATCH 1/2] firmware: dmi_scan: add DMI_OEM_STRING support to dmi_matches Alex Hung
2018-01-31  8:40 ` [PATCH 2/2] ACPI / osi: add DMI quirk for Dell systems Alex Hung
2018-02-05 13:14   ` Jean Delvare
2018-02-05 14:15     ` Andy Shevchenko
2018-02-05 17:36       ` Mario.Limonciello
2018-02-05 22:45         ` Dmitry Torokhov
2018-02-06  0:45           ` Mario.Limonciello
2018-02-06 13:45             ` Andy Shevchenko
2018-02-06 16:24               ` Mario.Limonciello
2018-02-07 20:38                 ` Alex Hung
2018-02-07 20:49                   ` Mario.Limonciello
2018-02-11  9:29               ` Rafael J. Wysocki
2018-02-11 13:45                 ` Lukas Wunner
2018-02-12  9:49                   ` Rafael J. Wysocki
2018-02-12 20:29                     ` Mario.Limonciello
2018-02-12 22:57                       ` Rafael J. Wysocki
2018-02-12 23:14                         ` Mario.Limonciello
2018-02-13  5:25                           ` Alex Hung
2018-02-13  7:32                           ` Mika Westerberg
2018-02-14  9:06                             ` Rafael J. Wysocki
2018-02-14  9:50                               ` Mika Westerberg
2018-02-13  9:18                           ` Rafael J. Wysocki
2018-02-13  9:55                             ` Lukas Wunner
2018-02-14  9:10                               ` Rafael J. Wysocki
2018-02-14 18:47                             ` Mario.Limonciello
2018-02-15  9:44                               ` Rafael J. Wysocki
2018-02-05 17:24     ` Mario.Limonciello
2018-02-05 21:55       ` Jean Delvare
2018-02-07 20:05     ` Alex Hung
2018-02-05 10:26 ` [PATCH 1/2] firmware: dmi_scan: add DMI_OEM_STRING support to dmi_matches Jean Delvare
2018-02-07  5:25   ` Alex Hung

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.