Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp909154rdg; Fri, 11 Aug 2023 04:06:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEdIoVnBfCptqPweviOSY33CmF/eqWc8K2GYlCvIeVRow54dgAdBGimFNPY/ilACyyjBh8r X-Received: by 2002:a17:906:5a4b:b0:99c:8906:4b25 with SMTP id my11-20020a1709065a4b00b0099c89064b25mr1397950ejc.74.1691751995680; Fri, 11 Aug 2023 04:06:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691751995; cv=none; d=google.com; s=arc-20160816; b=UC47tvVYC5etGWOvQzcyKhQHoMGH1ewHUXNMe302RS4utbdNHApq06SO+W2jV7YBAK LkPQ+4w1rk4oFWWMWoomvW0GaNKGkZdsX3XARoY7z12w5TjfpLxi80rX1sCe/auGeVO6 lHR/ufH8ALUmwImEYPP5r75disSNsL3oBIALpYWkHqM3njCev7yfcmYcmJ2bDBnuW8sg 6RI5DmLe+Auck6gC90EbisGZ4tL6qdl+ejZoYwNUnh26E4y9dyiGFVRd/kglxUxgIQTR Usk/m0Ez95qDeVBWepJ6lEvB4p+BZUwowgvdkXRnXTI8IkwO5IiKxyiuknFYrFw3/WrK v4ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eveexPWrsuLsZGNr866smPEdnmJfgsNo+AtaLpkptKM=; fh=2/5A7qSiTugz+bZafhWrkFshR+QtYIegHEW42GZ4Nns=; b=eE2YF3K6zE6CqQqjJvxxaFldGmuc77TFV/6hO8koTJ97nNBmtq1jmSO3RZtvxwWV1W Ot29PNaYNoFNHgFev+rgXidjJrGz4QlgZXGvGJ9vAd1Ge8KUE/gar+zuQPnx2TouYMtU RvOUkpyrBbUGIgP9mRmRBEnmTSJFMELpIi1QK/9hbSWqoTjCA9Nknq2kEuR/3F1yMt/u Xm38S8KfZkgoCwGubTqLBmf7ATyIiLLOh32TLrhoJmA/kw9MKvf/njZuF+ZoxVr1qUyM PPPAiU4FIYarIYuQYgV4AAtQZPbhHR3W2Q0bO1jMLSq6QMAS0lqa91WTobryfnRxhiwY 6x+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QSTqdh4n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i10-20020a1709064eca00b0099bc57f3882si3240894ejv.369.2023.08.11.04.06.02; Fri, 11 Aug 2023 04:06:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QSTqdh4n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232295AbjHKJd0 (ORCPT + 99 others); Fri, 11 Aug 2023 05:33:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234413AbjHKJdX (ORCPT ); Fri, 11 Aug 2023 05:33:23 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73CE3271E; Fri, 11 Aug 2023 02:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691746403; x=1723282403; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=d0hT4879fMQpRw9FZEoq0nUoQYAeQnv07LCy31EVohE=; b=QSTqdh4njowGgyCcS9Q099JAGcUQX4Vs8oGg5VjaMBMPk5ZzsODb4J1E pbh+DCYV5pPdepYPiwqz2vLWAfMN4BT6xRXyls+XIgXplj2OrVKxqrHpZ Ad8qYc3RQnClTjv+bo1gji2JWaBZNGCAziYG0TEfdYn1rXJpt63XMAytY 7oJdrlq3fo38dqM3VoMZZrU+cPVvng8IDqGriKoEdHqCBz/5CMzikRDj8 khIZhSkc8HCbwRew54VRX42j0lfwh2kf3jyx9Xgsq/iUGB1llthaji0i1 qUdEWtqyefU+/5zM+ACRdtztBxBf8G0WQnoozYUIKATJhOGmMKWlHF3Vj Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="369109561" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="369109561" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 02:33:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="735728561" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="735728561" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga007.fm.intel.com with ESMTP; 11 Aug 2023 02:33:19 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qUOWC-008i8T-2V; Fri, 11 Aug 2023 12:33:16 +0300 Date: Fri, 11 Aug 2023 12:33:16 +0300 From: Andy Shevchenko To: wenhua lin Cc: Wenhua Lin , Dmitry Torokhov , Jonathan Cameron , Nuno =?iso-8859-1?Q?S=E1?= , Arnd Bergmann , Samuel Holland , Robert Jarzmik , Mattijs Korpershoek , Bartosz Golaszewski , Orson Zhai , Baolin Wang , Chunyan Zhang , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Xiongpeng Wu Subject: Re: [PATCH] input: keyboard: Add sprd-keypad driver Message-ID: References: <20230808072501.3393-1-Wenhua.Lin@unisoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 11, 2023 at 03:31:01PM +0800, wenhua lin wrote: > On Thu, Aug 10, 2023 at 10:01 PM Andy Shevchenko > wrote: > > On Thu, Aug 10, 2023 at 08:42:36PM +0800, wenhua lin wrote: > > > On Tue, Aug 8, 2023 at 9:51 PM Andy Shevchenko > > > wrote: > > > > On Tue, Aug 08, 2023 at 03:25:01PM +0800, Wenhua Lin wrote: ... > > > > > + u32 rows_en; /* enabled rows bits */ > > > > > + u32 cols_en; /* enabled cols bits */ > > > > > > > > Why not bitmaps? > > > > > > Bitmap has been used, each bit represents different rows and different columns. > > > > I meant the bitmap type (as of bitmap.h APIs). > > I understand what you mean, I need to study how this bitmap is used. Input subsystem already is using them. ... > > > > > +static int sprd_keypad_parse_dt(struct device *dev) > > > > > > > > dt -> fw > > > > > > I don't quite understand what you mean,。 > > > is it to change the function name to sprd_keypad_parse_fw? > > > > Yes. And make it firmware (which may be ACPI/DT or something else). > > We need to think about how to modify it. As I told already, replace mention of "DT"/"OF" by "firmware" and use device property APIs as per property.h. ... > > > > And I'm wondering if input subsystem already does this for you. > > > > > > I don't quite understand what you mean. > > > > Does input subsystem parse the (some of) device properties already? > > Yes Does it cover what you are parsing here? At least partially... ... > > > > > +err_free: > > > > > + devm_kfree(&pdev->dev, data); > > > > > > > > Huh?! > > > > It's a red flag, and you have no answer to it... > > I realized the problem, the interface using devm_ does not need to do the free. > I will fix this issue in patch v2. The problem is to understand where you can and where you can't use devm_*() in the first place. _Then_ as you said. > > > > > + return ret; ... > > > > > + .owner = THIS_MODULE, > > > > > > > > ~15 years this is not needed. > > > > Where did you get this code from? Time machine? > > > > > > Do you mean the keypad driver is no longer in use? > > > > No, I meant specifically emphasized line. > > The keypad driver code is used on the platform > and has not been submitted to the community. I'm not sure I understand to what you reply here... I'm talking about the "owner" member assignment in the respective data structure. -- With Best Regards, Andy Shevchenko