From patchwork Sat Dec 30 01:12:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 10137577 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6A36E6037D for ; Sat, 30 Dec 2017 01:19:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D48F2B551 for ; Sat, 30 Dec 2017 01:19:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5227C2B55D; Sat, 30 Dec 2017 01:19:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3CFD2B551 for ; Sat, 30 Dec 2017 01:19:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751322AbdL3BTG (ORCPT ); Fri, 29 Dec 2017 20:19:06 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36108 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751014AbdL3BNY (ORCPT ); Fri, 29 Dec 2017 20:13:24 -0500 Received: by mail-wm0-f67.google.com with SMTP id b76so50413161wmg.1 for ; Fri, 29 Dec 2017 17:13:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexus-software-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kfyhydMZNdtScLLtd+q91gT4J7k00qjaGz8WAbnkKMY=; b=YAmlTWeTAcq9RIV562DKd2XqhZvzMsmUBeoTlf0srhrNvxRomnf5aRXMUuzaRyxxTm /+/z+qz+mdko+kExbUNCcR6JFFoqfTM8rLK6wYQYNiit0xCwoOeEs38+3WMCfcPD0tg3 v94XNx0DZbQ+7Wsec7tw6GLCRW1yU8DZnlRcFTugSHGHO+QcHMrUovfPiMhehgEplvut WWZONa6s1A1a6fuyAKm3iR45AQgkspFR8egpJfefmzqfGR6xbCOrU9Zl2qpGBwOf7c1K FYEtwbqh4el8uk4ROL/V9x3v+MmrSn26DsH83v8KGMhL3tGNQK2nxUm4O35zonWSZizI xlgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kfyhydMZNdtScLLtd+q91gT4J7k00qjaGz8WAbnkKMY=; b=lq9GxU6rUMUfhvMcPrbLO54VGLUaoufRnyjxTjEAyf3i6INk1GOb+GsKhMHNnEcTN2 lxJ1uXb+oHBRwfMuIFKip6Z+PfNtQ+kDF9jd41ahsqTI7ib1y+xYRDNRc3o6lDTwrFv7 PP8M8XXffEkcdQLMSIGAASIgFQi/B3G6bUnxulkYNGJ/Ar9kirC1T/e+lk2uclcEf2RG ml9Ey7m/T7n5Va0xY1dVnydYWVfzs1BIubckTRW3Gra/U/elz9s0zTD6M5sfafu3Bx8y 2AqpjiwG+xRafKE8Pk86dl5SmI+Sa881y6SX0cAoV+po8flfEemg/YPYYxXf4wDwknzE jIiQ== X-Gm-Message-State: AKGB3mJQIR8Fo66aJGmgzfSm0ALYbyrr939wVR0UV0QEdZc5/lszU5M+ p+r1gF8CJHfq2fc/QexgpuSIJQ== X-Google-Smtp-Source: ACJfBosrx2zOtOYIJrcth3Z8jOGZmwuonuiF8iLElR+c7FmkjC2nO4nyfzePYSdSMAAI9sxYCfV+QQ== X-Received: by 10.80.146.77 with SMTP id j13mr47619062eda.298.1514596402893; Fri, 29 Dec 2017 17:13:22 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id h4sm29818268edb.16.2017.12.29.17.13.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Dec 2017 17:13:22 -0800 (PST) From: Bryan O'Donoghue To: mturquette@baylibre.com, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: pure.logic@nexus-software.ie, Ray Jui , Scott Branden , Jon Mason , bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH 10/33] clk: bcm: iproc: change iproc_asiu_clk_round_rate() return logic Date: Sat, 30 Dec 2017 01:12:49 +0000 Message-Id: <1514596392-22270-11-git-send-email-pure.logic@nexus-software.ie> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514596392-22270-1-git-send-email-pure.logic@nexus-software.ie> References: <1514596392-22270-1-git-send-email-pure.logic@nexus-software.ie> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch updates the round_rate() logic here to return zero instead of a negative number on error. In conjunction with higher-level changes associated with acting on the return value of clk_ops->round_rate() it is then possible to have clk_ops->round_rate() return values from 1 Hz to ULONG_MAX Hz instead of the current limitation of 1 Hz to LONG_MAX Hz. Signed-off-by: Bryan O'Donoghue Cc: Michael Turquette Cc: Stephen Boyd Cc: Ray Jui Cc: Scott Branden Cc: Jon Mason Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-clk@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/clk/bcm/clk-iproc-asiu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/bcm/clk-iproc-asiu.c b/drivers/clk/bcm/clk-iproc-asiu.c index ae40d08..f89872e 100644 --- a/drivers/clk/bcm/clk-iproc-asiu.c +++ b/drivers/clk/bcm/clk-iproc-asiu.c @@ -115,7 +115,7 @@ static unsigned long iproc_asiu_clk_round_rate(struct clk_hw *hw, unsigned int div; if (rate == 0 || *parent_rate == 0) - return -EINVAL; + return 0; if (rate == *parent_rate) return *parent_rate;