Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp220842pxb; Tue, 19 Oct 2021 01:13:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHMAEiDQvdjz7VV24F7xkH6/+Ma1Ph9We/1F0Z0q5OhES2x0VZkr0bGAVy7ZZEfdXQRB3i X-Received: by 2002:a17:902:ab0e:b0:13f:37ae:9582 with SMTP id ik14-20020a170902ab0e00b0013f37ae9582mr32387294plb.82.1634631195847; Tue, 19 Oct 2021 01:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634631195; cv=none; d=google.com; s=arc-20160816; b=Qz21X+HIQoI1cGN8I2z2oTF0j6MKqi+4q3Zyxa4IViIVKaw/hj6RNGr4UBvqW2qXiV DP5OzPhWtCck4ibvZQZ5OG0Q3iks5rTZKxrVPZtFVwvPfVoKK+VMzUXvEQq7OY/32oIL obTCOHF9ARRNHZib2GThSviwg1zpqb7CQ1bCliB/zTPS8kyPaoa+VwXcrImrW8SQgTAW jjtj5wlQzvV6TTtkoy1/HuOneo90jIs/irNYZFkszqThlp1iiwNCT/lflp3smshKHPpt VnAMyCzWQS0F6bIeT4LLP86vQ69JA1uQET8bZ63A5y65CzVllJ5xlmUX6bmf+ti0adPs cxnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=FkXFhcV+/zxfEYqnjfBha3xxa5ZEj2GAqqrXULNm9mw=; b=SDk7FB56rPr+BCaVVcrgNiuyJuvZwsheorgxsXdE1kvVOvzaOVClzEXuD0d9K0VMpE dZwX/BNaOM3Nq+KcCO2mVt+iq1M+hp1ONOxTC3qJbmsdA33+fs6oqTduM62sLHPMtaZZ zK8Vd+0mvXNdtApBNx1hhpVlJcHg40aszXddjIa/+KfHvSFB3jImo26z+cf2J57ILVUC XDgSqwDwUsvi0GMNf0QrkQCfGPdHisVRBPz6lObVlOB1jo9XCDmZ1F/OeaRyw42+YXJ3 u9Eq2iDc5qOxLNJ7gi3CGOVukNRt3exfRshtNM/uWnHvLpae9M1T/y+H5QCKUA6OpaKN 6D2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hKP+eEcg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 67si22828303pga.139.2021.10.19.01.13.01; Tue, 19 Oct 2021 01:13:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hKP+eEcg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234596AbhJSIM3 (ORCPT + 99 others); Tue, 19 Oct 2021 04:12:29 -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-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