From patchwork Mon Jan 16 19:43:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Brown X-Patchwork-Id: 643172 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03F8AC54EBE for ; Mon, 16 Jan 2023 19:44:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233710AbjAPTor (ORCPT ); Mon, 16 Jan 2023 14:44:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232473AbjAPToq (ORCPT ); Mon, 16 Jan 2023 14:44:46 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89B0E2C67A for ; Mon, 16 Jan 2023 11:44:45 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id c6so31326983pls.4 for ; Mon, 16 Jan 2023 11:44:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schmorgal.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WqYz5wS1ns0kl8A6NpaJdCKujdrpwt6VlQVEZ72mUB8=; b=JgGZYlqHWBDT0cSi8VIWA3vQKajGGfoljiLjNUR+0boPilQkPK6/05Ab4AgGogOeJB 1uNS8OKQ7znEpz4DR3ExcfV3qkM0shC5fUX0odRr0vDasuPeWy6aH650rw0v6+INA3BL 4j7Wt5LRfuMSOo7vJsD2f3NPkTZ6jJxAXPSRI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WqYz5wS1ns0kl8A6NpaJdCKujdrpwt6VlQVEZ72mUB8=; b=NHTC+EOn/X0PA+WWcppsszRf13gWv7v60zSgoj1tZOQL5f9K/x2FqLcaBn7r0ouLQr 4RJns6DE1i13GsDu+vbxzmAPvhsVUwVntA21dDRPhCp47PvaCPfDwZjsY574e8Co1pVL 4CkLs0OItRKRrI7klKipsN8j3VODx+H8HAKM4CgDFnm4lz/sioMnrsrElb/ySIHYJede sm9FeqAv8iK6EPbnmpvKAiO+lOnzV6Bw9xAlnZpvqsXUmEVgM3oDbdcael2cHUU2BsLd zCcnO7wbbtgLgYr+twLGKGJRz6NWB7CrStt0eKk7la84vX5BAGlH51Z5A6z2eb2QLdvB apyg== X-Gm-Message-State: AFqh2kpCJIquKKI4xNBz9ZhHlaBFVaXS3ywIpkwOUWkDkw8jDwiyu0TT tGIqjbnXPksVORbBTgdZVnywxQ== X-Google-Smtp-Source: AMrXdXubMwBfH/DZX7c3dFUOa8kG4jN6M/+ViULMkQLspFA2078qgDhevkj/6jCy6zbxF8nNGc/Aow== X-Received: by 2002:a17:902:e9cd:b0:194:5de4:52d0 with SMTP id 13-20020a170902e9cd00b001945de452d0mr970515plk.41.1673898285006; Mon, 16 Jan 2023 11:44:45 -0800 (PST) Received: from doug-ryzen-5700G.. ([192.183.212.197]) by smtp.gmail.com with ESMTPSA id t13-20020a170902b20d00b001926a76e8absm19734663plr.114.2023.01.16.11.44.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 11:44:44 -0800 (PST) From: Doug Brown To: Ulf Hansson , Adrian Hunter Cc: Rob Herring , Krzysztof Kozlowski , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, Doug Brown Subject: [PATCH v5 4/8] mmc: sdhci-pxav2: change clock name to match DT bindings Date: Mon, 16 Jan 2023 11:43:57 -0800 Message-Id: <20230116194401.20372-5-doug@schmorgal.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230116194401.20372-1-doug@schmorgal.com> References: <20230116194401.20372-1-doug@schmorgal.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The devicetree bindings for this driver specify that the two allowed clock names are io and core. Change this driver to look for io, but allow any name if it fails for backwards compatibility. Follow the same pattern used in sdhci-pxav3, but add support for EPROBE_DEFER. Get rid of an unnecessary pdev->dev while we're at it. Signed-off-by: Doug Brown Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-pxav2.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c index 5e01dab94426..f5c86e1ba734 100644 --- a/drivers/mmc/host/sdhci-pxav2.c +++ b/drivers/mmc/host/sdhci-pxav2.c @@ -199,16 +199,18 @@ static int sdhci_pxav2_probe(struct platform_device *pdev) pltfm_host = sdhci_priv(host); - clk = devm_clk_get(dev, "PXA-SDHCLK"); + clk = devm_clk_get(dev, "io"); + if (IS_ERR(clk) && PTR_ERR(clk) != -EPROBE_DEFER) + clk = devm_clk_get(dev, NULL); if (IS_ERR(clk)) { - dev_err(dev, "failed to get io clock\n"); ret = PTR_ERR(clk); + dev_err_probe(dev, ret, "failed to get io clock\n"); goto free; } pltfm_host->clk = clk; ret = clk_prepare_enable(clk); if (ret) { - dev_err(&pdev->dev, "failed to enable io clock\n"); + dev_err(dev, "failed to enable io clock\n"); goto free; }