linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Asus T300CHI.
@ 2015-09-17 21:07 Mike Mestnik
  2015-09-19 18:31 ` Mike Mestnik
  2015-09-19 18:48 ` Daniel Baluta
  0 siblings, 2 replies; 13+ messages in thread
From: Mike Mestnik @ 2015-09-17 21:07 UTC (permalink / raw)
  To: linux-iio

Hello,
  I'm looking to know the result of adding ACPI support for a new
tablet, the existing support shouldn't work because of a misplaced
__init that causes the function to be removed prior to being called.
After applying this patch I feel that I've moved support for the
T300CHI backwards.  What should be the intended effect of using the
ACPI interface?

Index: linux-4.1.3/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
===================================================================
--- linux-4.1.3.orig/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
+++ linux-4.1.3/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
@@ -23,27 +23,44 @@
 enum inv_mpu_product_name {
  INV_MPU_NOT_MATCHED,
  INV_MPU_ASUS_T100TA,
+ INV_MPU_ASUS_T300CHI,
 };

 static enum inv_mpu_product_name matched_product_name;

-static int __init asus_t100_matched(const struct dmi_system_id *d)
+static int asus_t100ta_matched(const struct dmi_system_id *d)
 {
  matched_product_name = INV_MPU_ASUS_T100TA;

  return 0;
 }

+static int asus_t300chi_matched(const struct dmi_system_id *d)
+{
+ matched_product_name = INV_MPU_ASUS_T300CHI;
+
+ return 0;
+}
+
 static const struct dmi_system_id inv_mpu_dev_list[] = {
  {
- .callback = asus_t100_matched,
- .ident = "Asus Transformer Book T100",
+ .callback = asus_t100ta_matched,
+ .ident = "Asus Transformer Book T100TA",
  .matches = {
  DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC"),
  DMI_MATCH(DMI_PRODUCT_NAME, "T100TA"),
  DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"),
  },
  },
+ {
+ .callback = asus_t300chi_matched,
+ .ident = "Asus Transformer Book T300CHI",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "T300CHI"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"),
+ },
+ },
  /* Add more matching tables here..*/
  {}
 };
@@ -154,6 +171,7 @@ int inv_mpu_acpi_create_mux_client(struc
  dmi_check_system(inv_mpu_dev_list);
  switch (matched_product_name) {
  case INV_MPU_ASUS_T100TA:
+ case INV_MPU_ASUS_T300CHI:
  ret = asus_acpi_get_sensor_info(adev, st->client,
  &info);
  break;

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

end of thread, other threads:[~2015-09-25 16:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-17 21:07 [PATCH] Asus T300CHI Mike Mestnik
2015-09-19 18:31 ` Mike Mestnik
2015-09-19 18:48 ` Daniel Baluta
2015-09-19 19:03   ` Mike Mestnik
2015-09-20 19:08     ` Jonathan Cameron
2015-09-20 22:42       ` Bastien Nocera
2015-09-20 22:55         ` Mike Mestnik
2015-09-21 14:26         ` Mike Mestnik
2015-09-21 19:46           ` Jonathan Cameron
2015-09-24 15:57             ` Mike Mestnik
2015-09-25 14:19               ` Srinivas Pandruvada
2015-09-25 16:40                 ` Mike Mestnik
2015-09-21 19:47         ` Jonathan Cameron

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).