Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp362891imm; Thu, 26 Jul 2018 05:05:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdbYvc9PLpdnvvky9cv5sCqSIgQvX6DtX1iSl75t3r1sfY3FH5vMKsd7TSKt2y4Y83RdahA X-Received: by 2002:a63:e247:: with SMTP id y7-v6mr1668904pgj.231.1532606741979; Thu, 26 Jul 2018 05:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532606741; cv=none; d=google.com; s=arc-20160816; b=xoi1ryUpFWJ4q70tKsV+Waz3t85En7N9pAQ7wSdyn//al6ITSVnZbJuPDVwqWTvUYx BfK3wdGSsn0NG3zoHLdYYF0w8yQ1W8tqKzoXB+ZNxlU4ZXfoBhzCn2njOM9XsGcyaZ4b JNIr86XlLCDMWsUxPiBoMdBTbXdujyXp+h8nO/9MgpK0sChM+7gVQSiWvzPerLAMc6lr fWRkHKWjo/7Y1UKsnVoQUTM7cAG5V9T+usFrzl05nS9ZiowIUnBKES3KOckd8cxXQm7d u1xjkY6CnR/4v5T/auBn3PYcrLcFgNSr3aNudN4tJChEDftrUtmu9w1Os1cHfOltnfj9 mGkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=zkRqpCjGg7rPRNsLsEwHWC9ODlw99RkmbOXrawqatZw=; b=fB2njO3GdSU49cpDvvecKkoGh0OqDaKiIJTprqytduHeG9qWgZP9DOIJ//fNc1A+Ky hMo1rN6p9J4kALSR+fQ6QCbAbYMtQxTwVrb4xzRGFTGJQ9LrIfpYWgyIIwrbPV6aYzBV adTAHVqS0G27QqRa3ZYwFpzzGMLXRksbN4wefCAQLDGV4bYRhlotld5COrODOKlsCo05 2iM8et6GOzk//T6TwiN/7BqEJ+0dD63u8nt/Rz3m9Q06G8SvJs5upz/v928bfDKizs1D JrzhHfJwgYeCeEkCnxMfWFODnnwwYqkHlGeeT3Ln57IOVSqMJWDARW5nTHDbWbN6u2f5 sYlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ODMck+Pe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t90-v6si1224708pfi.221.2018.07.26.05.05.26; Thu, 26 Jul 2018 05:05:41 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ODMck+Pe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729947AbeGZNVJ (ORCPT + 99 others); Thu, 26 Jul 2018 09:21:09 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:36809 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729399AbeGZNVJ (ORCPT ); Thu, 26 Jul 2018 09:21:09 -0400 Received: by mail-ed1-f68.google.com with SMTP id k15-v6so1272133edr.3; Thu, 26 Jul 2018 05:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zkRqpCjGg7rPRNsLsEwHWC9ODlw99RkmbOXrawqatZw=; b=ODMck+PeAEz8ruNnqfuhS07AX7pEK94Qu3dzk+j+3C3bL8XjrPe0FsCRUbGDHpqIZY Hlxu3GtEpL6qKjcLWExJ28ie0JHyYG8hWB1DwQMMYdfX7h0qjJ6j7KNC/XkeUN9HorsU P4Bk5qER/SU/z1iIGOujvA9olOdFNG6bI1JL8Cx/uRyKm/RbYfpbmyR0f8xTWBQ1C3P8 vY4/ZPvH0RYFlo7lrwZ41G3piZAVS9+WkrFZ0poPnpLMrrZEaZ4nvipcVC0SmAJBiUbW PUMvG/0ev03BrZvy6xfr4PhYgtzCNvz6ApSIab7d738e6mLny85mu7SxjKJvD4gsdcnZ rl1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zkRqpCjGg7rPRNsLsEwHWC9ODlw99RkmbOXrawqatZw=; b=NqSDsWsxOdRHrDMZ4mSqjLHqtpWA/gFsdKj0sp63thgx3I0I5pUZTQn4f1HmaPjI8Z WFn8D6R+4VGuBkTqJ0/PHozph2ldd4aCAyh+1kIDqwc1gKk0WMe2GpE9NHmeOc7G/jB8 dcd3GvjI9Qs6VeefgbZqjxp0+yKgEIQfc7nJeEl2tjLQhwqc+m9A3vqQiDj61mJpk2jA JdGluwd3GQVbsk31dDEyE2HqPW3Tc0mCUXgY37XNSAng092ecVUMTpG4nZ/XyWWwCLKz nC50e18oZMTYiDbK7Rd7e0ek/zD1InQiIpZhpXiAYFX2l8P1Qls2VQG1un2mTzDgs/Hs lQGw== X-Gm-Message-State: AOUpUlHzL1Ooyja0/u/SP7tE31oNaVowxXe1fNbOhvYw3ulJPDSM+YBM OqtO7TlxlQCrxy1nsHbDuJsObsvBOXZOe6FWlM8= X-Received: by 2002:a50:8921:: with SMTP id e30-v6mr2380690ede.213.1532606675601; Thu, 26 Jul 2018 05:04:35 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a50:f68b:0:0:0:0:0 with HTTP; Thu, 26 Jul 2018 05:04:35 -0700 (PDT) In-Reply-To: References: <20180726065331.6186-1-o.rempel@pengutronix.de> <20180726065331.6186-2-o.rempel@pengutronix.de> From: Jassi Brar Date: Thu, 26 Jul 2018 17:34:35 +0530 Message-ID: Subject: Re: [PATCH v7 1/6] dt-bindings: mailbox: allow mbox-cells to be equal to 0 To: "A.s. Dong" Cc: Oleksij Rempel , Shawn Guo , Fabio Estevam , Rob Herring , Mark Rutland , Vladimir Zapolskiy , Sudeep Holla , Devicetree List , Linux Kernel Mailing List , ", Sascha Hauer" , ", linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, srv_heupstream" , dl-linux-imx Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 26, 2018 at 5:25 PM, A.s. Dong wrote: >> -----Original Message----- >> From: Jassi Brar [mailto:jassisinghbrar@gmail.com] >> Sent: Thursday, July 26, 2018 7:37 PM >> To: A.s. Dong >> Cc: Oleksij Rempel ; Shawn Guo >> ; Fabio Estevam ; Rob >> Herring ; Mark Rutland ; >> Vladimir Zapolskiy ; Sudeep Holla >> ; Devicetree List ; >> Linux Kernel Mailing List ; , Sascha Hauer >> ; , linux-arm-kernel@lists.infradead.org, linux- >> mediatek@lists.infradead.org, srv_heupstream > kernel@lists.infradead.org>; dl-linux-imx >> Subject: Re: [PATCH v7 1/6] dt-bindings: mailbox: allow mbox-cells to be >> equal to 0 >> >> On Thu, Jul 26, 2018 at 4:30 PM, A.s. Dong wrote: >> >> -----Original Message----- >> >> From: Jassi Brar [mailto:jassisinghbrar@gmail.com] >> >> Sent: Thursday, July 26, 2018 5:42 PM >> >> To: Oleksij Rempel >> >> Cc: Shawn Guo ; Fabio Estevam >> >> ; Rob Herring ; Mark >> >> Rutland ; A.s. Dong ; >> >> Vladimir Zapolskiy ; Sudeep Holla >> >> ; Devicetree List ; >> >> Linux Kernel Mailing List ; , Sascha >> >> Hauer ; , >> >> linux-arm-kernel@lists.infradead.org, linux- >> >> mediatek@lists.infradead.org, srv_heupstream > >> kernel@lists.infradead.org>; dl-linux-imx >> >> Subject: Re: [PATCH v7 1/6] dt-bindings: mailbox: allow mbox-cells to >> >> be equal to 0 >> >> >> >> On Thu, Jul 26, 2018 at 12:23 PM, Oleksij Rempel >> >> >> >> wrote: >> >> > From: Dong Aisheng >> >> > >> >> > Mailbox devices may have only one channel which means the >> >> > mbox-cells at least 1 does not make sense for this type devices. >> >> > Let's remove that limitation to allow the mbox-cells to be equal to 0. >> >> > >> >> OK >> >> >> >> But please realise that you'll have to write more code -- implement >> >> your own >> >> of_xlate() callback. >> >> Most developers would prefer to call the only channel as channel >> >> number 0, and use the common of_xlate implementation. >> >> >> > >> > Yes, that's true because the common of_xlate assuming the mbox-cells is 1. >> > And there's already such users: >> > arch/arm/boot/dts/bcm283x.dtsi >> > >> You mean that is a good thing, right? > > No, I mean there's similar HW in kernel already that only has one channel. > Are you suggesting even for one channel mailbox, we should still use > Mbox-cells 1 and use 'mboxes = <&mailbox 0>' in devicetree? > As i said, I am ok with the mbox-cells to be 0. But if you have two instances of the controller, one with 4 channels and the other with 1 channel. Then you can/should not have different bindings. And, if the controller can have only 1 channel, then please feel free to have mbox-cells=0 and implement your own of_xlate().