From patchwork Sat Aug 24 07:07:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 1152569 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pwm-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="FXvtBikC"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46Fq9F4tNbz9sBF for ; Sat, 24 Aug 2019 17:08:01 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726018AbfHXHIA (ORCPT ); Sat, 24 Aug 2019 03:08:00 -0400 Received: from mout.gmx.net ([212.227.15.15]:48089 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfHXHH7 (ORCPT ); Sat, 24 Aug 2019 03:07:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1566630463; bh=7zmLzSl5QEPcdtQwy7pC80ljPOepFXeVShtWEIEYFf8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=FXvtBikCxHyYJ5pd66Qj5Khv2Gx8b7Xxf/tHar4op/NeA4BccB8phnLo28f6E6QZV LpMW3dPxX/GN33RhyZNKSj+unItC4TWXduUYibrEfDE/Xlun3yEGw4vd+ja5+xHVmZ fAEuacnxVnYffrz6Plf48T2/vAAWCOof5V78H6AA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.106]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mw9Q6-1iJv0F2u84-00s5RQ; Sat, 24 Aug 2019 09:07:43 +0200 From: Stefan Wahren To: Thierry Reding , Eric Anholt , Florian Fainelli , Ray Jui , Scott Branden Cc: linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH 1/3] pwm: bcm2835: suppress error message for invalid period_ns Date: Sat, 24 Aug 2019 09:07:23 +0200 Message-Id: <1566630445-4599-2-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566630445-4599-1-git-send-email-wahrenst@gmx.net> References: <1566630445-4599-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:R0rW09NZDppqcsM8P+s82dRAM2pzVvmlFRvXrFJwJkMbvk72HFO dlryHWDKQVAjfoYFqvodWM5E4VY6N0yp4iKQeKqkzXWr68yY71hvuDcF5jbNbNUreGQpHQt s1PilcgL+J7jB2F0GmzE7uOG40aQd3JmQ/boXh4QdYpT7opq7gnO3JJZKBQxWBoeJ5+KHN1 8V7kBWLJVRFk3tqVXt2QA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:o+iHcj1vHTk=:Io+XoR6JaAcaQXGdTyr5qk Tni7PnouSwq8noVSlsO0kpzTWKOO4N2Jm7ebh35jn4d+FDUVAuOAK2P2V/4Y8cnC0aCdX/CKv cntumpopx4yuOo5pwpjPBjJDsWv7X1i7c8LXRZOpLVvnyvPreyZiYWfnLSHATOhbc45dHWAgn yGu+v4F4n2POeGmJe7pJCqcBEdiGcKcKx+Ec0ReEtz/SgzlwmLOwERAdY4k50kGAx8H8cRcKs xArVavDCC4sVkReNAfrk8ZH/VhxCybiAjScTy+t0p1h5kAlsKj2YeYuidoXKjKFv5QSqtOvqN x3YZYb04xUMWenOOezkTUHOBQE00+4igm1RsRxDY10QOrIuXJ0Y2yC7+CSuaY0FwKJJryMKO/ 7HX9fGxUXrFdr6tyuCohyZqHadDVGhOIL/p/QM1xFLWvPQhXAW24NSLUpptzCXhFUpA+C3pGe Ue6bjf/uzidtH24tjAo0yVli4WFUx417S4+XT019zM/cTP/EtwevnELYnKnlvRLq2RX7S1GtE /02kbUkOvhiG0mzHsS3xItP/wAYZdchjGXH2Zk/SIdPSnNfflAoAo2Ye8BhTBsdkftaAUw1V2 vq22/Y8JGW401qC4BcDqKt5slDPqWln/hZlk1hcConWuDIBcQzHVa3MTmJ7Ca8G+B9oHUvPTs 47u91ShCp8mNbj/RuuE1QDta6LnhzV5jcVPBhsMtudpI0UwVsWfxrMlPsOundANibANQu6CMq jwrJrNuRYjTbA8+zu250FnHdeJFR42oamMMSnmdHPUcvUGXjT34zjjWaro4bnHG53SyCw/3f5 Z9srReOTLJ9Ws+UulS7yJDmprDvjXLg7fUN4QJiI0kcrSnSCJPRoBnnmOn61HSSiIhqL5WSjK l1UIh66mXtnXefBWWwS8E5gqf9Ee6hdN341XG58ExRJB8hCcvMXxeUb9zfmL//wm65g22FrcA AIyIm/00A+KjK1VB6j8BuD2jRNGonKNcGK8ixeZx0bZbwD/OLxRRHh1E6HlUC3Qsq5y5VWNJT ymmhfQIL8L2CewWMZrH/GngZRTQlZoTDA2FIQ/80DQ9PsTVJH0+ZOEfh7eQH6rwSlqaP6vAVd yLZSBrOQd85RLE8zh2dpmxNW5NO1Mbu0Z22jHlzRa3EvnfRFxX/+Nhrkw== Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org The PWM config can be triggered via sysfs, so we better suppress the error message in case of an invalid period to avoid kernel log spamming. Signed-off-by: Stefan Wahren Acked-by: Uwe Kleine-König --- drivers/pwm/pwm-bcm2835.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c index f6fe0b9..5276306 100644 --- a/drivers/pwm/pwm-bcm2835.c +++ b/drivers/pwm/pwm-bcm2835.c @@ -72,11 +72,8 @@ static int bcm2835_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, scaler = DIV_ROUND_CLOSEST(NSEC_PER_SEC, rate); - if (period_ns <= MIN_PERIOD) { - dev_err(pc->dev, "period %d not supported, minimum %d\n", - period_ns, MIN_PERIOD); + if (period_ns <= MIN_PERIOD) return -EINVAL; - } writel(DIV_ROUND_CLOSEST(duty_ns, scaler), pc->base + DUTY(pwm->hwpwm)); From patchwork Sat Aug 24 07:07:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 1152571 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pwm-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="J1GxJSMm"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46Fq9K4Pv7z9sBF for ; Sat, 24 Aug 2019 17:08:05 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725798AbfHXHIA (ORCPT ); Sat, 24 Aug 2019 03:08:00 -0400 Received: from mout.gmx.net ([212.227.15.15]:44397 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725974AbfHXHIA (ORCPT ); Sat, 24 Aug 2019 03:08:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1566630464; bh=cNfgDpMsStRYRSGRVwwso2ry+d80CNC09Rh9sIRN7vw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=J1GxJSMmHdiU1WDp/v4RUmwUYaEIFwwSDi1JYNxNf8nmqDiS8zkt4vFLugCEGzB1X Sxib9CZaMZH+lR29y4qm6xZKM+LaAkdc5BHvXG9iYPxWn/6YN7tjt4qe1anlNoSCrr V8B+qsbivnBDHKIvwwMJi27z3Kt6IvvHgGMluWFo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.106]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N7zFZ-1iFDlE4AC3-014xl1; Sat, 24 Aug 2019 09:07:44 +0200 From: Stefan Wahren To: Thierry Reding , Eric Anholt , Florian Fainelli , Ray Jui , Scott Branden Cc: linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH 2/3] pwm: bcm2835: fix period_ns range check Date: Sat, 24 Aug 2019 09:07:24 +0200 Message-Id: <1566630445-4599-3-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566630445-4599-1-git-send-email-wahrenst@gmx.net> References: <1566630445-4599-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:wUJTwdwF8cbSJSzQyvUcO+97RrgtJK5jY47JakdXyNBlfDeOxA6 TBAht+wgvDofDruqZXGrLWEv2DVBWSagz9wvqFyNzDLYSgDQxR2YeTlVnE/AACzCmLDg3H2 y2tAIeLE8VhFrevaflCxKgDr2UtjYnm2/NZK2OgSsqpVDimelHf1bUBP7/P96i2rzq9tpY0 UGJ6xYsNWhDsqxU85wPrA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:mFZRJEsZ2DQ=:LIXA2QWwfPvnGU149PBboe NWy7nrmfyj+6creVK/QOPaH4wkW+A99q1w0zdS6lz+L1cU6fx8YdZWT9xuCd8KFjEDP+0iyp9 pSHANrQfRbAHmBOKdLC3LuQQhN89xbSmCM8rXZGqAwSvPGAsH9fPDYH/BwWHIB/jpUhvOhYIA fQcJCyvIihpPMTIhS5CH9n65bhiyYZ/8u7t7ZGymwPyV5JASGeyX6n5LInZ3OYcquBLQxtWPS hh5mRMnfT7MixloKkP2FtuYFPmICd7ZjDPKmUSkmCba8rd9+TWACGv39ubEnGVTo1XMHIa5UI sjq+Ob8W0+9n5QDmGzhEnQCdczWqmbrGGNPPlldJ4RWKfkZR4tK7xefeVJYFZhQU+qvcj7lBa ZsEIz9rVk7nOWVNp2d1AHg8B+EwA1p1iywVx+4f94TaOntwkQteCkopEq4b4DIAbxvdR1jIJR Y+yhEW98EwiD9E/Cmf1RQnS4ntHai7V+4W8lLDMBy+2TM91BAKG0N7hZT/tg1sKWmAYqkVZfB eCffwGU18xSqO81x2XspLRXYZmH1T8ThgjF2NOitDtg+JguWvhzj+iNvxkpfcr3Wvr04IYcwc QNWejTllsgnf7plqKBv6eZ+weJFz/8Yv7FuzuxPuX0U1rXQmKCynz1nQKXy83/XEhu6ArkZWR qx7IUSlx5gUaXssrk8wBlvXSHaM/akmDKlKe0RJ2U9XhaRxAFAaer8p5w3wcLPy88/gB7v/nE qEHmOJ+m1F+rfPd7dG35w/eCTCqXKAIneqg6imBwpVoaczEgVW6KAk3tGN03abyiYFLxJvJCO ConYRnMvgn1Vqvdd1NewXZ32Ot+b0oeVVC4PcNIhbMFgDM1zMKQCCn0SrCDDvbvvfKEJmIhbA PQLD9Eqn+n6/eaevv7pMgDpQQ+n4YsIgX/nI8uFGM3PoH9aJ7C9yY8sUsfHnKgK1G9c3ThKTX 5I0GXQb/47uasEuqft9yowe3ze7kE6H3KVRHT2gVTdWZXLjytz8rYFly5Fs7kh8JGvOiPRMKA otQ1bQ3LojJtdTg0TkVqd2C/uBOMTXSa3CncjK54QfPoQWoi77NLrluJf2XvGUg5CyNHg8mzf CDZu0eDxaWH0SnKdDOzI3vb/J0J52GUqeZuw34DbjUBpdCC4y/0pHB50A== Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org The range check for period_ns was written under assumption of a fixed PWM clock. With clk-bcm2835 driver the PWM clock is a dynamic one. So fix this by doing the range check on the period register value. Signed-off-by: Stefan Wahren Acked-by: Uwe Kleine-König --- drivers/pwm/pwm-bcm2835.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c index 5276306..2c82386 100644 --- a/drivers/pwm/pwm-bcm2835.c +++ b/drivers/pwm/pwm-bcm2835.c @@ -21,7 +21,7 @@ #define PERIOD(x) (((x) * 0x10) + 0x10) #define DUTY(x) (((x) * 0x10) + 0x14) -#define MIN_PERIOD 108 /* 9.2 MHz max. PWM clock */ +#define PERIOD_MIN 0x2 struct bcm2835_pwm { struct pwm_chip chip; @@ -64,6 +64,7 @@ static int bcm2835_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, struct bcm2835_pwm *pc = to_bcm2835_pwm(chip); unsigned long rate = clk_get_rate(pc->clk); unsigned long scaler; + u32 period; if (!rate) { dev_err(pc->dev, "failed to get clock rate\n"); @@ -71,14 +72,14 @@ static int bcm2835_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, } scaler = DIV_ROUND_CLOSEST(NSEC_PER_SEC, rate); + period = DIV_ROUND_CLOSEST(period_ns, scaler); - if (period_ns <= MIN_PERIOD) + if (period < PERIOD_MIN) return -EINVAL; writel(DIV_ROUND_CLOSEST(duty_ns, scaler), pc->base + DUTY(pwm->hwpwm)); - writel(DIV_ROUND_CLOSEST(period_ns, scaler), - pc->base + PERIOD(pwm->hwpwm)); + writel(period, pc->base + PERIOD(pwm->hwpwm)); return 0; } From patchwork Sat Aug 24 07:07:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 1152570 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pwm-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="TeryD+a1"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46Fq9H4Z7kz9s7T for ; Sat, 24 Aug 2019 17:08:03 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725948AbfHXHIA (ORCPT ); Sat, 24 Aug 2019 03:08:00 -0400 Received: from mout.gmx.net ([212.227.15.15]:47755 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725798AbfHXHH7 (ORCPT ); Sat, 24 Aug 2019 03:07:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1566630464; bh=MB84cv/KL61N5vEmJ6+3TzMhv+UMcSlJU00FuLqAzrU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=TeryD+a12udrVP51FXUZT6+1uVeoL5/GsgAGw0m91KCU4/69KNsUAy17oEGEHxBRz CcrMhGlV9k7Me5UeXyhguzMvzbOyDJpijkTa/9h2jFvrK7kpRAKsnSSeYdewak7+0r NpAMA49EEWWIEZ7LxkMDuvedTm/xl0o+5t1tFXHE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.106]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MVvPD-1hcIdB1Io9-00RnFR; Sat, 24 Aug 2019 09:07:44 +0200 From: Stefan Wahren To: Thierry Reding , Eric Anholt , Florian Fainelli , Ray Jui , Scott Branden Cc: linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH 3/3] pwm: bcm2835: suppress error message during deferred probe Date: Sat, 24 Aug 2019 09:07:25 +0200 Message-Id: <1566630445-4599-4-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566630445-4599-1-git-send-email-wahrenst@gmx.net> References: <1566630445-4599-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:vSh+FWB0hIgx87Ju8ImsCa1tHiFyOl1sni3i5VO3MMQcFsr1yVv T6YDh/7DK1cfchpa7U2REVHF69x2UCsx9F928SGJ6avsB06jLrqjWq/sfjQcRFfMSECAKKL pufGrMjAvmTxaTSEkxeac+vwg6bifMhF45t+5LZk+1Wqe94x6kPmgXiCj8iWMWGALvlFntO oODfydGw0LDFsPWrY4ANQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:4/wiuCA+KLA=:ySVx7KJdsxd9TLlv32vmgJ ysdV6Esxf1Hx6VAmQzDPoNcWoTPtKEmWyXWBJbVwUfwoDHlUshk7CUUbYzSAz0VHI9g7O0IrE A+zeu8iMaEojrN8HvmnjAXFUUR0w3YLSuJJomGdpvXVWm7OpbEdgtz153oKU9JRPvVHqsmdwD FFoFsMGKMbpT6l613Ga4y0rr5/ZpABtw+HlgbbH1SRE/6KT4GhXhbA46fjyI/1lECOeETwPF5 sNNGeqHKJcZFW+iUUB2J5oW47LK7whN3fYo/z6r1cVcGLp7ADhdoDplhSZYUnTAfLljiaZPJt 0zb4KSNrWQePszVGZ3VPgkIQJbQyLCjvq7txU7n2B+P+WTqxwgLQts6PtC3WtvT3zuEhjeoY7 UQ+hQB5rynAkRkU/WEAOmGz6L4TlE5w1U/W3I4YbFVwXLOMpW8vITZZP5YeMY2yQwqJYGZdgR u3JwIWVYsfVPiDx3tR+Yg1ZtXVsoUdG/K8islNYBPyzDsQ8pUsuSqpgtyw3E9FkQngkpwAwEk cVJKVkZfiz3Fo64z/I/OcDocAnkMP33frKGB1kifOSTDk4X3QHg3ktEH2wAQpujcwXULZeLCC zyw6FRjy/xMsWhkrlt/9O0obPrEMwmh2F4p7BWCFHrZrHCzXCd8Kx6RnWz8qohcVNGcUkO7LT nljWcv3OLvV230nMNzH0pLCUsBCtF1q9ERp4UYOe1RNo1VsywTSfb0kGN8/zT70G4QUXf2ntj bJbMc2xjl1o+T2Ny57ioc0gpHmyq3MC0Qu72iOPZIkqEbPvzcMVYbzGQyMI9qPP0x4i5Uk00e UK5BfDp/xsHh15gkD+HCpodSnE+P96J4ThNO0SKF5wP3h6UbAWZE0FB1Y4UvIvfv7oQWhHqrI 0MxaXpHHdEpWsychVCh3fbD8hmaYknZI3JY37EJzSRsNXz5ArRycYAH3RMVt0gZZqagIkq40X MEoaNUnSapCztsuIdj1wn8HeK2k8dHq+2yCKxaN+/YqQGbofL/foJ0j6Vj6v2TT3FfBtdvWZU 7fHIw3z0wbM1BLnjo96wn5M0QNNpLo7+kMCHaYoRyP0rLW+P5m3XfguJEy/tx4L8L2jJJ//kz W98XoVf8RARniKqcrtUiBnUd5CileaO11eCT1cIC9vovhxmVqqJMzTGyw== Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org This suppresses error messages in case the PWM clock isn't ready yet. Signed-off-by: Stefan Wahren --- drivers/pwm/pwm-bcm2835.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c index 2c82386..ce362be 100644 --- a/drivers/pwm/pwm-bcm2835.c +++ b/drivers/pwm/pwm-bcm2835.c @@ -153,7 +153,10 @@ static int bcm2835_pwm_probe(struct platform_device *pdev) pc->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(pc->clk)) { - dev_err(&pdev->dev, "clock not found: %ld\n", PTR_ERR(pc->clk)); + if (PTR_ERR(pc->clk) != -EPROBE_DEFER) { + dev_err(&pdev->dev, "clock not found: %ld\n", + PTR_ERR(pc->clk)); + } return PTR_ERR(pc->clk); }