Received: by 10.223.176.5 with SMTP id f5csp1333260wra; Wed, 31 Jan 2018 05:01:17 -0800 (PST) X-Google-Smtp-Source: AH8x226u3bu2HDSjUVLim89wzwmaHDRDp0mlI4ETwvlvaLWC/DuYwiAh8QuV26y/2DgQIZq4NB7S X-Received: by 10.98.97.4 with SMTP id v4mr23236652pfb.160.1517403677600; Wed, 31 Jan 2018 05:01:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517403677; cv=none; d=google.com; s=arc-20160816; b=EBsgTvoGhy6kRaAUMXB4FrgCOtov9nG2dBRdWv0tqamfzUJixOlv5IYMOPTFrzQqC+ MU16k5AWT8TnCOs2zkLFSEi2vrAlnqAbkJM7kUtDvKmgjdUUtY9As528/DTMntwFRJAP f3oLy4EV4XGHlMMx9I8vus73RrQ6RgNniVVVhXXq2CEW1n6ZdpBMzhM/nwbtUtqKT4fo GMO782P6hY1z0bUyFAb8Ew7wIwIjyL9ijM++uBFUfZ2UZ4AaPaAWRXMSiW5/NTn+s7Ys fmGoqzixsoKAhxNOZ7nXzZLUze0DkbQd8T+3uD6mh7vlCpLBWIfeUscuwqbb/97VGxlw zMuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=pszlnE0mIOcugdoRqVVMUszgcRU4ci/G7z8knYAJkWk=; b=zr/McujtF4OkUHQeApEs1ywsaZ6MBpF/MJrEX5nzw6gXSaeGO1BTk/Yo6xZ/a0V5aT 3tQSsNQXgx1vdAXFAkbVo7WNhrLaSKiIDOFkQG+rgs1lUe5WN+wqOcR5gZoQ+8sxih3F Q9xEkyQU2Xyn0akOIWaAHGkJuX5D9lIoo7QbQBvbV7zdj51QtXb5lIjhww2Hy35pI+R4 qfnFH2MF/0CNtm8dzmWgTAxMqp/S0h0chfxVweV6pzqsY7TDKXK+Q2lSfU3aBvB2lj41 QwsOXtOIB+D5lFTkPrJ1BrSGi/CchGxPs+vyfsl9f/X1PQLbfDv9Aqz530loFTaxNlDt PZwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si1667393plg.710.2018.01.31.05.01.02; Wed, 31 Jan 2018 05:01:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753102AbeAaLnw (ORCPT + 99 others); Wed, 31 Jan 2018 06:43:52 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:38978 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751690AbeAaLnt (ORCPT ); Wed, 31 Jan 2018 06:43:49 -0500 Received: by mail-wm0-f45.google.com with SMTP id b21so7390054wme.4 for ; Wed, 31 Jan 2018 03:43:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=pszlnE0mIOcugdoRqVVMUszgcRU4ci/G7z8knYAJkWk=; b=iX0fXzxaAI3ylMVZFMR213YvT/L3faZCuPcMBozw5KB2RpoFnMQ6PwqAXWozNXwEz3 aPThatW9XeyGPzDQJwFj1Fk1VLPO4V2tkV389WTngMx1dwncZX2zdO7SaXb87zy1wfrX BmhbY2EcRCEWnxAMUfe4tc8Az03sdsdgNT/VTQSjVc/kXTL1R7m6VRAjTtlk+DovgQJA Z5s+XtYXUd+ZOwT0LYUWi9P0vO9TfUDQPbpIqX6B4EIWwIzOUCtPcfQGwNyI16eBqk+P 3sWp2HcMhJMwAgCKH+f9gr/TssTCgWnc8w5Us/LvxnPh2Oq5WbxPKu4bFJ8TsIlGb7Fb gJcg== X-Gm-Message-State: AKwxytdnrWI0RPDkgKJmtQJrxRzDqYVuXKJlldRmPZkOD3g4BQbKeKhd XjnJplDjsEAlcuE33Nl99bz0Cg== X-Received: by 10.80.146.182 with SMTP id k51mr57876987eda.110.1517399028347; Wed, 31 Jan 2018 03:43:48 -0800 (PST) Received: from 192.168.2.7 (ip3e83efe3.speed.planet.nl. [62.131.239.227]) by smtp.gmail.com with ESMTPSA id j17sm9847479ede.84.2018.01.31.03.43.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jan 2018 03:43:47 -0800 (PST) Subject: Re: [PATCH v2] iio: accel: bmc150: Check for a second ACPI device for BOSC0200 To: Andy Shevchenko , Steve Presser Cc: Hartmut Knaack , Jeremy Cline , Jonathan Cameron , Jonathan Cameron , Lars Kellogg-Stedman , Lars-Peter Clausen , Linux Kernel Mailing List , Mika Westerberg , Peter Meerwald-Stadler , Wolfram Sang , linux-iio@vger.kernel.org References: <010001602cf53153-39ad69f1-1b39-4e6d-a748-9455a16c2fbd-000000@email.amazonses.com> <20171210182152.70ad8fbf@archlinux> <01000160dccefcb4-25edfd89-56f3-486f-88a4-cb8c07253974-000000@email.amazonses.com> <20180114104330.2aa7c1fd@archlinux> <20180128094021.572ab366@archlinux> <20180130160107.000006df@huawei.com> From: Hans de Goede Message-ID: <9171d401-32de-b334-40da-5e80a00e24d9@redhat.com> Date: Wed, 31 Jan 2018 12:43:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org H5, On 01/30/2018 06:38 PM, Andy Shevchenko wrote: > On Tue, Jan 30, 2018 at 7:25 PM, Steve Presser wrote: >> Andy, >> >> Where did the assertion the second device is a magnetometer come from? Just >> the data sheet? > > Yep. See chapter 8.2. Isn't enough proof? Or you believe in two > accelerometers with off-by-one conflicting address on a cheap laptop > with left unused two magnetometers on the same time? This is not a cheap device, this has been seen on a Lenovo Yoga 11e, the yoga's typically have an accelerometer in both the base and the display and have no use for a magnetometer. Not saying that you're wrong, but my expectations are different. Anyways we need to find someone to test this, I asked Jeremy to write a patch for this because we had Yoga 11e user (Lars Kellogg-Stedman in the CC) asking question and Jeremy did ask that Lars to test. It looks like we will need to reach out to Lars and get some testing done to figure this out one way or the other. Lars if you're reading this can you please reply. If you've trouble building your own kernels for testing, would you be willing to install Fedora so that we can provide test kernels for you? Regards, Hans p.s. For reference here is the relevant DSDT blurb from the Yoga 11e: Device (ACC) { Name (_ADR, Zero) // _ADR: Address Name (_HID, "BOSC0200") // _HID: Hardware ID Name (_CID, "BOSC0200") // _CID: Compatible ID Name (_DDN, "Accelerometer") // _DDN: DOS Device Name Name (_UID, One) // _UID: Unique ID Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Name (RBUF, ResourceTemplate () { I2cSerialBusV2 (0x0019, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.PCI0.I2C3", 0x00, ResourceConsumer, , Exclusive, ) I2cSerialBusV2 (0x0018, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.PCI0.I2C3", 0x00, ResourceConsumer, , Exclusive, ) }) Return (RBUF) /* \_SB_.PCI0.I2C3.ACC_._CRS.RBUF */ } > > And we have a driver for magnetometer separately. > > So, it looks like we need to move ACPI ID to a new "kinda I2C mfd" IIO > driver under drivers/iio/imu/bmc150_i2c.c > > >> Steve >> >> >> On Tue, Jan 30, 2018, 12:05 PM Andy Shevchenko >> wrote: >>> >>> On Tue, Jan 30, 2018 at 6:40 PM, Andy Shevchenko >>> wrote: >>>> On Tue, Jan 30, 2018 at 6:01 PM, Jonathan Cameron >>>> wrote: >>>>> On Mon, 29 Jan 2018 16:07:02 +0200 >>>>> Andy Shevchenko wrote: >>>> >>>>>>> But that would take much longer. Feel free to propose it and a >>>>>>> patch >>>>>>> removing the ifdef fun if you like! >>>> >>>>>> Where can I see the patch? >>>> >>>>> Doh. I clearly forgot to push out. Should be able to push to >>>>> iio.git on kernel.org later. >>>> >>>> Thanks, I can see it now. >>>> >>>> This patch almost wrong. Not by functionality it brings, but by style. >>> >>> Oy vey, the second device is *not* accelerometer, it is a magnetometer >>> [1]. >>> >>> [1]: https://www.mouser.com/ds/2/783/BST-BMC150-DS000-04-786477.pdf >>> >>>> I'll send soon a series of fixes to the driver (compile tested only) >>>> to provide my view on the matters. >>>> >>>> P.S. In the future (I have some kind of deja vu I have told this >>>> already to someone), please, Cc one or more of Rafael, Mika and/or me >>>> for ACPI matters. >>> >>> -- >>> With Best Regards, >>> Andy Shevchenko > > >