From patchwork Sat Aug 24 14:09:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11113003 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 95DB61395 for ; Sat, 24 Aug 2019 14:10:11 +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 686332173E for ; Sat, 24 Aug 2019 14:10:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IOql2teV"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="I/KsoGp7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 686332173E 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=0ibcm9UO5XMUfs4yZzUOJZP/JzJRsDw2HdwUU3W+1jA=; b=IOql2teVvsN8Ux /An0YCTWsSRzQYbG/7Mf73eid4mrTqoqgJntS68wl6jULvUXPY2bixDZ3v1NqHQIuzOiWCI1V3W+Q R56LdGXgJlyzbteptNJpo1tpQ5uYGiUEMDHb9B+a2EmteZ0leViMG+VX/p73xoQ+tKC27cVfIzfP9 sO64KKTegfre3DWf4rSMrC21wIJMgTn2XeDMaxPnBeyLj1yQegNQwBbFIKTDpeQmQ7Gd2AKdx1byx 53h2eWCUfH289BRMS4bw3LzMKl9vO4bzKA2qhtp6xxi+2JR8NDyhKzS32VXlost47xHBPAQvtQ1I5 HXYO9za/8/RqYdm7dadQ==; 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 1i1Wk6-0005Ef-Ru; Sat, 24 Aug 2019 14:10:11 +0000 Received: from mout.gmx.net ([212.227.15.19]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i1Wk1-0004Kz-TW for linux-arm-kernel@lists.infradead.org; Sat, 24 Aug 2019 14:10:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1566655798; bh=Gw0uvY9zV94pNModeowkG7ft0KsjTu+9nSEiRmDoueo=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=I/KsoGp7RsJ91JRFXS5dPd+dcnqIL2qgjjBYovEMV0dNcvw7qQ1UHZywX5j08VKDs njcR2bXyTHzj3q8LkH7zu3mi9oqNFV48pPAUaKbJtHcm67rYNWNKi5BjJl9VeCQ3D5 nwxu2raHO3CFo8I3fDGr4aaof2cpF9AWVqFT6IF0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.106]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N95e9-1iGDcv05OJ-0169B9; Sat, 24 Aug 2019 16:09:58 +0200 From: Stefan Wahren To: Thierry Reding , Eric Anholt , Florian Fainelli , Ray Jui , Scott Branden Subject: [PATCH V2 1/3] pwm: bcm2835: suppress error message for invalid period_ns Date: Sat, 24 Aug 2019 16:09:46 +0200 Message-Id: <1566655788-24949-2-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566655788-24949-1-git-send-email-wahrenst@gmx.net> References: <1566655788-24949-1-git-send-email-wahrenst@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:fddocn95lqFR/2NouKKedgB4+IDR2qPI8KHoNbsqdP4ouU+F1eh j6b5ucNtQpz6aal5CGHWp1O5FRd6jNVF2ZI4swmnGYJ28hsEgBez/rEjJUs0aiXH22/bdG9 0VxfIZbWDaxlSCGLLJ/7heooFlTXal24wuswUrhH9k/170U1dFs4xnJrTbvzIWapZ/ubujW EUunYkaCatNkUsQPGf0jQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:4sKyPc6fcIg=:UKPqGFFRGs8RbS/7w3zeZn GZPqkRoyMOXlWVCiZ6oJ6GlcnyOK1ij6VzRJ/30QxMLbtW0kPyAsGMDPh6HlFw0ayWG4TG+dr ynrSl6w85sfUK6VhlWALYmWe5w1QdarIL0Uy0sm/G3MUxqfWkkgGhBRRoCYvMdWx8sGevH4hz bPL3I5H3diXukgRYox+xIZ9DLxt6hUO/0jGqYMgrgEPjQ3bTODcrmTcbsOga1fb750Vkv0MH3 46xDmjtiYIQJCLPYIRTRBjdeF53HMk4Qa/5QfNE2x7q54mAAdcvVQ2jXFqrqA/VtCUXuBLHhz ZvNe5OuGZEYZOhzyqGCo0UgFWuEYAAt0dz//emGhReYxlUkBTGyDEHMzsYamyDl51d8VnJV+B gEub3ivyGSrGKD5zPmOODmdy49L0QTLoxYHnKZ/hxLy7nBI+vM00eIvoLTqoH0y+b9oRj4j86 z3U/LIzOmPgH2Aq1R7Ipj3518atDOE8v1vD0KMRJpo5xjqhCKYVwBgwet0lSN4EE6KLpzFe6R p94vzHy1CLkriJEUECNDuCSSdlBLkZVbLGmJqxXdINRuk1n0aKLkNGcHl/tQJKkqOtBkzKY6M NcQMT2kxzq6T/rdAmp5N+aaIToi3smX12VORQLN/V/NeQ9KbITu9aplZOyXiJEHBzcnRHq+Qw OmNVMkkhEbdCzhye2d1fq+1SjIwcgFoT2d4SWxp2LDZl34kHB7c/kOVhLSkfF4lajtvCIi3ho Cov9V1FsKptAk5FhRsO0ujhohkaxVi4jfRqAuFaQCtU00AV2ORmHcOT6TAAIpCXuWNb5C8Cs+ f5HC/3tT+B7FzA6JOAuCUFW/TaJ0f1a5cdrICc3z8aq7wwJF9cb6hoXV4RaS3Hoxe8TvwldwX jYQz2HhQphwAWJGIsmvc/al9E0Bz7gH1c/zRDPjNil6GqFF6UzVcrrVZG13UDJVFfbaSfCMyQ OGa1C99Qr2kXLHW4cp0mWRe3blDnRlUJvWSqHEQ2N6MtO7bUZvYuJFkEh5KRqsF4UXiQHM/EN 6k/j9MmHJiPLom/nhopBwlCRr/QJhK1wQnpy6ADdlxonYd275NOCZpVp1mJcAvMyDuBPAYJpP adjny2zaBuTKwsg6ps4zBHw6L3runIuC7BNZXRn4YBjJa7akICsjwhbTWY1G8MpST5XAxqvXX oPzfs= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190824_071006_256418_46CC5C68 X-CRM114-Status: GOOD ( 11.07 ) 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 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.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.15.19 listed in list.dnswl.org] 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 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 14:09:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11113005 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 E90231395 for ; Sat, 24 Aug 2019 14:10:23 +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 C4D1821670 for ; Sat, 24 Aug 2019 14:10: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="CiNTR4OI"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="FPLvHF3F" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C4D1821670 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=Ze8fXyiOb26jz8OkT8pEbWrtbYreAJy5nZrs6McmZ5s=; b=CiNTR4OIfDhart SUutNvDaNnWfIh9/AbNoCxiXYA9ecwy+59NXfcGzYqKzgn6ACuuHB5SQ1RFlFO8VJJmyTrFVWQajf hP6w7oiQZcnPqeFd2hsOn+bsGkrFfdAGglDfWoLxbmpiVf6ss6llrvflsQi0pmVi/moxE7KKl+vFT NdygyAo0+qZcEBaY2kMQazWnzDyY57nBSOzrMOxx97+36yAWy4Iie60qNRuE5QDJ+LlflwdlCzYAJ 4Wf5RIkoOWZIiXfkj7Y4kcfsAujZGybOo82GaOgKPXSlpBTq5AP6xfyF+Say8/98RjQs8e2pFXyMb zZqbaTFFNSmFhdFxPyXA==; 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 1i1WkI-0005Lc-VW; Sat, 24 Aug 2019 14:10: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 1i1Wk6-0004nb-Ck for linux-arm-kernel@lists.infradead.org; Sat, 24 Aug 2019 14:10:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1566655798; bh=p0356BK30yaqXao28qVvueaMUHmiPXaegoIWDiukDy4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=FPLvHF3F1eQfEPy73mmnsP53NAh3u0jSpEB6+THailv4zEuzdwna+GR2Qdwomhdbg b57U7oFf2mC0Mp1JqCC+7e+h8yQ4TXj3KWUZlQyO1R0CjYS3ucmkUCnNOtwIBFbWpS pP0p5ffueiouSsEgYGkVPJTHYLQlZqJzfjJ67JXo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.106]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M9FjR-1i7Jcv1UNL-006NXj; Sat, 24 Aug 2019 16:09:58 +0200 From: Stefan Wahren To: Thierry Reding , Eric Anholt , Florian Fainelli , Ray Jui , Scott Branden Subject: [PATCH V2 2/3] pwm: bcm2835: fix period_ns range check Date: Sat, 24 Aug 2019 16:09:47 +0200 Message-Id: <1566655788-24949-3-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566655788-24949-1-git-send-email-wahrenst@gmx.net> References: <1566655788-24949-1-git-send-email-wahrenst@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:k1uKE8Vftkrl/41pYV+oH5xV1tYyIKl3SA79jsJlrEm/znGfmxb vPUsPCH8MQooBxIiiEtewqIVeYrGjl3jviqP8jm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pOcU4Rf5kSy dA6fwsSZPEmFv4feyM4a3Kt9RyOZ1pnLzVszETdsgD0C1mf0O0yhuxQVbPivL3qeMBW0xtGzu XLYc0UkREnqb4iOAlbGdJyaHwN9Om26iGTDlAC09XYONa70aiaiH3zmGIaXcyk1cUYJYonG8O eBBp0XgAyGrNxXKiEZxH6oGoqbetllotSHBodJhn+0AINbHobSTjn+os+2IyqUNnEGkOZ9GsM GZmzu6LguSop88VdH8YBidqW6ErftZObrgFaxEKvgLeZjlE1255qNN95ouM7RVMIgTXi8TIyd 4Jkoo= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190824_071010_749862_7CC9052F X-CRM114-Status: GOOD ( 13.02 ) 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 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 14:09:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11113007 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 CED541395 for ; Sat, 24 Aug 2019 14:10:44 +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 AC2D621670 for ; Sat, 24 Aug 2019 14:10:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HA6iz1R1"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="IzQqKi5x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC2D621670 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=U5/BWSJKQKBj9UEWnS3aeEGfmk43kZBNpMGOlio6A2I=; b=HA6iz1R1jaH7hciIfT+srfEZgC MFnjbnUGaChag+KwLQZdhbb1lKRvLVuwTk7FiZfNabxdqMw+wenpkXHwy7kP0roWoLPt7TublFBBi 4Ejt9Jh5uoaUDrqg3vKcfdndtW7PC5iYNO88rBLaLQtFD4dib0EBGkuFqUXdGQgxnXqwSIC2BXbkf +r/W3zyStN6jrRXHJLpw5zGzQ/hFSXnF+9kjwRGB9rUvjeTAwkPZnAVeYUC4NYFupXTKZ++/NLxfQ l3YjcpgIZu/s+Dn7JZ7XNpOMMKmXryoSlXq0fUitsq1IMtVGSDR//nx0e4uHk5/wbmDQS4UDdMkcI uyU4FNfQ==; 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 1i1Wka-0005cX-0M; Sat, 24 Aug 2019 14:10:40 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i1Wk6-0004nF-Cj for linux-arm-kernel@lists.infradead.org; Sat, 24 Aug 2019 14:10:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1566655798; bh=rRIKSJq9ObxQ/pOOw2ApNgV/oQBg3tBp8gJFC1ntmhM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=IzQqKi5xE2IcwK22fDz9kIIEKC3dBzfKooZPjztmD9kUrQpbB3UbgVUshGrC3VatH XoFItX5R1B2QmZD3afTPnoPQRxThEon61Olkw/zoVHMybNUUn3BbbWR87tY0z1EM/N m515wEKPl3KN2Utjz+pl9i2+jrfSZ3Zc8PUGGdoQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.106]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MmDIo-1iS67C2oWe-00i8fo; Sat, 24 Aug 2019 16:09:58 +0200 From: Stefan Wahren To: Thierry Reding , Eric Anholt , Florian Fainelli , Ray Jui , Scott Branden Subject: [PATCH V2 3/3] pwm: bcm2835: suppress error message during deferred probe Date: Sat, 24 Aug 2019 16:09:48 +0200 Message-Id: <1566655788-24949-4-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566655788-24949-1-git-send-email-wahrenst@gmx.net> References: <1566655788-24949-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K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Rjs0ZRyHBqQxZ880UsvqP grAoGHNnDc0HUMPFSbg4ZH5BBMcP2CVtmkTyN3ML8wUIIJwH5cQHlSifPHD1LFQa2DmlZNt2r 6g+TBuDXEu2mTh7SlgIoI2OqKDezYSuyYFmhn3Z1GdPSmXEqD67tyf3fNCiVVjhe/IKLWL/O4 1XuOUCH00v5XUkLV1h4TJNUaw21y2i0Vyzm3CaXX/ERh5gH6cAfmUvEpihBKuSBt4HYWIFOUG zCRC4DI0j61cbaZvBbuLdMoObHfbjH9si+MEjnBVHMNuI6aE+sLs4JfmySw5zS0T86LMXqrMA r/tGmYwi6p4GsL4kVRm1ZBHpg3y/xwIT2XhQJBWeacKuSSyrlx9zA4NCg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190824_071010_747392_B91C46DF X-CRM114-Status: GOOD ( 12.46 ) 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 Reviewed-by: Uwe Kleine-König --- drivers/pwm/pwm-bcm2835.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c index 2c82386..91e24f0 100644 --- a/drivers/pwm/pwm-bcm2835.c +++ b/drivers/pwm/pwm-bcm2835.c @@ -153,8 +153,11 @@ 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)); - return PTR_ERR(pc->clk); + ret = PTR_ERR(pc->clk); + if (ret != -EPROBE_DEFER) + dev_err(&pdev->dev, "clock not found: %d\n", ret); + + return ret; } ret = clk_prepare_enable(pc->clk);