Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1372274ybg; Wed, 29 Jul 2020 12:23:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOnxh0lIIE+QlkS9B315kjOkkOSNE99C4BOTMvezEsSYW7PxOk4YMC41KFN7cTiDrgCoNP X-Received: by 2002:aa7:d5cb:: with SMTP id d11mr4030856eds.330.1596050624356; Wed, 29 Jul 2020 12:23:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596050624; cv=none; d=google.com; s=arc-20160816; b=wYib0b+w9L1NDTsFhN1/2mJAbpb/R6b6TofDC1mbTFfoUmbR40SjcPkQzgLYw7nj3C iospq6ZBNRPBMAqJO5P4Jv5S/73TOQQTF3SHDuNi9ygbd8NDB1PA6B+ymxY44Fv57GXL oiLS0aFxt3L0OEj9Lpat+WtHMPz6O6yJFIXqx1HGjv/VERQ0uV/aX++XfVVuqTtwbNaS yvQg9VQ8EdQJkGWoNk+c65W+TQGknT3ks0TnxltVbFLIl5HxKnPUSNWNxE5YAM4IbKsF xh4xgVnljsM6WjlLzy30clbSoSv6jNFuJro914T3PGOuJeDhoCy552+R49jUvcs+vrKk 677g== 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; bh=HGXcQxniYOJ/L+/BbSJHGqRZ1csrAGecCIYczpmNch4=; b=lnu7LV2JsTxTMnI8Jf65LIOL6U89IcpbQFoHjlnBFeZTd3BKQA3p1BPLqUD4SQXE45 oEoMGwdfCwB0L86tFerzWIKc6Hcr73qFZZcPjwSuaLlvADfFjNVN0UMWdJjnwWgGX6V+ fpNhd/FtwmFLbWF4xJ4xlblFPpCkzwytWHVblipzWoIgxBWqIZWAk7/LYKe2QsViQn0g 6W9kr7C949Qed4z5oNYhKSFVTu/W0b7t8g5Dk1dLlIVxOv2HwxN1OtHIFR6RTCqdm12A XP72PKY673t5LCxL3re/N74KG2fOG+MqEyIbCVxp2Gco/aAXD9DfuH1cCGbIGqxH52Kv e0Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CWQeaknt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si1592548ejn.39.2020.07.29.12.23.21; Wed, 29 Jul 2020 12:23:44 -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=pass header.i=@linaro.org header.s=google header.b=CWQeaknt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726881AbgG2TUJ (ORCPT + 99 others); Wed, 29 Jul 2020 15:20:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726813AbgG2TUI (ORCPT ); Wed, 29 Jul 2020 15:20:08 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80022C0619D5 for ; Wed, 29 Jul 2020 12:20:08 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id r11so5575648pfl.11 for ; Wed, 29 Jul 2020 12:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=HGXcQxniYOJ/L+/BbSJHGqRZ1csrAGecCIYczpmNch4=; b=CWQeakntD3r4UHVDonF0RsCdeZ+R7/FiH6YY8MnpigA19viBWrwaAmlWRUzimnUFkF yyAufnaYCoPsh35cHMstxZE/NVB+enOaPdFZu5HTb8cy1x6VnmFZ/JMOliwgoNmXeZOK L27U5zsKI6cBxWAnJUBYMRFGwRxTh72dDC/z8o0HoIpB1L+7HLPEznLyI9Z7M1QNuUpN QeTsz7Mh4Quj5r+4bE+L81UR0FwjDbKvv6tpA/GGBfMIumWqzvTrEhRlNvGpJ4wwGD7I dbiuC5v1uZBgGdjZMphJmcD7sF4jmo1V5BIxX0JO1OHT9xJ6qWabr3SbuV9eAm/BfDRr nU9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=HGXcQxniYOJ/L+/BbSJHGqRZ1csrAGecCIYczpmNch4=; b=uNQJv1Il7enAZr4PU1XhATlYfjWD64c++lOcUZnZlcoaXLF+/r2znpJFVeNnjSRSOi DMbLiWQtHOhG9fXYHKpRgpS3WlXJB4/HJmgZg4vaYFav9DqPBFhzPrRDLYjyb2769JMi 2agCeJnY4kCZfiM5iYRuWoWSYR8pAPmjm8qRK0vxwEXQmcjV713w98MQJElEkZfV1htS 5Feue/zcvjFe4V5d5o+c7XM6niQJ1twvPrMxtz8pfMZyV1eimZv2JCmkYkl++B7zpK7M zRnzlkSiJz3uvYBQwgCSuwO3M1ZYVea8NVsXOoDkewnKqWsa1yw0oNVQhnYzO6QyaA9s mgOg== X-Gm-Message-State: AOAM533bPwjPvnScaRZAAXYTOYbph6+dobzC3queRe5JH3++eZolTzJO Y5C24BhWnUBW9AjlfzbRMkNTkg== X-Received: by 2002:a63:7d16:: with SMTP id y22mr29049887pgc.136.1596050407636; Wed, 29 Jul 2020 12:20:07 -0700 (PDT) Received: from builder.lan (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id 79sm3207215pfu.86.2020.07.29.12.20.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jul 2020 12:20:07 -0700 (PDT) Date: Wed, 29 Jul 2020 12:16:38 -0700 From: Bjorn Andersson To: Siddharth Gupta Cc: agross@kernel.org, ohad@wizery.com, corbet@lwn.net, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tsoni@codeaurora.org, psodagud@codeaurora.org, rishabhb@codeaurora.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v5 2/2] remoteproc: core: Register the character device interface Message-ID: <20200729191638.GF229995@builder.lan> References: <1596044401-22083-1-git-send-email-sidgup@codeaurora.org> <1596044401-22083-3-git-send-email-sidgup@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1596044401-22083-3-git-send-email-sidgup@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 29 Jul 10:40 PDT 2020, Siddharth Gupta wrote: > Add the character device during rproc_add. This would create > a character device node at /dev/remoteproc. Userspace > applications can interact with the remote processor using this > interface. > Reviewed-by: Bjorn Andersson > Signed-off-by: Rishabh Bhatnagar > Signed-off-by: Siddharth Gupta > --- > drivers/remoteproc/remoteproc_core.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 277d3bf..7f90eee 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -1986,6 +1986,11 @@ int rproc_add(struct rproc *rproc) > /* create debugfs entries */ > rproc_create_debug_dir(rproc); > > + /* add char device for this remoteproc */ > + ret = rproc_char_device_add(rproc); > + if (ret < 0) > + return ret; > + > /* > * Remind ourselves the remote processor has been attached to rather > * than booted by the remoteproc core. This is important because the > @@ -2262,6 +2267,7 @@ int rproc_del(struct rproc *rproc) > mutex_unlock(&rproc->lock); > > rproc_delete_debug_dir(rproc); > + rproc_char_device_remove(rproc); > > /* the rproc is downref'ed as soon as it's removed from the klist */ > mutex_lock(&rproc_list_mutex); > @@ -2430,6 +2436,7 @@ static int __init remoteproc_init(void) > { > rproc_init_sysfs(); > rproc_init_debugfs(); > + rproc_init_cdev(); > rproc_init_panic(); > > return 0; > -- > Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project >