From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F795C433EF for ; Tue, 19 Oct 2021 08:10:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5101861264 for ; Tue, 19 Oct 2021 08:10:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234643AbhJSIMa (ORCPT ); Tue, 19 Oct 2021 04:12:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59081 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234657AbhJSIM2 (ORCPT ); Tue, 19 Oct 2021 04:12:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634631015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FkXFhcV+/zxfEYqnjfBha3xxa5ZEj2GAqqrXULNm9mw=; b=hKP+eEcgZEHIb89PAnrq8lZwFpSgDsauVQnzETba3QPGhISLwMBhP/iHeU9qBiv97vJ07I q6PFX69WbTjMnSNd/D9YKGcYRvrxo2ezrVZDPXcyTfmHsMAbEvPc+bto3+7y5T6sKbBUWb ad0vLrQV9frEDfM6xqNcRgoPm6ykB0M= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-327-fOEGH-dFNUGBIPtzZgzBVw-1; Tue, 19 Oct 2021 04:10:14 -0400 X-MC-Unique: fOEGH-dFNUGBIPtzZgzBVw-1 Received: by mail-ed1-f72.google.com with SMTP id h19-20020aa7de13000000b003db6ad5245bso16905871edv.9 for ; Tue, 19 Oct 2021 01:10:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=FkXFhcV+/zxfEYqnjfBha3xxa5ZEj2GAqqrXULNm9mw=; b=gaujLSeWAIsN1Z2fE+QifUJarIKIDwd4UTiivrgh//wtiJhDcCYUDkoINxW7ajRnSn c1Oj/oUn+M74L1+uZTJngJRCoosmA7DcopRtaNCqxZH9edjo0TQ2IjF13c71DQ3EAZAq KWEOW3bn2ajXrVOm0lOoGRw6URTWUzWMCfIlRfdpXh55BEU7bjiWwtlYl0a7j1bSX0j3 uKLcpKmWDxTbUc2hR4iOUxlfLn53a+vUCDHxgf52qkehfd4/WBODlY0wKfmAKzIYueHE H4H/9+2wfQYTvR5c8N9Yt/tOm/8jFXMmsjG0HyYNqvMFXwh8ZZJ9xkf+K4i24i/hxSPu k+Xw== X-Gm-Message-State: AOAM530WHWeP3oD54pjUFPdVNfcait6FA1DrQKu9xpFRSwcU5lkra3Qa vne+Zi6AgfW46JpewQoNFuqyAYPWZAVGFwDSwin3dXIoXchR1exT6vlmvsr3SLivveVOYuDsYJn u3OULS8LJGM8PeX52ngjS7XIo X-Received: by 2002:a50:d885:: with SMTP id p5mr52171853edj.255.1634631012916; Tue, 19 Oct 2021 01:10:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzosqBQafK63EMeHqdbkT6tgiXIRHSVtmPYVHpHH/GgdpC3lhfGo5ZhNFQunq7pMNngQ60wzw== X-Received: by 2002:a50:d885:: with SMTP id p5mr52171824edj.255.1634631012690; Tue, 19 Oct 2021 01:10:12 -0700 (PDT) Received: from ?IPV6:2001:1c00:c1e:bf00:1054:9d19:e0f0:8214? (2001-1c00-0c1e-bf00-1054-9d19-e0f0-8214.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:1054:9d19:e0f0:8214]) by smtp.gmail.com with ESMTPSA id q9sm9816205ejf.70.2021.10.19.01.10.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Oct 2021 01:10:12 -0700 (PDT) Message-ID: <7522243d-79f4-9687-103f-3692eb70533f@redhat.com> Date: Tue, 19 Oct 2021 10:10:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: BMI160 accelerometer on AyaNeo tablet Content-Language: en-US To: Andy Shevchenko , Maxim Levitsky Cc: linux-realtek-soc@lists.infradead.org, Oder Chiou , Ping-Ke Shih , nic_swsd@realtek.com, Derek Fang , Hayes Wang , Kailang Yang , linux-iio , Lars-Peter Clausen , LKML , info@ayaneo.com References: From: Hans de Goede In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 10/18/21 21:02, Andy Shevchenko wrote: > On Mon, Oct 18, 2021 at 09:02:40PM +0300, Maxim Levitsky wrote: >> I also suspect a mistake from the hardware vendors. >> >> I attached all DSDT decompiled, which shows that they indeed use that >> ID, and I also attached the windows driver .INF which was published on >> their website with the driver (https://www.ayaneo.com/downloads) >> >> They are a small startup so they might have used the realtek ID by mistake. >> I added them to the CC. > > Thank you for sharing. Seems they indeed used (deliberately or not) the wrong > ID. So there are questions I have: > - Is the firmware available in the wild? > - Do they plan to update firmware to fix this? > - Can we make sure that guys got their mistake and will be more careful > in the future? > > Realtek probably should make this ID marked somehow broken and not use > in their products in case the answer to the first of the above question > is "yes". (Of course in case the ID will be used for solely PCI enumerated > product there will be no conflict, I just propose to be on the safest side, > but remark should be made somewhere). > >> BTW, I also notice a rotation matrix embedded in DSTD, but the linux's >> BMI160 driver doesn't recognize it. > > This is done by the commit 8a0672003421 ("iio: accel: bmc150: Get > mount-matrix from ACPI") which needs to be amended to take care about > more devices, somewhere in drivers/iio/industialio-acpi.c ? Jonathan, > Hans, what do you think? First of all the vendor needs to be asked to fix their DSDT to just use BOSC0200 as HID. That will fix both the driver not binding as well as it will make the bmc150_apply_acpi_orientation() just work. If we are going to add the funky ACPI HID to the driver, then this HID check in bmc150_apply_acpi_orientation(): if (!adev || !acpi_dev_hid_uid_match(adev, "BOSC0200", NULL)) return false; Should probable just be dropped changing the check to just: if (!adev) return false; We already check for the method name later, so the HID check is not really necessary. This dropping of the HID check should probably be done in a separate commit, with its own explanation of why this is ok. Regards, Hans