From patchwork Tue Jun 22 00:39:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 465003 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp141926jao; Mon, 21 Jun 2021 17:40:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbHbC8YodP9xMy6PeldSQxOCsq1F7S3aum6enjyvnrXweQ78qBCBls/ndNwYwGc7c7qt6T X-Received: by 2002:a17:906:90c4:: with SMTP id v4mr861103ejw.382.1624322401802; Mon, 21 Jun 2021 17:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624322401; cv=none; d=google.com; s=arc-20160816; b=TMZkCzB7mrDIfYXOizWVCspk6unEsT2Emy3aj7nXseYRsDTNNAfoecGr/tNYZOGV4B +02Q73ggjf6y6z4InY+lJpOhI/JfegnQdyGo7MX7zQO3yh8243U4vCLiLJ9XYNM8rQDI 2BpX/wkfU2UM0j3d0xT5vtGyL8LhmrjtxINzCHbLQd+KkTM2vOKukpG2oFj1gvvgkV6Y P2MUjmuYuJoYMXrVbNtfdKMayIUoD482bzZ4yFSbCbbWYAslIhH20LG1LWlPgDQyKTfi fdluqmVBPd5r9IPt5D9n3umDccjvVeLGsN5Ge/404h/RZywwpwwGVc4tkW6ahvABglDP 1Jrw== 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:dkim-signature; bh=s0hSFyBOMIAWlCuSu1vBbDo1kcTnOHZBktwNR9sfYvA=; b=dmENezhAJcE3H7BVst+x4rcHZfHeZy+OodTrw3ES0W3npiLwT2Q4tc6IZgHU0+jOjp uuWzju83jPRwrgP+F3OqfrFaNzwVhyXPDCOB5cP9O/gfsy1j//8qpl9iXASd4CxkK0ZY bEHHx0j7MkALUpigmaiO0lgX/4BFLVpD+iDbqJVAVlYoRGX89CfWW1U1Y65kT2+LaAU9 RNuTqqFLmgahq+uYWoldJMjVp3jtpb3t/MUTue5zTy6Ak1abze27+G7uSz54UtlUQU1G gR/Z0M0c7H+5Sw1txzkyL8Gyh7j6XGA5+VJd25AUb0i9+W0cVKjjnxOsW7jYuvVxfGaq sMMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qPJdSN7g; 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=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 n5si11464459edy.518.2021.06.21.17.40.01; Mon, 21 Jun 2021 17:40:01 -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; dkim=pass header.i=@linaro.org header.s=google header.b=qPJdSN7g; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230495AbhFVAmI (ORCPT + 7 others); Mon, 21 Jun 2021 20:42:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230526AbhFVAmG (ORCPT ); Mon, 21 Jun 2021 20:42:06 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9D81C061756 for ; Mon, 21 Jun 2021 17:39:50 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id c5so2385359pfv.8 for ; Mon, 21 Jun 2021 17:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=s0hSFyBOMIAWlCuSu1vBbDo1kcTnOHZBktwNR9sfYvA=; b=qPJdSN7g1AsTCXEWl0N7D5lxwqBZepXT3xL4VOp1k3OpauOOUFtJUck7NEIAOh9UWY pAjIzFSmKm2YCTX+CTW0dyhaW53po289RV/eVDwTpEWi0lDhxs/XflWq7fLhopWl3AZh V24oVr/ZKaElrwBOdqDzwE4cXevRsoRvu3OKPpdiL6UwEkfliqTMPtJYH+ARZInZHAbY 23JzTiG2ynK7AwYqVPwbPK2VmSjFzPlHlN2sYRvIEl1q8lFeS0U37kDLJ2lpaKsD+Y7C YXlFPLDaMKFH8P1ceC9Qhr50FDDpMTl1V1GfmW1BbCtiv4Rx043gIP3kLQjLIfieQG75 4uHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=s0hSFyBOMIAWlCuSu1vBbDo1kcTnOHZBktwNR9sfYvA=; b=DHnTnZfeXXHcQOcrC+GLLBWkNUqKFLHQb3SZj7IUIfsOQe+IcNqQDOOug8SVTRqWD5 RwdgmsHCuC+EnHEhXJfCxCowc6LSXJO+TPigGUaZ/HGDpqzCxD6CI3b0063RxkS10wO8 y1S+ZUz1eDx9qdLPuewhS4KzKgbrqVjzkr4r/WyljSXqs5V9n8tJPB9LMdFTxsj7sAhH qT43gWpZKI6cIzoamZzLJ49ISKRv4pHZgFlLtuH2+W0QMBfQ4+HnG2tyiTGDJ+6ct2zm BBXkO9yWqN4JyxchT8EHtCpz6z2/CBqWIMSwh7RNhyG8ijUH7Yu+TVQA05xftgwM5yQT qllg== X-Gm-Message-State: AOAM531vPXXDZ88PvkyM4EQverTREls/gLRk49YKeOjxGIgw2wM2hAgk 3HGoESlC8NbwtTyxGJnkxV00+Q== X-Received: by 2002:a63:c1e:: with SMTP id b30mr1142770pgl.118.1624322390352; Mon, 21 Jun 2021 17:39:50 -0700 (PDT) Received: from localhost.localdomain (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id h11sm17722762pgq.68.2021.06.21.17.39.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 17:39:50 -0700 (PDT) From: Shawn Guo To: Jassi Brar Cc: Rob Herring , Sivaprakash Murugesan , Bjorn Andersson , Benjamin Li , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Shawn Guo Subject: [PATCH v3 2/3] mailbox: qcom: Use PLATFORM_DEVID_AUTO to register platform device Date: Tue, 22 Jun 2021 08:39:18 +0800 Message-Id: <20210622003919.10442-3-shawn.guo@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210622003919.10442-1-shawn.guo@linaro.org> References: <20210622003919.10442-1-shawn.guo@linaro.org> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In adding APCS clock support for MSM8939, the second clock registration fails due to duplicate device name like below. [ 0.519657] sysfs: cannot create duplicate filename '/bus/platform/devices/qcom-apcs-msm8916-clk' ... [ 0.661158] qcom_apcs_ipc b111000.mailbox: failed to register APCS clk This is because MSM8939 has 3 APCS instances for Cluster0 (little cores), Cluster1 (big cores) and CCI (Cache Coherent Interconnect). Although only APCS of Cluster0 and Cluster1 have IPC bits, each of 3 APCS has A53PLL clock control bits. That said, 3 'qcom-apcs-msm8916-clk' devices need to be registered to instantiate all 3 clocks. Use PLATFORM_DEVID_AUTO rather than PLATFORM_DEVID_NONE for platform_device_register_data() call to fix the issue above. Signed-off-by: Shawn Guo Reviewed-by: Bjorn Andersson --- drivers/mailbox/qcom-apcs-ipc-mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c index f25324d03842..15236d729625 100644 --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c @@ -132,7 +132,7 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev) if (apcs_data->clk_name) { apcs->clk = platform_device_register_data(&pdev->dev, apcs_data->clk_name, - PLATFORM_DEVID_NONE, + PLATFORM_DEVID_AUTO, NULL, 0); if (IS_ERR(apcs->clk)) dev_err(&pdev->dev, "failed to register APCS clk\n");