From patchwork Thu Oct 8 19:14:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 317525 Delivered-To: patch@linaro.org Received: by 2002:a92:d603:0:0:0:0:0 with SMTP id w3csp1667714ilm; Thu, 8 Oct 2020 12:15:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwx7A9RJk6S5GAaAfBJ4yp5/d+V+YeOI5NjivS1gtRQrjPZ60k7ajPH9oQ/HZsSt4eARmh4 X-Received: by 2002:a05:6402:1012:: with SMTP id c18mr10438415edu.77.1602184511487; Thu, 08 Oct 2020 12:15:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602184511; cv=none; d=google.com; s=arc-20160816; b=mPg97Y7n9yZ28VyHHYTWtlT867Z2we48ng2H2/l3EWAQF8sxvoToQ8B8v1UPHBaLYq LNcvsPuehTLta9teJStISqPj2RmujCyzHKiixyiq2WEAsq8EyuAez1cy0NG9S8Rc3j28 UUNprbmuBmROEKO73NNAUglTF4c9bubMQ/91doxzETguFfkY5bVRx5Ck9oUo33LfUI+d wTbH8MDowWaxW668Ydt9ja8pKATiUXOu3HgCQBBhBNuSOgZ3BcWxPUF6XbbflHDDDPov y50SgqYXOvuJPoixxJtmPv6SwpdsJlgU95ZGMgxtytvacghGeYCNZW+SikHydhpkysfy +Vlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=UUwJs4P1DqFLb+/9QcgvuwdxLm4ikSjENMblrccvMV8=; b=qhB1ZxjUD3WmyL2X7fX8EqmzsfLsnspg1cddjv3qABmtZQ0m8d00M9AQ9EUoIP5Yvn B19DH2iAGwJmR1S/UolYzKcn+Im6v/gBJoA+VpGslo6d+dTKxqtuvC007JJuSxSMAqXt X86qES8hyXsh7RZz49V6WRLQroMDU6nrl7CE8flmFY7i+hieiQMdnAyfSd25L4vq0mTr kpo+2IVSTQB3XSiEhbFeFcVZtxRsH5aoqSgrEk17hFgcjJCDjX+s60+c7cLphqUgn1DH KPtdPe0BWA+LJUowkD6pq5G5gOpB5Ry6GzQP00wtG+atOvmXtpUOlKntTFNr27wwu9Oe q89A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bw3si4437136ejb.515.2020.10.08.12.15.11; Thu, 08 Oct 2020 12:15:11 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729674AbgJHTPH (ORCPT + 6 others); Thu, 8 Oct 2020 15:15:07 -0400 Received: from foss.arm.com ([217.140.110.172]:45348 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729651AbgJHTPF (ORCPT ); Thu, 8 Oct 2020 15:15:05 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CEF6B153B; Thu, 8 Oct 2020 12:15:04 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3F8B63F70D; Thu, 8 Oct 2020 12:15:03 -0700 (PDT) From: Sudeep Holla To: Jassi Brar , Jassi Brar , Viresh Kumar , ALKML , DTML , LKML Cc: Sudeep Holla , Vincent Guittot , Frank Rowand , Bjorn Andersson , Rob Herring , Rob Herring Subject: [PATCH v2 3/4] mailbox: arm_mhu: Match only if compatible is "arm, mhu" Date: Thu, 8 Oct 2020 20:14:51 +0100 Message-Id: <20201008191452.38672-4-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201008191452.38672-1-sudeep.holla@arm.com> References: <20201008191452.38672-1-sudeep.holla@arm.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Since we will be soon adding a separate driver based on this ARM MHU driver to support doorbell mode, let us add explicit check to match the default compatible for this driver. This is needed as the probe and match reuses the AMBA device ids currently and don't have any explicit compatible check. Signed-off-by: Sudeep Holla --- drivers/mailbox/arm_mhu.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 diff --git a/drivers/mailbox/arm_mhu.c b/drivers/mailbox/arm_mhu.c index 9da236552bd7..b7fbf276eb62 100644 --- a/drivers/mailbox/arm_mhu.c +++ b/drivers/mailbox/arm_mhu.c @@ -113,6 +113,9 @@ static int mhu_probe(struct amba_device *adev, const struct amba_id *id) struct device *dev = &adev->dev; int mhu_reg[MHU_CHANS] = {MHU_LP_OFFSET, MHU_HP_OFFSET, MHU_SEC_OFFSET}; + if (!of_device_is_compatible(dev->of_node, "arm,mhu")) + return -ENODEV; + /* Allocate memory for device */ mhu = devm_kzalloc(dev, sizeof(*mhu), GFP_KERNEL); if (!mhu)