All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxim Levitsky <maximlevitsky@gmail.com>
To: linux-iio@vger.kernel.org
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: BMI160 accelerometer on AyaNeo tablet
Date: Sat, 16 Oct 2021 19:27:50 +0300	[thread overview]
Message-ID: <CACAwPwYQHRcrabw9=0tvenPzAcwwW1pTaR6a+AEWBF9Hqf_wXQ@mail.gmail.com> (raw)
In-Reply-To: <CACAwPwb7edLzX-KO1XVNWuQ3w=U0BfA=_kwiGCjZOpKfZpc2pw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

On Sat, Oct 16, 2021 at 7:19 PM Maxim Levitsky <maximlevitsky@gmail.com> wrote:
>
> I recently bought this device, and it has this accelerometer/gyroscope.
>
> Unfortunately, the device is advertised in ACPI as 10EC5280, instead of BMI0160
>
> I attached a patch that does add this 10EC5280 to the list of ACPI ids of this driver, and the device seems to work fine, showing both acceleration and angular velocity in /sys IIO attributes with reasonable values.
>

( resend using plain text - reminds me to never use Gmail's web
interface, even on weekends .)

> Best regards,
>    Maxim Levitsky

[-- Attachment #2: accel_fix.patch --]
[-- Type: text/x-patch, Size: 771 bytes --]

commit 880bbf2e5ee2fa0e99798482664997a7db225f56
Author: Maxim Levitsky <mlevitsk@redhat.com>
Date:   Sat Oct 2 20:54:00 2021 +0300

    BMI160: AYA NEA accelometer ID
    
    On AYA NEO, the accelerometer is BMI160 but it is exposed
    via ACPI as 10EC5280
    
    Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>

diff --git a/drivers/iio/imu/bmi160/bmi160_i2c.c b/drivers/iio/imu/bmi160/bmi160_i2c.c
index 26398614eddfa..2b3e3e15e2e04 100644
--- a/drivers/iio/imu/bmi160/bmi160_i2c.c
+++ b/drivers/iio/imu/bmi160/bmi160_i2c.c
@@ -43,6 +43,7 @@ MODULE_DEVICE_TABLE(i2c, bmi160_i2c_id);
 
 static const struct acpi_device_id bmi160_acpi_match[] = {
 	{"BMI0160", 0},
+	{"10EC5280", 0}, /* AYA NEO tablet */
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, bmi160_acpi_match);

       reply	other threads:[~2021-10-16 16:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CACAwPwb7edLzX-KO1XVNWuQ3w=U0BfA=_kwiGCjZOpKfZpc2pw@mail.gmail.com>
2021-10-16 16:27 ` Maxim Levitsky [this message]
2021-10-17 10:58   ` BMI160 accelerometer on AyaNeo tablet Jonathan Cameron
2021-10-18  7:40     ` Andy Shevchenko
2021-10-18 15:17       ` Jonathan Cameron
2021-10-18 15:22         ` Andy Shevchenko
2021-10-18 15:30   ` Andy Shevchenko
2021-10-18 18:02     ` Maxim Levitsky
2021-10-18 19:02       ` Andy Shevchenko
2021-10-18 20:42         ` Maxim Levitsky
2021-10-19  9:58           ` Andy Shevchenko
2021-10-19 16:29             ` Maxim Levitsky
2021-10-20  2:31             ` Hayes Wang
     [not found]               ` <CAHp75VfB2FULb_jfQNg0wF9Z4jPkrKfmw6hSwtLg8Y1NhKks8g@mail.gmail.com>
2021-10-20 11:21                 ` Andy Shevchenko
2021-11-16 17:49                   ` Andy Shevchenko
2022-01-19 19:05                     ` Maxim Levitsky
2022-01-19 20:51                       ` Andy Shevchenko
2022-01-23 17:22                         ` Maxim Levitsky
2022-02-02 16:23                           ` Andy Shevchenko
2021-10-20 17:37             ` Jonathan Cameron
2021-10-20 20:03               ` Andy Shevchenko
2021-10-19  8:10         ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACAwPwYQHRcrabw9=0tvenPzAcwwW1pTaR6a+AEWBF9Hqf_wXQ@mail.gmail.com' \
    --to=maximlevitsky@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.