Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5022973imm; Tue, 11 Sep 2018 23:29:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaZiVTF/UFxp7c0gga/6GeCo/WVjazND3vlo5WIlPVEEEgQKe0eKCDvZBaGYSTeY8P0Ev0l X-Received: by 2002:a17:902:1121:: with SMTP id d30-v6mr404663pla.250.1536733771471; Tue, 11 Sep 2018 23:29:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536733771; cv=none; d=google.com; s=arc-20160816; b=MpYu7hltHGTaHtkCiai0+jHAcqdE2qOTQn8xHkoWFh5ltDDxCdRh9NPrKjLfunIYes VibWG7td6QN8zumOr3rb69CKHrW9Mw4SxpdLT3ZOyq97QKil0RelGB2dysw6fppOb/Yf 6k+sqoakj/6NMBRmT+7pTY6oB9VEApfoiJGrJr7jdK9XzrkqmUW5RBjX0xTjVMn/2ijL 52Q/nieEnb9HOlGGJ6Xjj80wc6FcLVNTa5DdW0VylWGHHPDBlmHYy/fmWdU9/baU0fwm EwsOb9tQgaaiweYcHKtKiA9POWkXkkrhujk973vPldWN4SclOI6z5JhOrDAtMZanWm/n IDQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=UNemjQWZFRXM/tlQoUFFdxasyz2XKbUrv7yIJe5PnPI=; b=AfoYkdNlBftZBblOZjZu6rZewKitGRNGN7XNJyx7Q4+j1c53xckRkuglZP8sR/0Zbv 8U4Xx4crzGdHKR0S2vrOJK4t4m/46VWghe5iUPt/W1fSFREqJo6jjA7zcWUFrCF7cYY5 DiEAKa0yG6o2h51FfYSd5D10cWZn8QJDET35h4aV6dDEcDbpLfSNCz/lzTXFw2gBxEbW sfR4ATwsGv2CkbjFS0MwmlHhQ1BsjxqBJ3VMWnKxjvY50nXRJ5f/mpCxv8blWq/3UWU9 AW3qbhYvULkvdUF0j9xO56f9enwStR7KgC9k1LOuyyIOp1D04syNkxH6OCWtfb32bNHV M6vA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10-v6si102825pgg.315.2018.09.11.23.29.15; Tue, 11 Sep 2018 23:29:31 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726913AbeILLcJ (ORCPT + 99 others); Wed, 12 Sep 2018 07:32:09 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37034 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725910AbeILLcJ (ORCPT ); Wed, 12 Sep 2018 07:32:09 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B9186C96; Wed, 12 Sep 2018 06:29:07 +0000 (UTC) Date: Wed, 12 Sep 2018 08:29:05 +0200 From: Greg KH To: pheragu@codeaurora.org Cc: Manu Gautam , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ckadabi@codeaurora.org, tsoni@codeaurora.org, rnayak@codeaurora.org, bryanh@codeaurora.org, psodagud@codeaurora.org, Satya Durga Srinivasu Prabhala Subject: Re: [PATCH v2 2/2] Embedded USB Debugger (EUD) driver Message-ID: <20180912062905.GD10268@kroah.com> References: <1536096853-30473-1-git-send-email-pheragu@codeaurora.org> <1536096853-30473-3-git-send-email-pheragu@codeaurora.org> <20180905111800.GA30003@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, Sep 11, 2018 at 01:40:19PM -0700, pheragu@codeaurora.org wrote: > On 2018-09-05 04:18, Greg KH wrote: > > On Wed, Sep 05, 2018 at 03:01:26PM +0530, Manu Gautam wrote: > > > Hi, > > > > > > > > > On 9/5/2018 3:04 AM, Prakruthi Deepak Heragu wrote: > > > > Add support for control peripheral of EUD (Embedded USB Debugger) to > > > > listen to events such as USB attach/detach, charger enable/disable, pet > > > > EUD to indicate software is functional. > > > > > > > > Signed-off-by: Satya Durga Srinivasu Prabhala > > > > Signed-off-by: Prakruthi Deepak Heragu > > > > --- > > > > drivers/soc/qcom/Kconfig | 12 ++ > > > > drivers/soc/qcom/Makefile | 1 + > > > > drivers/soc/qcom/eud.c | 338 ++++++++++++++++++++++++++++++++++++++++++++++ > > > > 3 files changed, 351 insertions(+) > > > > create mode 100644 drivers/soc/qcom/eud.c > > > > > > > > diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig > > > [snip] > > > > + > > > > +#define EUD_ENABLE_CMD 1 > > > > +#define EUD_DISABLE_CMD 0 > > > > > > Why not use module param as boolean? I mean zero to disable and > > > non-zero to enable? > > > > Never use module parameters on new code, as it's really hard to ever > > change them. It also doesn't work for multiple devices of the same > > type. > > > If not for module_param, do you suggest we use sysfs? It depends on what you want to control. > module_param also provides a facility to control these parameters > through command line too. If we can't use module_param, do you expect > us to use __setup(..) API? Again, it depends on what you are wanting to handle here. module parameters and setup variables are all "global" in that they affect all devices of the same type. sysfs can be "per device" which is almost always what you want to have happen. But don't use any of those for things that should be "automatic" in that the driver should figure out what needs to be done here and not need any external configuration. That's the best way of all to handle this. thanks, greg k-h