From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDB34C282CE for ; Tue, 4 Jun 2019 09:01:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF72724088 for ; Tue, 4 Jun 2019 09:01:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YGsbazET" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF72724088 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UGRZQgkpv9tQR8g2PEJBvNZEepxPERzGfSs33vVdEdQ=; b=YGsbazETir98DD nwDUP64BfGDGw0+wrB+kKEv8BI0PPBMgiMc/4AboIobrpAs7rR7ZLg7hlVmQB7BQv7euht6XGOVwo gn6wIERI3IRw0hYE80ICKzpUGH5E/mfvXXTmtxpfnhGaX2pAXLr38i9zlwEVRRqspjkIhwcS8uK7K y2GbtLp9dLm4lw5aToGU1WE+lrvXheb3SH4pF7ZVbeHtN4gTHLL6/+xge6dh7mHEsggobUtNEbMF6 ATorN+4W/VSPSP+hmIOyNaalv4CwzPP6Y2HHWgt0+jTcvDaffElyK669NeWLFSyAwhuE3xk084V30 mG1jimipssy6T61zc08A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5K0-0001Di-GQ; Tue, 04 Jun 2019 09:01:32 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5Jx-0001DC-Ab for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 09:01:30 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3BB2315A2; Tue, 4 Jun 2019 02:01:29 -0700 (PDT) Received: from e107533-lin.cambridge.arm.com (unknown [10.37.9.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B45243F246; Tue, 4 Jun 2019 02:01:26 -0700 (PDT) Date: Tue, 4 Jun 2019 10:01:23 +0100 From: Sudeep Holla To: Jassi Brar Subject: Re: [PATCH 1/6] mailbox: add support for doorbell/signal mode controllers Message-ID: <20190604090123.GC23250@e107533-lin.cambridge.arm.com> References: <20190531143320.8895-1-sudeep.holla@arm.com> <20190531143320.8895-2-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_020129_369710_88E307C6 X-CRM114-Status: GOOD ( 16.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Linux Kernel Mailing List , Rob Herring , Bjorn Andersson , Mark Brown , Cristian Marussi , Sudeep Holla , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 03, 2019 at 04:51:05PM -0500, Jassi Brar wrote: > On Fri, May 31, 2019 at 9:33 AM Sudeep Holla wrote: > > > diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c > > index 38d9df3fb199..e26a079f8223 100644 > > --- a/drivers/mailbox/mailbox.c > > +++ b/drivers/mailbox/mailbox.c > > @@ -77,7 +77,10 @@ static void msg_submit(struct mbox_chan *chan) > > if (chan->cl->tx_prepare) > > chan->cl->tx_prepare(chan->cl, data); > > /* Try to submit a message to the MBOX controller */ > > - err = chan->mbox->ops->send_data(chan, data); > > + if (chan->mbox->ops->send_data) > > + err = chan->mbox->ops->send_data(chan, data); > > + else > > + err = chan->mbox->ops->send_signal(chan); > > if (!err) { > > chan->active_req = data; > > chan->msg_count--; > > > The 'void *data' parameter in send_data() is controller specific. > The doorbell controllers should simply ignore that. > > So signal/doorbell controllers are already supported fine. See > drivers/mailbox/tegra-hsp.c for example. > Agreed, I did have that. But then I thought this API makes it even clearer to the users that no data is expected. I am fine either way. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel