Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp689851ybl; Wed, 4 Dec 2019 09:17:11 -0800 (PST) X-Google-Smtp-Source: APXvYqz3DAmySwAM8J3L6s0jFSlKvGxzR68hZVBpfgMZqBIjt/+AoRo1B4OjPTDOH0Pp3PFIhNaW X-Received: by 2002:aca:4911:: with SMTP id w17mr3364046oia.22.1575479830679; Wed, 04 Dec 2019 09:17:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575479830; cv=none; d=google.com; s=arc-20160816; b=Kri1tbCdrGgephBa4+U0Ibmmq4TZq561D45aBFa1MJERZ4TjNAipyKuRm6a9Hl3ocS +aW34z1WoP730AVx2N3f9vrkVs8A6kTAWbYiBa1f/33bZ+ibyGdw+9oetl+IaPxYhgYm 4bN5+0w1riwZs9Zs2nX9FQtfnDEv8olCaUCBjNZl2kAulJ1BDIZnqCfo5LGC1YDlg0tJ epOV1vOP+ikZZRlW5WenQhF3jB+LHjtouUHg3EOiq864UbfaZyGu9udw5FClqMi9sRAw hOtDgvq2m7r5NAwB+eBJ7wMmt2mkFCSn94YLRHKkKU3k1qYRNsHSMYbPMPIR7aZG5ST1 HChg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:dkim-signature; bh=fM9gZLoQRia+2GDaGW/gGDM8eE+aeESRND/QjUP9zVM=; b=reJyJynU9nUoL6W5QXU+qmCb4ct+UGcMJal8hyBXoV8gUYxwVqzKDyCZrJ4uKFR8rx ZWhjtluzwdVNCjIQwf4BDHKhRwC5ZIvVZIFLT/4Fzd7VDor3sWhghICRVHmtTtQWoPHK N9h8PdOIMaZ92/kQl/1HFyt4YlTr1r2ObET60HfhSy6yvv4EMjs5gs+J4704Hh36j6Jt D13HvkPIo8NFXtsODPrxzHkoGOmRF1Zxhpkt17t6UeBuFWP8tkleAWGFfhGfSfW7cZJ7 bd2n5zzCtRd57CfAAmoXjL+aw8wvsuuM60IP7XbutvP9MzH6d+BNBKQfZCzOaN7xPrv0 i4XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@qrpff.net header.s=qrpff.net header.b=qDRuLg+s; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h9si3428867otb.49.2019.12.04.09.16.57; Wed, 04 Dec 2019 09:17:10 -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; dkim=pass header.i=@qrpff.net header.s=qrpff.net header.b=qDRuLg+s; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728454AbfLDP4M (ORCPT + 99 others); Wed, 4 Dec 2019 10:56:12 -0500 Received: from egyptian.birch.relay.mailchannels.net ([23.83.209.56]:45257 "EHLO egyptian.birch.relay.mailchannels.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727828AbfLDP4L (ORCPT ); Wed, 4 Dec 2019 10:56:11 -0500 X-Sender-Id: dreamhost|x-authsender|stevie@qrpff.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7AFAC1A209E for ; Wed, 4 Dec 2019 15:56:10 +0000 (UTC) Received: from pdx1-sub0-mail-a93.g.dreamhost.com (100-96-14-7.trex.outbound.svc.cluster.local [100.96.14.7]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B6ABB1A1F01 for ; Wed, 4 Dec 2019 15:56:09 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|stevie@qrpff.net Received: from pdx1-sub0-mail-a93.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Wed, 04 Dec 2019 15:56:10 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|stevie@qrpff.net X-MailChannels-Auth-Id: dreamhost X-Cellar-Snatch: 3b33244459eec7ad_1575474970196_2248684031 X-MC-Loop-Signature: 1575474970196:3262206106 X-MC-Ingress-Time: 1575474970196 Received: from pdx1-sub0-mail-a93.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a93.g.dreamhost.com (Postfix) with ESMTP id 318FA818B3 for ; Wed, 4 Dec 2019 07:56:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=qrpff.net; h=mime-version :from:date:message-id:subject:to:cc:content-type; s=qrpff.net; bh=/Kn4LfddrJDyvMKQRu8wpyUc8WA=; b=qDRuLg+sjOGlLjUfxZbrjUHoHfpw zT3IIn+0asZeMUTtjYxIH4oIGFYGjC3dPLc4dztZnWcuZThpUsUIudtQgxOKZd6s wl7wdFMgPQ2RtS+7v65LjZhCSENAx/6wj8np565Fpi4vpZNxU0Pa5DXZ1wbmFFaQ eZk1AwwSHouRGOk= Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: stevie@qrpff.net) by pdx1-sub0-mail-a93.g.dreamhost.com (Postfix) with ESMTPSA id 7B1AB8155F for ; Wed, 4 Dec 2019 07:55:55 -0800 (PST) Received: by mail-lj1-f179.google.com with SMTP id z17so8653962ljk.13 for ; Wed, 04 Dec 2019 07:55:55 -0800 (PST) X-Gm-Message-State: APjAAAU6pIsy9+RUIksohi883m3h9fo0q+CJNDHTAgo2TaU0c6xgOyoY BnikxLcHJcpR1nJKbdD4Ge4YMZ3C23XLoikhaqY= X-Received: by 2002:a2e:88d6:: with SMTP id a22mr2341326ljk.163.1575474953331; Wed, 04 Dec 2019 07:55:53 -0800 (PST) MIME-Version: 1.0 X-DH-BACKEND: pdx1-sub0-mail-a93 From: Stephen Oberholtzer Date: Wed, 4 Dec 2019 10:55:42 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC] chromeos_laptop: Make touchscreen work on C720 To: Dmitry Torokhov Cc: Benson Leung , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 3, 2019 at 2:36 PM Dmitry Torokhov wrote: > > Hi Stephen, > > Does the new kernel work with the original firmware (it should as that's > what it's been tested with)? It took some finagling -- MrChromebox is UEFI, but the stock firmware boots with SeaBIOS -- but I was able to confirm that yes, the touchscreen works in 4.19 when booting from stock firmware. > Acer C720 did not use ACPI to describe its devices, it relied on static > board support to instantiate touchscreen and trackpad and other devices. > I see that MrChromebox BIOS declares the peripherals on Peppy via ACPI. > I'd recommend reaching out and ask to update the binding (maybe switch > from ATML0001 to PRP0001 and full OF-style binding to avoid confusion). (This is my first-ever foray into anything involving Linux and I2C, ACPI, _or_ multi-module cooperation, and lucky me, I get all three! Good thing it's easy to verify that a touchscreen is working. I also have no idea what "OF-style binding" is.) Approaching from the perspective of "I'm designing a brand new kind of machine that runs Linux, uses ACPI tables, and has one or more Atmel MXT chips", several things become apparent: * The driver expects a strange "compatible" property that communicates no useful information. The property's value is not read, only its existence, which is one bit of information. '1' is interpreted as 'this is a supported device', while '0' is interpreted as 'this is not a supported device'. But if it's not a supported device, why was the driver loaded in the first place? * If it's a touchpad, the driver needs to know what buttons the various GPIOs are mapped to. (Conceivably, it doesn't need to be a touchpad; in my hypothetical machine, it could also be a touchscreen that also has some input buttons wired up through the MXT chip, because that saved a nickel per unit. To support that, however, we would also need an indicator specifying whether it's a touchscreen or a touchpad, as the driver interprets 'has buttons' as 'is touchpad'.) This leads to my first question: With this in mind, couldn't simply removing the "compatible" check work? On any existing machine where this driver is loaded and working, the chromeos_laptop driver has already run and set up the appropriate device properties first. -- Stephen