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: 11112905 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DABDB14DB for ; Sat, 24 Aug 2019 07:08:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B706A2133F for ; Sat, 24 Aug 2019 07:08:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OSF2Z/HL"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="FXvtBikC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B706A2133F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=RdRuokpgxgLRCDkra87oDejNxn3wWqqWdkDUa6eQ1x4=; b=OSF2Z/HLA2MXnzim9F6h5DLnvy AXFUzlMroJFx53LRkL8I7SpAVZhRAJ98CvR10WN5jLRmz8VbzlxnI6SPNDIR1+/14ieGn/7KkwPHr Ys3/IVqVf6gWMJ78v/rJYljtWEq8lU/tl+wVbQaUkNmYSxpiO7zs8gZLuMCyFfD0yTVbJd7f5nBTj eBoxbVioO9oLcRxj0m2Bi43HBnvExXHtCl+iLmoqxEyK+MmBxsme9FGF5fOF8yvhokLixk2PZ1Dl4 5kzkehyLvnv4CJZ4oWrYKI2mg+bXzIwxu4zyxaapsApVuYk9g+Q/7H5LAqiplO+x82s2lqB/e129l EnLA9cjg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i1QAO-0000GV-9h; Sat, 24 Aug 2019 07:08:52 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i1Q9U-0008Hz-Bx for linux-arm-kernel@lists.infradead.org; Sat, 24 Aug 2019 07:07:57 +0000 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 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190824_000756_698313_AAC0D2A8 X-CRM114-Status: GOOD ( 10.99 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.15.15 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (wahrenst[at]gmx.net) -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Stefan Wahren , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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: 11112907 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C61BD112C for ; Sat, 24 Aug 2019 07:09:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1DD32133F for ; Sat, 24 Aug 2019 07:09:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="olL/1LW+"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="J1GxJSMm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1DD32133F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=2xZ+9YH1FwfWm1K0NbXrJ0BtOvcl5TK3iPfetIJivME=; b=olL/1LW+qka8C2f/qvfUvczy+E FeCPCkRuedDMop8NUp0rwjFpKXeLlQhQVAe0hNLU1KlxOxDiAEMqSl4UrI/p1ZPOOKY/75QA6NQG8 J19VblLOxfGn7Q8xx08+n8phxz8cJZngMZdF6nY2d1EKIl6xuWw7qy/7FtbkowuhgM6YPVn9uZUV/ heOdqvc8B3XjO3H+ylgXBgZ8C4SGm9+T9tbsfPqBuykuM+OSqWD+J7Y0yj1L/u3Sgp9MYOyucZ4mv A3PeX+NmLqEH/VHi+6sTqm+HPH9/Eqefx7hdlfICC56J+2/3ix4kFmho8jhJgp0owmLO1mJyVBJyj RcfcQoXQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i1QAn-0000VF-5U; Sat, 24 Aug 2019 07:09:17 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i1Q9U-0008Hn-By for linux-arm-kernel@lists.infradead.org; Sat, 24 Aug 2019 07:07:59 +0000 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 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 y2t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+n4YsIgX/nI8uFGM3PoH9aJ7C9yY8sUsfHnKgK1G9c3ThKTX 5I0GXQb/47uasEuqft9yowe3ze7kE6H3KVRHT2gVTdWZXLjytz8rYFly5Fs7kh8JGvOiPRMKA otQ1bQ3LojJtdTg0TkVqd2C/uBOMTXSa3CncjK54QfPoQWoi77NLrluJf2XvGUg5CyNHg8mzf CDZu0eDxaWH0SnKdDOzI3vb/J0J52GUqeZuw34DbjUBpdCC4y/0pHB50A== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190824_000756_709078_30B6537D X-CRM114-Status: GOOD ( 12.35 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.15.15 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (wahrenst[at]gmx.net) -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Stefan Wahren , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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: 11112903 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0F237112C for ; Sat, 24 Aug 2019 07:08:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DEECB2133F for ; Sat, 24 Aug 2019 07:08:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LBCSIsLd"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="TeryD+a1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DEECB2133F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=i+3HB5AOHhjZRmUeK5fTNTcEY6Qo56gtFBSRgOcB/V0=; b=LBCSIsLdIaiGMHbVYM7sZ0jr02 IPAMTZsQNpqO+98aKkn/30DlQ3gw5NGL4Zgjg+GIbBzIm9QaP49/tC/1oR1DOnV8KsZIVRCTR04Bh djaMMtfWHcJ4Nbcz0pdFDIvcpAKIPrcBJlNTJilYdQEYHpk/RleBphGIjBegPa4YXKNynkvqsLVkp L8qJ8wjs0vMs0mNuAyQjD2IDh/RsMp1ryCFK+5uY82pm+k5PyBBAFDnUxycWsc/R+rqk/10kLKUZU JpBJsj7pSFQCwH2msN686ti3DFmAVr7nIzlRzY9g6F/ey+A1oNUxwGc9EOQes/Os7/nJSUUDUbWJH zPUKZQCA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i1Q9v-0008R0-2D; Sat, 24 Aug 2019 07:08:23 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i1Q9U-0008I0-Bv for linux-arm-kernel@lists.infradead.org; Sat, 24 Aug 2019 07:07:57 +0000 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 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+FWB0hIgx87Ju8ImsCa1tHiFyOl1sni3i5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xsHh15gkD+HCpodSnE+P96J4ThNO0SKF5wP3h6UbAWZE0FB1Y4UvIvfv7oQWhHqrI 0MxaXpHHdEpWsychVCh3fbD8hmaYknZI3JY37EJzSRsNXz5ArRycYAH3RMVt0gZZqagIkq40X MEoaNUnSapCztsuIdj1wn8HeK2k8dHq+2yCKxaN+/YqQGbofL/foJ0j6Vj6v2TT3FfBtdvWZU 7fHIw3z0wbM1BLnjo96wn5M0QNNpLo7+kMCHaYoRyP0rLW+P5m3XfguJEy/tx4L8L2jJJ//kz W98XoVf8RARniKqcrtUiBnUd5CileaO11eCT1cIC9vovhxmVqqJMzTGyw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190824_000756_697234_311B98F4 X-CRM114-Status: GOOD ( 11.60 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.15.15 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (wahrenst[at]gmx.net) -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Stefan Wahren , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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); }