Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1827986ybh; Thu, 23 Jul 2020 19:57:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxELk1XHGOp+ZH0mEOmXezmLdZ0keliq+S5ISz6akZT8HyX+4OBtUXwz8FpSoT0U94GCc4u X-Received: by 2002:a50:cf43:: with SMTP id d3mr7324278edk.40.1595559437100; Thu, 23 Jul 2020 19:57:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595559437; cv=none; d=google.com; s=arc-20160816; b=M351MYY6UgS7q8ng/w0y4dd/AQGEVg/SJVuUG3F4biz0ZAwKUDiwb8xQhrkdf63ycW tfl6x3QdXg08L/F4HNFMkFD+fn7MF+RgFJmA55qINRUeK4y2tYXa9c9MN7ck/bXxwkZd zOjmGevlslJzSyjx3yVUJhncbcXoQC4Eksh4JzVEJP6hsrV22MYYo8sf3EGmcEkyBTaY AlczK/QsqUV5gMmvhQP+v09K4F3iMBz8+ia93eUZrtDcirMBR1XEPEVNYi30lImnEFFM bs3tn+fHLkztEb0aQLlNNNwdOHu5cEOCI4WIwtyGzC0XxMrdWuPvwQF4Kh7YaA86jR+/ lqWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=gIHSieEI/ICBzURiExKROzcBrLGuuEu7fSniuyclIJg=; b=qL2C+aY5tALhqWrGSaEl3rrJZabqUjI/CzfD0+v9S6fSdvsfq1w8+2fBXusWJv48DK RFAan9YcMshHfVB1Lfu7HdN/LMwG1ih0KznGc/oquR2HKwOTnHkHHzodjEgKhXLsXJ/Y ZFrPtPsjJvdLqQ9/gVJHAgRttYtjOHyLapcPdW+EPnEStgQoNqnK8owfOYlVgH+a/4nB 0DpdKscsydI7y+dfxQRpOSeJt14GQhFbcn/yZrIswDy74+uRVWc6CHs3YCpWvvo3BFqg U6spMpjJw697boUc0xaCOKTgWrsqrUa9+0hLzfqnd+ltWbekQaB13izb6zUVxpRDa8+g u5Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=A6lV4ZEV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn15si3297975ejb.513.2020.07.23.19.56.55; Thu, 23 Jul 2020 19:57:17 -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; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=A6lV4ZEV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726737AbgGXC4o (ORCPT + 99 others); Thu, 23 Jul 2020 22:56:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726666AbgGXC4o (ORCPT ); Thu, 23 Jul 2020 22:56:44 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8C4AC0619D3; Thu, 23 Jul 2020 19:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=gIHSieEI/ICBzURiExKROzcBrLGuuEu7fSniuyclIJg=; b=A6lV4ZEVvGkxCKJPOGUxlk9s9B xREQAJqnoX7K22XrxYkYSJWN4M5FBq2cU3xSTBpBh3NzBJ9oz2XQTBgLDjev1S5r1VTjqrGAcMgMl E3XHJDPwh+XxJ1Nvs+ENCenmweZmgg59lHlB3ut+Gqr882Zo4zX7YWHFBjEVF9Iq4fk+uB6BuSqRV oke0s4Z1Gu3y86B1/HzPa1GBaS7qF7pxqWrSPS8CXLTPGllzniQjgIGfv8qi7WVfzuUYEHEDvCCTV PMOY0s//aX/GRAPnDZVcajmv2nBy+jOlRVZuQaDKmkuWI5abCYPskbxc8RsRrjQNGwUnxdoDZEb5d nMhU2w8w==; Received: from [2601:1c0:6280:3f0::19c2] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jynt0-00076g-Io; Fri, 24 Jul 2020 02:56:39 +0000 Subject: Re: [PATCH V17 3/3] Input: new da7280 haptic driver To: Roy Im , Uwe Kleine-Koenig , Bartosz Golaszewski , Brian Masney , Dmitry Torokhov , Greg KH , Lee Jones , Luca Weiss , Maximilian Luz , Pascal PAILLET-LME , Rob Herring , Samuel Ortiz , Thierry Reding , Thomas Gleixner Cc: Support Opensource , "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-pwm@vger.kernel.org" References: <71818ab8-0020-77db-c412-8d35a541ead3@infradead.org> From: Randy Dunlap Message-ID: Date: Thu, 23 Jul 2020 19:56:32 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/23/20 6:54 PM, Roy Im wrote: > On Fri, July 24, 2020 5:51 AM, Randy Dunlap wrote >> On 7/23/20 8:01 AM, Roy Im wrote: >>> diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig >>> index 362e8a0..06dc5a3 100644 >>> --- a/drivers/input/misc/Kconfig >>> +++ b/drivers/input/misc/Kconfig >>> @@ -869,4 +869,17 @@ config INPUT_STPMIC1_ONKEY >>> To compile this driver as a module, choose M here: the >>> module will be called stpmic1_onkey. >>> >>> +config INPUT_DA7280_HAPTICS >>> + tristate "Dialog Semiconductor DA7280 haptics support" >>> + depends on INPUT && I2C >>> + select INPUT_FF_MEMLESS >>> + select REGMAP_I2C >>> + help >>> + Say Y to enable support for the Dialog DA7280 haptics driver. >>> + The haptics can be controlled by I2C communication, >>> + or by PWM input, or by GPI. >> >> Is that GPIO. >> ? > The Haptics can be working by GPI(if see from the haptic device), but from the Host it is GPO. Do you think the GPIO is correct? To me it needs to represent what services/interfaces/facilities are used by this driver that are provided by the Linux kernel. If it uses Linux GPIO services, then it should say GPIO -- although I don't see it using any Linux GPIO services. >> >> Can the haptics be controlled only by PWM or only by GPI(O)? >> >> Just curious: why is I2C required to build the driver if a user is only controlling the device by PWM or GPI? > > I2C is required to control registers and it can be triggered by I2C or PWM or GPI(controlled by host outside this driver), so PWM and GPI are optional. > With your comments, I think it's better to remove below lines(//remove) to avoid confusion and add PWM as below if you agree. > // remove > The haptics can be controlled by I2C communication, > or by PWM input, or by GPI. > // update, adding || PWM > depends on (INPUT && I2C) || PWM Since provides stubs for when CONFIG_PWM is not enabled, it appears that "depends on PWM" is not required. I'll leave it up to you. I was just trying to understand better. It may be that no changes are needed. thanks. -- ~Randy