* [PATCH v2] i2c: i2c-scmi: add a MS HID
@ 2017-04-04 16:18 Viktor Krasnov
2017-04-05 12:59 ` Jean Delvare
2017-04-16 19:50 ` Wolfram Sang
0 siblings, 2 replies; 4+ messages in thread
From: Viktor Krasnov @ 2017-04-04 16:18 UTC (permalink / raw)
To: jdelvare, wsa
Cc: linux-i2c, linux-acpi, mika.westerberg, andriy.shevchenko,
jarkko.nikula, echerkasov, Michael.Brunner, Viktor Krasnov
From: Edgar Cherkasov <echerkasov@dev.rtsoft.ru>
Description of the problem:
- i2c-scmi driver contains only two identifiers "SMBUS01" and "SMBUSIBM";
- the fist HID (SMBUS01) is clearly defined in "SMBus Control Method
Interface Specification, version 1.0": "Each device must specify
'SMBUS01' as its _HID and use a unique _UID value";
- unfortunately, BIOS vendors (like AMI) seem to ignore this requirement
and implement "SMB0001" HID instead of "SMBUS01";
- I speculate that they do this because only "SMB0001" is hard coded in
Windows SMBus driver produced by Microsoft.
This leads to following situation:
- SMBus works out of box in Windows but not in Linux;
- board vendors are forced to add correct "SMBUS01" HID to BIOS to make
SMBus work in Linux. Moreover the same board vendors complain that
tools (3-rd party ASL compiler) do not like the "SMBUS01" identifier
and produce errors. So they need to constantly patch the compiler for
each new version of BIOS.
As it is very unlikely that BIOS vendors implement a correct HID in
future, I would propose to consider whether it is possible to work around
the problem by adding MS HID to the Linux i2c-scmi driver.
v2: move the definition of the new HID to the driver itself.
Signed-off-by: Edgar Cherkasov <echerkasov@dev.rtsoft.ru>
Signed-off-by: Michael Brunner <Michael.Brunner@kontron.com>
Acked-by: Viktor Krasnov <vkrasnov@dev.rtsoft.ru>
---
drivers/i2c/busses/i2c-scmi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/i2c/busses/i2c-scmi.c b/drivers/i2c/busses/i2c-scmi.c
index dfc98df..f876dd6 100644
--- a/drivers/i2c/busses/i2c-scmi.c
+++ b/drivers/i2c/busses/i2c-scmi.c
@@ -18,6 +18,9 @@
#define ACPI_SMBUS_HC_CLASS "smbus"
#define ACPI_SMBUS_HC_DEVICE_NAME "cmi"
+/* SMBUS HID definition as supported by Microsoft Windows */
+#define ACPI_SMBUS_MS_HID "SMB0001"
+
ACPI_MODULE_NAME("smbus_cmi");
struct smbus_methods_t {
@@ -51,6 +54,7 @@ struct acpi_smbus_cmi {
static const struct acpi_device_id acpi_smbus_cmi_ids[] = {
{"SMBUS01", (kernel_ulong_t)&smbus_methods},
{ACPI_SMBUS_IBM_HID, (kernel_ulong_t)&ibm_smbus_methods},
+ {ACPI_SMBUS_MS_HID, (kernel_ulong_t)&smbus_methods},
{"", 0}
};
MODULE_DEVICE_TABLE(acpi, acpi_smbus_cmi_ids);
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] i2c: i2c-scmi: add a MS HID
2017-04-04 16:18 [PATCH v2] i2c: i2c-scmi: add a MS HID Viktor Krasnov
@ 2017-04-05 12:59 ` Jean Delvare
2017-04-06 8:03 ` Mika Westerberg
2017-04-16 19:50 ` Wolfram Sang
1 sibling, 1 reply; 4+ messages in thread
From: Jean Delvare @ 2017-04-05 12:59 UTC (permalink / raw)
To: Viktor Krasnov
Cc: wsa, linux-i2c, linux-acpi, mika.westerberg, andriy.shevchenko,
jarkko.nikula, echerkasov, Michael.Brunner
On Tue, 4 Apr 2017 19:18:27 +0300, Viktor Krasnov wrote:
> From: Edgar Cherkasov <echerkasov@dev.rtsoft.ru>
>
> Description of the problem:
> - i2c-scmi driver contains only two identifiers "SMBUS01" and "SMBUSIBM";
> - the fist HID (SMBUS01) is clearly defined in "SMBus Control Method
> Interface Specification, version 1.0": "Each device must specify
> 'SMBUS01' as its _HID and use a unique _UID value";
> - unfortunately, BIOS vendors (like AMI) seem to ignore this requirement
> and implement "SMB0001" HID instead of "SMBUS01";
> - I speculate that they do this because only "SMB0001" is hard coded in
> Windows SMBus driver produced by Microsoft.
>
> This leads to following situation:
> - SMBus works out of box in Windows but not in Linux;
> - board vendors are forced to add correct "SMBUS01" HID to BIOS to make
> SMBus work in Linux. Moreover the same board vendors complain that
> tools (3-rd party ASL compiler) do not like the "SMBUS01" identifier
> and produce errors. So they need to constantly patch the compiler for
> each new version of BIOS.
>
> As it is very unlikely that BIOS vendors implement a correct HID in
> future, I would propose to consider whether it is possible to work around
> the problem by adding MS HID to the Linux i2c-scmi driver.
>
> v2: move the definition of the new HID to the driver itself.
>
> Signed-off-by: Edgar Cherkasov <echerkasov@dev.rtsoft.ru>
> Signed-off-by: Michael Brunner <Michael.Brunner@kontron.com>
> Acked-by: Viktor Krasnov <vkrasnov@dev.rtsoft.ru>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
> ---
> drivers/i2c/busses/i2c-scmi.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/i2c/busses/i2c-scmi.c b/drivers/i2c/busses/i2c-scmi.c
> index dfc98df..f876dd6 100644
> --- a/drivers/i2c/busses/i2c-scmi.c
> +++ b/drivers/i2c/busses/i2c-scmi.c
> @@ -18,6 +18,9 @@
> #define ACPI_SMBUS_HC_CLASS "smbus"
> #define ACPI_SMBUS_HC_DEVICE_NAME "cmi"
>
> +/* SMBUS HID definition as supported by Microsoft Windows */
> +#define ACPI_SMBUS_MS_HID "SMB0001"
> +
> ACPI_MODULE_NAME("smbus_cmi");
>
> struct smbus_methods_t {
> @@ -51,6 +54,7 @@ struct acpi_smbus_cmi {
> static const struct acpi_device_id acpi_smbus_cmi_ids[] = {
> {"SMBUS01", (kernel_ulong_t)&smbus_methods},
> {ACPI_SMBUS_IBM_HID, (kernel_ulong_t)&ibm_smbus_methods},
> + {ACPI_SMBUS_MS_HID, (kernel_ulong_t)&smbus_methods},
> {"", 0}
> };
> MODULE_DEVICE_TABLE(acpi, acpi_smbus_cmi_ids);
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] i2c: i2c-scmi: add a MS HID
2017-04-05 12:59 ` Jean Delvare
@ 2017-04-06 8:03 ` Mika Westerberg
0 siblings, 0 replies; 4+ messages in thread
From: Mika Westerberg @ 2017-04-06 8:03 UTC (permalink / raw)
To: Jean Delvare
Cc: Viktor Krasnov, wsa, linux-i2c, linux-acpi, andriy.shevchenko,
jarkko.nikula, echerkasov, Michael.Brunner
On Wed, Apr 05, 2017 at 02:59:32PM +0200, Jean Delvare wrote:
> On Tue, 4 Apr 2017 19:18:27 +0300, Viktor Krasnov wrote:
> > From: Edgar Cherkasov <echerkasov@dev.rtsoft.ru>
> >
> > Description of the problem:
> > - i2c-scmi driver contains only two identifiers "SMBUS01" and "SMBUSIBM";
> > - the fist HID (SMBUS01) is clearly defined in "SMBus Control Method
> > Interface Specification, version 1.0": "Each device must specify
> > 'SMBUS01' as its _HID and use a unique _UID value";
> > - unfortunately, BIOS vendors (like AMI) seem to ignore this requirement
> > and implement "SMB0001" HID instead of "SMBUS01";
> > - I speculate that they do this because only "SMB0001" is hard coded in
> > Windows SMBus driver produced by Microsoft.
> >
> > This leads to following situation:
> > - SMBus works out of box in Windows but not in Linux;
> > - board vendors are forced to add correct "SMBUS01" HID to BIOS to make
> > SMBus work in Linux. Moreover the same board vendors complain that
> > tools (3-rd party ASL compiler) do not like the "SMBUS01" identifier
> > and produce errors. So they need to constantly patch the compiler for
> > each new version of BIOS.
> >
> > As it is very unlikely that BIOS vendors implement a correct HID in
> > future, I would propose to consider whether it is possible to work around
> > the problem by adding MS HID to the Linux i2c-scmi driver.
> >
> > v2: move the definition of the new HID to the driver itself.
> >
> > Signed-off-by: Edgar Cherkasov <echerkasov@dev.rtsoft.ru>
> > Signed-off-by: Michael Brunner <Michael.Brunner@kontron.com>
> > Acked-by: Viktor Krasnov <vkrasnov@dev.rtsoft.ru>
>
> Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] i2c: i2c-scmi: add a MS HID
2017-04-04 16:18 [PATCH v2] i2c: i2c-scmi: add a MS HID Viktor Krasnov
2017-04-05 12:59 ` Jean Delvare
@ 2017-04-16 19:50 ` Wolfram Sang
1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2017-04-16 19:50 UTC (permalink / raw)
To: Viktor Krasnov
Cc: jdelvare, linux-i2c, linux-acpi, mika.westerberg,
andriy.shevchenko, jarkko.nikula, echerkasov, Michael.Brunner
[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]
On Tue, Apr 04, 2017 at 07:18:27PM +0300, Viktor Krasnov wrote:
> From: Edgar Cherkasov <echerkasov@dev.rtsoft.ru>
>
> Description of the problem:
> - i2c-scmi driver contains only two identifiers "SMBUS01" and "SMBUSIBM";
> - the fist HID (SMBUS01) is clearly defined in "SMBus Control Method
> Interface Specification, version 1.0": "Each device must specify
> 'SMBUS01' as its _HID and use a unique _UID value";
> - unfortunately, BIOS vendors (like AMI) seem to ignore this requirement
> and implement "SMB0001" HID instead of "SMBUS01";
> - I speculate that they do this because only "SMB0001" is hard coded in
> Windows SMBus driver produced by Microsoft.
>
> This leads to following situation:
> - SMBus works out of box in Windows but not in Linux;
> - board vendors are forced to add correct "SMBUS01" HID to BIOS to make
> SMBus work in Linux. Moreover the same board vendors complain that
> tools (3-rd party ASL compiler) do not like the "SMBUS01" identifier
> and produce errors. So they need to constantly patch the compiler for
> each new version of BIOS.
>
> As it is very unlikely that BIOS vendors implement a correct HID in
> future, I would propose to consider whether it is possible to work around
> the problem by adding MS HID to the Linux i2c-scmi driver.
>
> v2: move the definition of the new HID to the driver itself.
>
> Signed-off-by: Edgar Cherkasov <echerkasov@dev.rtsoft.ru>
> Signed-off-by: Michael Brunner <Michael.Brunner@kontron.com>
> Acked-by: Viktor Krasnov <vkrasnov@dev.rtsoft.ru>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-16 19:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-04 16:18 [PATCH v2] i2c: i2c-scmi: add a MS HID Viktor Krasnov
2017-04-05 12:59 ` Jean Delvare
2017-04-06 8:03 ` Mika Westerberg
2017-04-16 19:50 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).