From patchwork Mon Jul 12 06:05:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 472945 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2672694jao; Mon, 12 Jul 2021 00:08:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmN7jBQC973F0bWRrtniIhh0q0l0cOZRwas8KoPEGaCRBPsJ7PHdQI4W7Nes1tsbyOSvlx X-Received: by 2002:a92:cb0f:: with SMTP id s15mr16285589ilo.11.1626073734370; Mon, 12 Jul 2021 00:08:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626073734; cv=none; d=google.com; s=arc-20160816; b=YmkFTnlLjZeKpQeGUh8Laogmwq19aLIm1xWYf9SdKW/gAq+VHqkbghC6s9jCgpDyr3 bir1O2MFlFi/CJVcb57U8Lf65f+u8aUYi/bo2ksvCxarldXBchK5KL8sxJTshuAKwy9u Ja2S55uAU1DAeEYCS8XGDGx/yskttMCNPKWS2fdmLTgO0TKIDjrxCpAkAkhZdx1sbk6o XLFxoSnfwRCV4waWvt8XLvQdKw7FoWZb/u2iO/gSPzoYhvzLzhEo0RhSsPSnUIPIMIka Y7UsFNvOIyFd26PJ4WOuNNuq6rNm6BlLrrnaabri0m7xO/DHAzB8+ZEXjPLLR65hbGGE Bjhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=91DeOV1FpWz/0PefoOqsL0r7KHRB7uh1GEwdin7ascw=; b=T4E5rakrL8nXGvboZ/qSocwSjkjKfs2PBPKD8pnI46p8al706pLUdlt5T/gw/qet00 GmAPEiDcdTJ4CKZtSQ4J+J+L09DzKgQxI5SDVe78ANBTxgqT81XO59gBABFgz7ltQMlh qYxLJzdMiG1qfVIqT4esMog+XoufHqUkHB2jptABxEMLcEOSdXO4VMEwt6J0sIyDK+09 HdWkPE0cKZ7rfq0yGsZACXYLaKT9cb7QCu+Ij5ncL1mLXp1ZtAHktGV3sZRNpdQmaGna 4OuTQMB7PPfYl7Td8czs9enO4TwkR2as51qtidFOsX1xSq3PrlLwEMzliJ1a8J+78CK/ crag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JgGtK0GH; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g12si16580694jas.65.2021.07.12.00.08.54; Mon, 12 Jul 2021 00:08:54 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b=JgGtK0GH; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241613AbhGLHJA (ORCPT + 12 others); Mon, 12 Jul 2021 03:09:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:41186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242460AbhGLHGt (ORCPT ); Mon, 12 Jul 2021 03:06:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DA558610A6; Mon, 12 Jul 2021 07:04:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626073441; bh=1O+RB0jGz8d34aGUcynhQQb25IT28EtM/dWmHEG+1f8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JgGtK0GHR1kVRrxww1iEZNeoQD3OcOp0fKniQuV7iaHbFILoMLqoHj8n6x40c/7hb ZBpSshKl0kVAOhgpHSFCMeoBGlC8GODDV8uwb8HvEOQRif2Kd0vGYJ1/73ieZCgqYQ FznEciTXFVpxC4gQB78m4ldytoO5j7QzWIW5hOC8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shawn Guo , Bjorn Andersson , Jassi Brar , Sasha Levin Subject: [PATCH 5.12 242/700] mailbox: qcom: Use PLATFORM_DEVID_AUTO to register platform device Date: Mon, 12 Jul 2021 08:05:25 +0200 Message-Id: <20210712061001.176815266@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Shawn Guo [ Upstream commit 96e39e95c01283ff5695dafe659df88ada802159 ] 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 Signed-off-by: Jassi Brar Signed-off-by: Sasha Levin --- drivers/mailbox/qcom-apcs-ipc-mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.2 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");