Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6646705imu; Sun, 2 Dec 2018 23:56:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/VS9efjunu3vaK510v7/tduZfR6JYfapFIkKYR6qvzKyFhy1GP8khy/mtzzI4EgTBByK19a X-Received: by 2002:a62:ce0e:: with SMTP id y14mr15500423pfg.100.1543823814302; Sun, 02 Dec 2018 23:56:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543823814; cv=none; d=google.com; s=arc-20160816; b=iva7yndJ7yKRcGJ4nOIm5P+Qff9WtN+WiNHDHPIDSsk/KdpebOJo92T13rP9Cn5FRj c3RcOmJHuQ37JTxI8fWEa9d+OClUz4bhlXsyDIGvFl8XE2JlpalnEIyoisC633gCfpjp wulQbFYARFi3TYRXnI2Im2RyQxRSZXO/uv6qqEjDisoWEr3pnl9U5MoG9Fpv6AG6IruV CZQECHUVJWsW384qCiN3ZsTzdDMOOhgPl/DCP2QmH1f0nAdmysnRF43a9FTFcP2vV1XP 1a+QC3ZtDNSmnlaN6FK0b8m8o2IufVPc1NfQ5jh+S7m469oL3weMG9AbUC3pnIKgRPEa v/RA== 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 :in-reply-to:references:mime-version:dkim-signature; bh=VrSGmEmCmctVABvMIJ8SgSrl/TKDAGeiz9gzxzRolcU=; b=b2HknikPVnjVY1mHjRg9jTIHfZ+KZVxd/YjxU+SS+SjMsJoSCtFInKmNZwcXxXosJ8 qpK1LEoNBQwbsbpsZZTTh0A9fQlHwZyQAEBuAHPCOonKiKMdKBtUmHwXbt/ssNus4Up9 QkYajRCd/vVl5BMN192e3yX8C6/XIKcCd04gRcHBhLtZndw/dcE5B7mJGHkLA/QYen8s eCML4vg1P6LrAw8te+17E0HVGPBzmY/sVwg9dFi8NQ9Ac4F8SghLR0K8OjMWfpckt30N wj8U4BlXvpxSl/37msvncI5OPKIxqY6WXm4zdxwQG2ifmb6DOTRIahBZQe5cibjYp3QZ TrxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DZXUxv+f; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g10si15068159plm.1.2018.12.02.23.56.39; Sun, 02 Dec 2018 23:56:54 -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=@gmail.com header.s=20161025 header.b=DZXUxv+f; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725882AbeLCHyy (ORCPT + 99 others); Mon, 3 Dec 2018 02:54:54 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:42396 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbeLCHyy (ORCPT ); Mon, 3 Dec 2018 02:54:54 -0500 Received: by mail-qt1-f194.google.com with SMTP id d19so12674019qtq.9; Sun, 02 Dec 2018 23:54:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VrSGmEmCmctVABvMIJ8SgSrl/TKDAGeiz9gzxzRolcU=; b=DZXUxv+fL66pObqWqMBlJIbJ1cmfv9QMNw+v3d3cn16mvCzyY9FYhUJtIzLNlIyUvk aZ68XlnM1TgAY8tKBDpOyHRlkCvrRPKiJuyRfqpx9VEJNBcYgqwQNoZWBYsxwDeEUBgJ T7WWljO6/raQDGy0+j41uzMO43wpge7PYasM2dKJIUAy+wU44CS6PAISDIIpcvDFIsyQ feHxndWFnkc2KZnK9pLJ4afEB5FSXnmewqzWtMnNFqhhFx+H+AxogXSMebYRGUJWHlPM MbS0S+ZxlFhY/MVX3oP7Fvj/cFAUuZMj/zNyd4HrjuGYfhHVBLw2rNAEHwhkcfQk4Q4R s5uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VrSGmEmCmctVABvMIJ8SgSrl/TKDAGeiz9gzxzRolcU=; b=nvJbR0cNLXD7gnbqqw6TLdH9fa/mt8c95IjQ1PUA09K0OlmdB5YRLsowusOAdxBu97 9+DddwfqgzdQkmqdCIsdf437y+yMzSmGrc23TBT12WptXC77Dfm2tVJJf/onKzQD9BsT YKtIbQVaBdDMJTCiUiqcguQnexuTUhF1ArOeojZHWqGmqKjrraD7r6lAlpMetC34PmBN jES51A88R0pPNjWSBnAUCP4U4XljsDG1n0UDI6tbObAZkjOh01AxDg8tQMEHSzwbD1Ai J0fOAlvAToHTTk5ER9b95nGL/gMTFxl+GCSyvALqY/GUrsfMz+j0bkdVP3SmCZyVsaC6 RYFw== X-Gm-Message-State: AA+aEWaC+NUukxdl3rOXzM0lJxW1yCW4MngYMhFRsVw5zW5fmy4O1+JB giDHVTGC2pqFA1v74g3N3S89nJNtISn8v/+K/QM= X-Received: by 2002:a0c:c2ce:: with SMTP id c14mr15177923qvi.7.1543823691629; Sun, 02 Dec 2018 23:54:51 -0800 (PST) MIME-Version: 1.0 References: <20181116162403.49854-1-lkundrak@v3.sk> <20181116162403.49854-7-lkundrak@v3.sk> <20181202231328.GB23087@wrath> In-Reply-To: <20181202231328.GB23087@wrath> From: Andy Shevchenko Date: Mon, 3 Dec 2018 09:54:40 +0200 Message-ID: Subject: Re: [PATCH v2 06/17] Platform: OLPC: Add XO-1.75 EC driver To: Darren Hart Cc: Lubomir Rintel , Mark Brown , Geert Uytterhoeven , Andy Shevchenko , Greg Kroah-Hartman , quozl@laptop.org, Sebastian Reichel , Rob Herring , Mark Rutland , Eric Miao , Haojian Zhuang , Daniel Mack , Robert Jarzmik , linux-spi , devicetree , Linux Kernel Mailing List , linux-arm Mailing List , Platform Driver , devel@driverdev.osuosl.org, Linux PM 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 Mon, Dec 3, 2018 at 1:13 AM Darren Hart wrote: > On Fri, Nov 16, 2018 at 05:23:52PM +0100, Lubomir Rintel wrote: > > It's based off the driver from the OLPC kernel sources. Somewhat > > modernized and cleaned up, for better or worse. > > > > Modified to plug into the olpc-ec driver infrastructure (so that battery > > interface and debugfs could be reused) and the SPI slave framework. > > - Count the terminating NUL in LOG_BUF_SIZE > > - Make olpc_xo175_ec_is_valid_cmd() return -EINVAL instead of -1 > > on error > > - Spell keyboard/touchpad in full for CHAN_KEYBOARD/TOUCHPAD messages > > - Use a #define for PM wakeup processing time > > - Log a message on unknown event > > - Escape logging payload with %*pE > > - Replace an open-coded min() > > - Correct an error code on short read > > - replaced PM callback #ifdefs with __maybe_unusedm SET_RUNTIME_PM_OPS > > and SET_NOIRQ_SYSTEM_SLEEP_PM_OPS > > - dev_get_drvdata() instead of a round-trip through platform device > > - s/unsigned char x/u8 x/ in olpc_xo175_ec_resume() > > - Use GENMASK() instead of 0xffff for the event mask > > - Replace cmd tx/resp rx buffers with structures > > - Turned suspend hint arguments into a struct, and tidied up the comment > > Just from these comments, each of these could be a separate patch. You > can group related things together, or those that change the same line or > function for example. Order them with cleanups / non-functional-changes > first, followed by functional changes. > > > > > Basically all of the above is based on the review by Andy Shevchenko. > > Andy, what was your intent for Lubomir here? From the above, this looks > like it should be several patches to me. This is a new module, I don't see why it can't be one patch. For the existing code I agree with you. -- With Best Regards, Andy Shevchenko