Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1680196ybz; Thu, 23 Apr 2020 03:45:14 -0700 (PDT) X-Google-Smtp-Source: APiQypLQlfV5uI1FvpthOJhTWwH5heRGZUKImapW5yEPirUZdWbE5PHFTJpp0oHP+HshQBIjKyUX X-Received: by 2002:a50:baa6:: with SMTP id x35mr2242299ede.54.1587638714444; Thu, 23 Apr 2020 03:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587638714; cv=none; d=google.com; s=arc-20160816; b=B/FXGyILgfCXXV3Hp2oRWTVpQeovCjHE6bvkQkJFlLpwjm3bN5uQc2U8mmEgPk0Wm+ scTiWmoe1m7bMe0MFBgVKDsRDIqOOJ9w7fS3gkxuQEmeIvFdbq34Au06XU2/Pj3cT8au j7Mctpwn9YcTBxcMdozcnf52aHInKvNQL8Ft2qwFvMdf4glO1To9B+wlBh3yQqFaBdDP l6iUbGtbR2S2pvHD4k5qN6oMZ7ey7hAMjvytFDllZvuAMB1S5nTH1pOfIKxN0FJkgWE1 2KtET/UG9dA0mO94jxcAr980nRCPhtWSyGxE17zudxrl3NzPyFIZFTBaUntp/Uvca7Pm 3SRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=vfp+QKddwCQe1/rXdddS1ww3q3zb2tiZwL9tpY6V+78=; b=p0mjoYGDwJhXSoZhHq6oZSbuan/C7ivUBdnF/QB3OEmwfhh3FC6uj/dd3iHlPVngW0 IqrfePS1OGqYvExycb2lePP7OdziGGgcWyMDgyXfCIzjejyfWFxvfWxbZRFGCDCM7zhl ZWZHypw0iO3Yfw0OuwcygkGNjJO7LMr6Ex0tApdZtrQeTjTc9DaTLcjMW4B5Btpay+Sc se3cviHFcI0XXe+pn68Qpuq8+Bbc7kJo02ERM0HEFFVxUGB9HGMxHJ3UZpX2DN7CQqXw p3KnQZIXSRJtgmJduqLLbIiV1igrK9MvOWfWZKWtG5NKLgtndVXAopDo8dPGBMfQf9Lq 8UwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id y4si962105edi.166.2020.04.23.03.44.51; Thu, 23 Apr 2020 03:45:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727071AbgDWKlH (ORCPT + 99 others); Thu, 23 Apr 2020 06:41:07 -0400 Received: from mga17.intel.com ([192.55.52.151]:8397 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725863AbgDWKlH (ORCPT ); Thu, 23 Apr 2020 06:41:07 -0400 IronPort-SDR: 91FP6AM55qA9ubi+Nw316rDmXsY1gcBi29KTMCJ+3mKIMuoJJOEC1wLJ9ACk1nSLXtjBC3te7J /i53Wj89f4Zg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2020 03:41:06 -0700 IronPort-SDR: Kx7K6p4/N5TZr/15qVHfz7t/YfWa8qfU8ew8siy/+r4y7JvNcT3POh2yqW11AOx+oW2pMXXyru ohidmBdCH2uA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,307,1583222400"; d="scan'208";a="291141993" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga002.fm.intel.com with ESMTP; 23 Apr 2020 03:41:04 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jRZI3-002cOT-JJ; Thu, 23 Apr 2020 13:41:07 +0300 Date: Thu, 23 Apr 2020 13:41:07 +0300 From: Andy Shevchenko To: Fengping yu Cc: Dmitry Torokhov , Marco Felsch , Yingjoe Chen , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v5 3/3] drivers: input: keyboard: add mtk keypad driver Message-ID: <20200423104107.GO185537@smile.fi.intel.com> References: <20200423011958.30521-1-fengping.yu@mediatek.com> <20200423011958.30521-4-fengping.yu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200423011958.30521-4-fengping.yu@mediatek.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 23, 2020 at 09:20:02AM +0800, Fengping yu wrote: > From: "fengping.yu" > This misses the commit message. It's a show stopper for such patches. Read this [1]. [1]: https://chris.beams.io/posts/git-commit/ ... > +#define KPD_DEBOUNCE_MASK GENMASK(13, 0) > +#define KPD_DEBOUNCE_MAX 256000 Is there any unit in which debounce time is being measured? Add it as a suffix to the definition, if it's possible. ... > +#define BITS_TO_U32(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u32)) This already defined in bits.h. ... > + keypad->base = devm_platform_ioremap_resource(pdev, 0); > + if (IS_ERR(keypad->base)) { > + dev_err(&pdev->dev, "Failed to get resource and iomap keypad\n"); This is duplicate noisy message, please remove. > + return PTR_ERR(keypad->base); > + } ... > + writew(keypad->key_debounce * 32 / 1000 & KPD_DEBOUNCE_MASK, Perhaps one pair of parentheses is needed to make logic clear. (Yes, I remember I commented on this in earlier versions where it was many parentheses around above calculations, but you have to use common sense as well) > + keypad->base + KP_DEBOUNCE); -- With Best Regards, Andy Shevchenko