Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5127525img; Wed, 27 Mar 2019 02:37:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyo3P9fXVCj4i53B/4FHz05iUrcdCxYh9txr1mlZNEU0PPMsMFBT/2zhTeKDAgROz2mTj52 X-Received: by 2002:aa7:91c8:: with SMTP id z8mr23265832pfa.110.1553679473538; Wed, 27 Mar 2019 02:37:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553679473; cv=none; d=google.com; s=arc-20160816; b=kMvaID6q7UGcPNh2NKzcRDjm76TPHNtJ/LxKiF7+/N6ZQ71Z6kWRVyCFUgFr6pr/cO xpCdzxSQeuOUiDgYaLbJ1MrN1Z0V6F1ca4cpBUJXWvdpN/fA4x4IXl1S2uRXjgITmsRD 72fnEhwz0Z5bVI4v1W0+XblAKpR78lvl+kaOSkcTMvpws6FIF6jNYbgDW3nD55FTYJh2 vBsXZcKxm8i+oT6BisSa5ryYWR7GYqXlRsNSVRBHrqEi/jfLeRw64rHT91yTe68kulOo ji29OYCCs3U3PW2i6se6Xc9t7/euWRaS/NCnh0eTD1Fm/lPbbqwW+2Aisn2oYga/Sb3G XXsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=uw/+uJdlAD72rSdPPSxgko4qs/LuBUQPRhM7klmnzCU=; b=Km1BNGgkSzxC+EiJXO9MTwtdr9BUNudEVChEgl8qB8HMjySx0NAsGSaqrrMMRuC8Nt pG/C3jrwcO/FUoLWYMvdK5Q0VyyUGEK7HJQ8vPwupkpghHtp86K890qkTKvCVZm+kjCy Z2P2ZQAjmjMUXjktC2ZqGE9wCrdaTDkxNe5SWkwPmNBbDcn/M4mGVYOHGIFkcOmYtZJi 5XWFIdIHplwgTLS+0ECGa114NqRPplFlYvd6kagO152jDOBOH84knNQU80bviufCdGsK zHfiKx4WNmIs+V0dRoklhcOyQh0VSyGu8UhG/+wLEveYKkabloIUGQE+rAO5OAunAj/I +/kQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y8si1802173pll.313.2019.03.27.02.37.38; Wed, 27 Mar 2019 02:37:53 -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; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732815AbfC0Jfg (ORCPT + 99 others); Wed, 27 Mar 2019 05:35:36 -0400 Received: from mga03.intel.com ([134.134.136.65]:32823 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725786AbfC0Jff (ORCPT ); Wed, 27 Mar 2019 05:35:35 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2019 02:35:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,276,1549958400"; d="scan'208";a="217967853" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by orsmga001.jf.intel.com with ESMTP; 27 Mar 2019 02:35:31 -0700 Received: from andy by smile with local (Exim 4.92) (envelope-from ) id 1h94y2-0005aA-9u; Wed, 27 Mar 2019 11:35:30 +0200 Date: Wed, 27 Mar 2019 11:35:30 +0200 From: Andy Shevchenko To: Ronald =?iso-8859-1?Q?Tschal=E4r?= 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: <20190327093530.GH9224@smile.fi.intel.com> References: <20190327014807.7472-1-ronald@innovation.ch> <20190327014807.7472-5-ronald@innovation.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190327014807.7472-5-ronald@innovation.ch> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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 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. > > In order for this driver to work, the proper SPI drivers need to be > loaded too; for MB8,1 these are spi_pxa2xx_platform and spi_pxa2xx_pci; > for all others they are spi_pxa2xx_platform and intel_lpss_pci. For this > reason enabling this driver in the config implies enabling the above > drivers. > +// SPDX-License-Identifier: GPL-2.0 According to last changes this should be GPL-2.0-only > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include generic?! #include should work. > +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. > + } > +} -- With Best Regards, Andy Shevchenko