Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp80315img; Wed, 27 Mar 2019 17:25:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCdowMRDEqmafv6hZLKy0suhc/6qnfIcuNsTSExLhsaTfNCbvKKWa4vJnfqcENirXEl9Q3 X-Received: by 2002:a63:145a:: with SMTP id 26mr37781427pgu.433.1553732738096; Wed, 27 Mar 2019 17:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553732738; cv=none; d=google.com; s=arc-20160816; b=df4TqJe0dyosxUQO/0AmDCbxZHIFVDw9FTZWJ63mGnyU0qkJjeAiPOfV7dkjKVDd7V jbwpgHI1+d9lHa/Il+miCs86/ASjNoDmWTfkvihmn3xerDGsDmvZZY80zljK765T6nx7 0ytyIs5OeA39yL7eSi7Ezg19vr4VK10R6f9v+RdgXwvcSvS6sQ7cA4SpUb0atfn6iUQY oSGdopYBn1VxTP6E4hcOy9rKkTlk8bpOIME5tC3ZBvfBN1vXgRWGbAPqmW8rrRswnKyB 0SGDxPZh3gMVw1fEsXhuAde5LQ0UVHtTLgb4WISOpPuNhf6iHyhBXhpcTb1h3TYoJIZm HbjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:dkim-filter :date; bh=fB4qUozCYKeRMf2R/DBnaoHZH4gpE5gIcFrbM+jLr/c=; b=glchUbPtNtNFyG0NcrYdhqTp50CumbFPoH0zgUhs1CQLSIh9YzTYAGI6d8R0zUODqO bf1FBUk2meFY5jT7lKUK30qnrfwhknSmkJUs9zfTzvuparlVyVtsTPKROPYPKTyCmvrD YCyj9qBnCT8sO93lS6sdHkaxHvX3Gb2ZZKXVannELERc1bDG9VaywaqeW5XvOBwre+Jd jmLKwmr5xe7ckiamukyh3gm8wmUqg5vcEkjSvQofXhXk/8D0TKigJsLZ6inPN5ppoyL5 FK52/hQGd5zvseoulM+k4ONbIo8DRfGA659Gq2ZjniWA072bBh6LkTzbG4YwMyVsWmBl du1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@innovation.ch header.s=default header.b=RWp2NPdL; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=innovation.ch Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11si20201869pgc.145.2019.03.27.17.25.22; Wed, 27 Mar 2019 17:25:38 -0700 (PDT) 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=@innovation.ch header.s=default header.b=RWp2NPdL; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=innovation.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727426AbfC1AYj (ORCPT + 99 others); Wed, 27 Mar 2019 20:24:39 -0400 Received: from chill.innovation.ch ([216.218.245.220]:46406 "EHLO chill.innovation.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC1AYi (ORCPT ); Wed, 27 Mar 2019 20:24:38 -0400 Date: Wed, 27 Mar 2019 17:24:38 -0700 DKIM-Filter: OpenDKIM Filter v2.10.3 chill.innovation.ch 27D2764012F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=innovation.ch; s=default; t=1553732678; bh=fB4qUozCYKeRMf2R/DBnaoHZH4gpE5gIcFrbM+jLr/c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RWp2NPdL0pKkCMv1/g1WKZqTJCaKx9TC4fpeYC9C1BQeeesSjBkjJV8rgQ7WP51QY JLW/zh0EF6DTOQBKM7QCtUcQyRpNsFoVOp0PSreDMexGtDCU0CtmXIS7ZdvNq2UBxV GpYacNfDH7WQOXAM1sGulQu6o+ukRw3+aWZtTNsamTHxmVEz2p2KYygbgGyDKDmLnS h8x5QJfm2HMGbmQ6N5N+ijuR0PRiuFT8LEOEywxZ7uOkvzJdFreiUuP8eysVvRoPE+ Mcu0Pi4PBZSz9fB3wFjnpHQPAaO8qSXGCBDGvJmFAVz3ymyRGEq16NNLY6f/ZJak77 seUFPzG/NJulg== From: "Life is hard, and then you die" To: Andy Shevchenko Cc: Dmitry Torokhov , Henrik Rydberg , Sergey Senozhatsky , Steven Rostedt , Greg Kroah-Hartman , "Rafael J. Wysocki" , Lukas Wunner , Federico Lorenzi , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 4/4] Input: add Apple SPI keyboard and trackpad driver. Message-ID: <20190328002438.GE24753@innovation.ch> References: <20190327014807.7472-1-ronald@innovation.ch> <20190327014807.7472-5-ronald@innovation.ch> <20190327093530.GH9224@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190327093530.GH9224@smile.fi.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 27, 2019 at 11:35:30AM +0200, Andy Shevchenko wrote: > On Tue, Mar 26, 2019 at 06:48:07PM -0700, Ronald Tschal?r wrote: > > The keyboard and trackpad on recent MacBook's (since 8,1) and > > MacBookPro's (13,* and 14,*) are attached to an SPI controller instead > > of USB, as previously. The higher level protocol is not publicly > > documented and hence has been reverse engineered. As a consequence there > > are still a number of unknown fields and commands. However, the known > > parts have been working well and received extensive testing and use. [snip] > > +#include > > > +#include > > generic?! > > #include > should work. Yes, you're right. I brought myself up-to-speed now on the difference between the two. > > +static const char *applespi_debug_facility(unsigned int log_mask) > > +{ > > + switch (log_mask) { > > + case DBG_CMD_TP_INI: > > + return "Touchpad Initialization"; > > + case DBG_CMD_BL: > > + return "Backlight Command"; > > + case DBG_CMD_CL: > > + return "Caps-Lock Command"; > > + case DBG_RD_KEYB: > > + return "Keyboard Event"; > > + case DBG_RD_TPAD: > > + return "Touchpad Event"; > > + case DBG_RD_UNKN: > > + return "Unknown Event"; > > + case DBG_RD_IRQ: > > + return "Interrupt Request"; > > + case DBG_RD_CRC: > > + return "Corrupted packet"; > > + case DBG_TP_DIM: > > + return "Touchpad Dimensions"; > > + default: > > > + return "-Unrecognized log mask-"; > > I don't think '-' surroundings are needed, but this is rather minor. Up to you. I've used that to distinguish an error value from normal values; but that's not an idiom used in the kernel AFAICT, so I'll remove them. Thanks. Cheers, Ronald