Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2093120ybg; Thu, 30 Jul 2020 10:08:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4A6WU0Jl6AoSK5CACImTq2nYv3mCFj5BfaOQ63Q48bOJzTzJhumq9Bo6StsQ1DGn1eZkl X-Received: by 2002:a50:c044:: with SMTP id u4mr3848203edd.366.1596128913847; Thu, 30 Jul 2020 10:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596128913; cv=none; d=google.com; s=arc-20160816; b=S3esREwYR6NbORHx+noEDCWVie5azPysZt337I1uKSDE/L6sMn98Qr8ge/THWU832W uegp0BFrNlo4uIVoeOULUObn4Nk4NoHZyKkKRmML1E/yfp8fhPFudVeiTmZmVweugE/S Dg6jQtWr09wG6BAXiZPtAqpeQC3NZwpfVNCelu92btFZZ9gOedzRk4Ld+3OmJccRNKnS CNrvXqVDoubQ1WN26NS/BP8bEdqYwcFegvTdDA7bA1eETXHF0PrYESK2KrqmE/T7p8pz YcQkllEG3PJa3OhYl2b+Wk6EefKG1dIgYfysPPW4gn7kMSbKWpsSpgoEv4PAkwXCtI9T 2AJQ== 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=BrrFi53izKwosuWkfkeFHip15csxCCcTUoGMUdNgzIE=; b=Mpu4bHlmMmHbkNI76oUfncqtsAY5wmtdiWQsFrzfF7e/JdrAqeijlW0ECBfRCF/2fi DaJqJ9RFla0KQgbopqLnFFJFhYPzsbXh72hfns/umBZuzMkKhNBeWHGcGdgyjY0V0KrM GIw+zKhE9PqJlAcUK7Bhoyq9NiZRtLbP/8ZoZoL2MQOjf1MnD7ISRGUWl6cG8xRFkmCj HIGvyTYM9NHK92dXAdR0GiMKZXf0XbjpsnKhLIphxtyEeYTJk1hVNxJrK4kLhTxC2nVJ +5Jf0TzGAF/Ye1bVnxy7Ap01miF/Yb6z95CD/10rtMzy836cav94g6rF4bbSd6S+goZY 46ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="upLJW/xo"; 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 bg25si3690879ejb.230.2020.07.30.10.08.11; Thu, 30 Jul 2020 10:08:33 -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="upLJW/xo"; 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 S1730202AbgG3RH1 (ORCPT + 99 others); Thu, 30 Jul 2020 13:07:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728415AbgG3RH0 (ORCPT ); Thu, 30 Jul 2020 13:07:26 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 883C0C061575 for ; Thu, 30 Jul 2020 10:07:26 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id lx9so5110613pjb.2 for ; Thu, 30 Jul 2020 10:07:26 -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=BrrFi53izKwosuWkfkeFHip15csxCCcTUoGMUdNgzIE=; b=upLJW/xoau1GH4gHQU9IpMBZeZOp3GkQWfyPRsOVW6ELiK775/dkgcSzKDDsBLUK00 VZTO5NQc4kOLT+ta1IDw7PBqMLmTMR2tTUfkTyyAavqcvf2GHe4nqloQdoYEjV7eYLmk R1xXRoU+zmI65QO0iPp43p88hvcg7lKwbe1Qz3VEMOq+rsjFetVkNnbXXyt6do3+ZcBj G4+IYg1SaBnZu6u/NwCorANwQ1++l+/nko7ytjQzwJOxXGYZ9OiLj8Ec1eUiABJvXvOX TMeJm7a/jEjaUiSSmAHo+GfToUCssYizLmCNRVkwzZ0wT455H99++JzLQ5dAY2DA21XM T9Ew== 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=BrrFi53izKwosuWkfkeFHip15csxCCcTUoGMUdNgzIE=; b=rAJkXwDGQK6JFqcbEMvdRVmnTlxCiVcHxVzdHtDTBLWXNTvHF7Gvgt8hX+ULSzVRVQ C2W2DubZ9nOXtpNWgXhSQ92DUEc3a4KO7ykxBPrp+50SaM0nB6IXC90v+y06Lr0mqCZE i1AwQhCjnHFhFdCi8xZKam7vRTIOdSSTUbGOx67azTzdkTAs5BIfOaBgsftFytYdFI/z JeCpAzecC2KEXoKKt3wSl/2A2cdVmY2Kte0A1mluFw6Q94ny8HzryQRlb2QtapptJ4tJ SGthm7KcIK41Q6etW1uEJIyKSN16/aisfuXZkzDCMDTnO826a8n4C0AZ1eOCVlSum4kS afYg== X-Gm-Message-State: AOAM530ToO6PyevewYuRvwF7AIJO8F5eY3vVIgURuZjgQr36X8X3/8JM L2EM/IG9Xkq2ATC/+EqEd7Aw7Zj049E= X-Received: by 2002:aa7:9f46:: with SMTP id h6mr4273416pfr.321.1596128846055; Thu, 30 Jul 2020 10:07:26 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id 190sm227969pfe.174.2020.07.30.10.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 10:07:25 -0700 (PDT) Date: Thu, 30 Jul 2020 11:07:23 -0600 From: Mathieu Poirier To: Siddharth Gupta Cc: agross@kernel.org, bjorn.andersson@linaro.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: <20200730170723.GB3155400@xps15> 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, Jul 29, 2020 at 10:40:01AM -0700, 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. > > Signed-off-by: Rishabh Bhatnagar > Signed-off-by: Siddharth Gupta Reviewed-by: Mathieu Poirier > --- > 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 >