Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3904814ybv; Sun, 16 Feb 2020 08:36:49 -0800 (PST) X-Google-Smtp-Source: APXvYqxR9Z/C0KFI5gMCP8/4gZri1ADKLRB5CABvoiom6/QzLFrh7IKeyIiEuNuKmoQ4EPbg49jv X-Received: by 2002:a05:6808:a8e:: with SMTP id q14mr7404354oij.173.1581871009749; Sun, 16 Feb 2020 08:36:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581871009; cv=none; d=google.com; s=arc-20160816; b=NETD61tWyf9Zu3c16TpF6HfRRVvfXUQeKOgWqhfDYIDjk10yrV/OEn4DrMDVZvo4MH hpIywcommLdgsI4Gfm1Nojf8iUK0mu1Je4YbDLcvgKdZH65rdPgfoJz66seH/R3mArn/ L5bweOOtuniKpSJ5CgmX9sGGrBJVeJ9GsiAXhWHkFGUu1fp1mWkX2hXOiqqgeoypL6u7 X/gnZG15K+1E7qAQSljKK+KwVcf2SBmT2ipTQPrXAgTz7EmLPtfCQv/fDMiiYRQ4cLQq /eqekZPpD0jgVN0t8o59ZCP3iMel4TtgcRC2itK4CcFk1lr9VQlzpIS91Jit6zCbMV9A /LpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=SQA1PLeoVk+BW+GTPAF4AsP3llwambjLeI+Hxm8q8jY=; b=Ecev3Az99EKx7DSVVY9sdZtoHYHv9oQN+f0WQK3s2perOpHY2ooeo2VdPT2kEmGa1L AOIiE8tmlRYUCo0yXWFDE9ZRp+bw2CTlYGN85yG4w0NOZISXwM5GcMWHoFlomRZjgvYy ZA5t6pfkYjv8qh/FFzBMjJaQe6enIkYPMFrQUxCvI38ep2jlYEbyX1j8Je5WSsFHF3Y7 qt0YF6Rp8cDjyXl+uitsgp82LXNOwpnvhtahN1jtIE38RmuLxmzWccUW2xEK9yGEI2vn rxOU8fyScsS2MnH7wz9x9W6ZaEGVunc3WXDgJVA0Sa3siPWNZHvtzT+gGeKXMEHWJCv1 IUzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm3 header.b=nmcy0E9U; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=GZhEBWLo; 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 h11si5759933otr.197.2020.02.16.08.36.24; Sun, 16 Feb 2020 08:36:49 -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=@kroah.com header.s=fm3 header.b=nmcy0E9U; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=GZhEBWLo; 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 S1728476AbgBPQf6 (ORCPT + 99 others); Sun, 16 Feb 2020 11:35:58 -0500 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:43367 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728239AbgBPQf6 (ORCPT ); Sun, 16 Feb 2020 11:35:58 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id C45ED5966; Sun, 16 Feb 2020 11:35:56 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 16 Feb 2020 11:35:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=SQA1PLeoVk+BW+GTPAF4AsP3llw ambjLeI+Hxm8q8jY=; b=nmcy0E9UGTIhkYGrQYahCZthdxt5odOdVHcvXfHU+XE NdCbXPiKGVLHk2RRmmiHwQMEklhsyOkc/47HVt/+/E2topOCBJERfsiny2lXLnvp UDzmHt1g6J1Z4iilSqw69Q7e2Ku/UVbQQN/LtsbvNsFwW2Uiv/VoYuchgasnzsUn z/0VXXoVIxtkI3CwMP15OPveLRplrhdO4ut43gD9H27xwAApjywQbabuhPb1QNnW P+jRXfi83jrarJAHIjZiWk/zkdMCVnbhyBZhcJ3oP3BEEhB0z+CFuMUUXTUVo404 ihTIDZjS3Ib/0ng2aWvBg80i+TTvjq1jtjPiicVKoVg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=SQA1PL eoVk+BW+GTPAF4AsP3llwambjLeI+Hxm8q8jY=; b=GZhEBWLo/hc1Yy9zGMY7RI 3qIhXoV7Ggjjr6b/JovvJpd9a5rltQ7iwzSpwNsOzQIUdJpEnyeqVpcMpaBD0pvF IyoP/unIXL6PcBglNdE0bZu+L7zptqzYaNibkKMImwE7KC1NZWGqZ+rXH4yW5n0l /PLc8YaUYAGg/2FsEelBXp3uVoLK2evW/GJXhzQ4ffNTMzjayHzdXrvpleFklJyp unySdOsE5b0MQYxyRq3MsZQ9cu3IVSFQIGFIBUXT0kh8ETqE5PP4cv81tTsMV7by W5uG1rpIgEiiltxLrSyVxIbxl3K/IOMQcoW+8NKHQk0pWCyyUr4vq2OJ3v3Im7og == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrjeeggdeludcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghgucfm jfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecukfhppeekfedrkeeirdekledruddtje enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgv gheskhhrohgrhhdrtghomh X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 1ADBB3060C28; Sun, 16 Feb 2020 11:35:56 -0500 (EST) Date: Sun, 16 Feb 2020 17:35:54 +0100 From: Greg KH To: "Dwivedi, Avaneesh Kumar (avani)" Cc: 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, bryanh@codeaurora.org, psodagud@codeaurora.org, rnayak@codeaurora.org, satyap@codeaurora.org, pheragu@codeaurora.org Subject: Re: [PATCH v4 2/2] Embedded USB Debugger (EUD) driver Message-ID: <20200216163554.GA48157@kroah.com> References: <1580445811-15948-1-git-send-email-akdwived@codeaurora.org> <1580445811-15948-3-git-send-email-akdwived@codeaurora.org> <20200207100438.GA627905@kroah.com> <06d21fa5-0115-9478-5cf1-e710446f8311@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06d21fa5-0115-9478-5cf1-e710446f8311@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 16, 2020 at 09:52:19PM +0530, Dwivedi, Avaneesh Kumar (avani) wrote: > > On 2/7/2020 3:34 PM, Greg KH wrote: > > On Fri, Jan 31, 2020 at 10:13:31AM +0530, Avaneesh Kumar Dwivedi 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. Reusing the platform device kobj, > > > sysfs entry 'enable' is created to enable or disable EUD. > > > > > > Signed-off-by: Satya Durga Srinivasu Prabhala > > > Signed-off-by: Prakruthi Deepak Heragu > > > Signed-off-by: Avaneesh Kumar Dwivedi > > > --- > > > Documentation/ABI/stable/sysfs-driver-msm-eud | 5 + > > > drivers/soc/qcom/Kconfig | 12 + > > > drivers/soc/qcom/Makefile | 1 + > > > drivers/soc/qcom/eud.c | 329 ++++++++++++++++++++++++++ > > > 4 files changed, 347 insertions(+) > > > create mode 100644 Documentation/ABI/stable/sysfs-driver-msm-eud > > > create mode 100644 drivers/soc/qcom/eud.c > > > > > > diff --git a/Documentation/ABI/stable/sysfs-driver-msm-eud b/Documentation/ABI/stable/sysfs-driver-msm-eud > > > new file mode 100644 > > > index 0000000..d96ae05 > > > --- /dev/null > > > +++ b/Documentation/ABI/stable/sysfs-driver-msm-eud > > > @@ -0,0 +1,5 @@ > > > +What: /sys/bus/platform/drivers/msm-eud/enable > > > +Date: Jan 2020 > > > +Contact: Avaneesh Kumar Dwivedi > > > +Description: Enable/Disable use of eud device. > > What are valid values to be used here? > it should be bool variable relying on 0 or 1. Then document it. > > > > > +Users: User space debug application which intend to use EUD h/w block. > > > diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig > > > index d0a73e7..6b7c9d0 100644 > > > --- a/drivers/soc/qcom/Kconfig > > > +++ b/drivers/soc/qcom/Kconfig > > > @@ -202,4 +202,16 @@ config QCOM_APR > > > application processor and QDSP6. APR is > > > used by audio driver to configure QDSP6 > > > ASM, ADM and AFE modules. > > > + > > > +config QCOM_EUD > > > + tristate "QTI Embedded USB Debugger (EUD)" > > > + depends on ARCH_QCOM > > Why not let everyone test build this? > EUD is Qualcomm IP, shall not it be associated with ARCH_QCOM? No, why can't everyone buid it for testing? What about when I want to build a generic arm64 kernel to run on multiple SoCs? Do not put dependancies in here that you really do not have. There's no reason for this to be limited to that one chip, right? And if you allow others to build the code, you will get proper bug reports when things break, and others will fix them, which is what you want. I think the ARCH_RANDOM_SOC_NAME is totally broken and needs to be, at most, just an arch-specific thing, if even that. Look at almost all other kernel drivers, they do not have those types of dependancies. > > > + chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL); > > > + if (!chip) > > > + return -ENOMEM; > > > + > > > + chip->dev = &pdev->dev; > > No reference counting??? > you mean get/put_device? yes. thanks, greg k-h