Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4248101ybx; Mon, 4 Nov 2019 10:07:25 -0800 (PST) X-Google-Smtp-Source: APXvYqy2a7VSnhHf65zzPM0Ac/d8hl3blSKDJ9rkc/y3qhz24+nziB8J6zGGglAx03ej30/haVZe X-Received: by 2002:a17:906:c836:: with SMTP id dd22mr25491126ejb.178.1572890845180; Mon, 04 Nov 2019 10:07:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572890845; cv=none; d=google.com; s=arc-20160816; b=G6KmrhsNtfMveMf3lXLbaupx0+0u5IYp0QipltnwlvVAXeQLwyl0GRL/NPTN+DKhev C8hmz27LyJq8S+oL//i0nlvZLdwreZ6pUgfLnWzYHOntkNHkzNT3zy5fLmaZ/sujODDb W+PhFfhjwNj9+wzXX1TcxTqlHog9MrtVO96qmKawZih5txeL0IudV8oPBF+wG8/TeGEk G6NfWHaT971qyTyxlAHm1nteaPAapM7gioU8ONUnKjWjocZT5k033k8evr3T5tiI2PbI teg3Yh5dovvwk3b7RnZVQhjaObpvnNWiWz+U61BrlK47CtUxuWSv8fW4qLLWRc0zvYPS VH7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=qdbL+DV6eEzmWI5lr5q+qK7N+UK7G78rGi4BI0ZSDrs=; b=H0oXJ70hfWO5ssh2mqpTzpT1iFP3Ufex3xwiLCgeE+BvPB2UAfZ1CVIytY4hr8ZeP2 uAYS7zn6uAxDlN7ZYdZ9wmVfmibXq87sSjEAnV3Seudj/JeKhJdK871FoW88NiK4EjVL zPzjN1KMYeNb9c8CMw1xNqa0nnGmpOTnttIMu7ScAV01YKf8ZKHVFfpUoGLQJvKc+8UA 55uzW0KDspgSLHnkKIGwdLiVccLupVzg1ggLdehZq8/DAuyMa/9FQG4YPYAUewSorgGQ VpplggTT6s02gglgm4ruWD7kxH7oOd09pCGvmtWF8aThcq20Rfj6fMZXD8ZWav0/B4VF 8vCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13si7980475eda.288.2019.11.04.10.07.02; Mon, 04 Nov 2019 10:07:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728336AbfKDSE2 (ORCPT + 99 others); Mon, 4 Nov 2019 13:04:28 -0500 Received: from smtprelay0202.hostedemail.com ([216.40.44.202]:34474 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728174AbfKDSE2 (ORCPT ); Mon, 4 Nov 2019 13:04:28 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 35FEA8384368; Mon, 4 Nov 2019 18:04:26 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3872:3873:3874:4321:4362:4605:5007:6117:6119:9010:10004:10400:10848:11026:11232:11473:11658:11914:12048:12296:12297:12679:12740:12760:12895:13069:13311:13357:13439:14659:14721:21080:21627:30012:30054:30070:30091,0,RBL:47.151.135.224:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: hour56_60b9b720d6924 X-Filterd-Recvd-Size: 1844 Received: from XPS-9350.home (unknown [47.151.135.224]) (Authenticated sender: joe@perches.com) by omf16.hostedemail.com (Postfix) with ESMTPA; Mon, 4 Nov 2019 18:04:24 +0000 (UTC) Message-ID: Subject: Re: [PATCH v5 1/3] clk: qcom: Allow constant ratio freq tables for rcg From: Joe Perches To: Jeffrey Hugo , bjorn.andersson@linaro.org, mturquette@baylibre.com, sboyd@kernel.org Cc: agross@kernel.org, marc.w.gonzalez@free.fr, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 04 Nov 2019 10:04:14 -0800 In-Reply-To: <20191031185715.15504-1-jeffrey.l.hugo@gmail.com> References: <20191031185538.15402-1-jeffrey.l.hugo@gmail.com> <20191031185715.15504-1-jeffrey.l.hugo@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-10-31 at 11:57 -0700, Jeffrey Hugo wrote: > Some RCGs (the gfx_3d_src_clk in msm8998 for example) are basically just > some constant ratio from the input across the entire frequency range. It > would be great if we could specify the frequency table as a single entry > constant ratio instead of a long list, ie: > > { .src = P_GPUPLL0_OUT_EVEN, .pre_div = 3 }, > { } > > So, lets support that. [] > diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c [] > @@ -29,6 +29,9 @@ struct freq_tbl *qcom_find_freq(const struct freq_tbl *f, unsigned long rate) > if (!f) > return NULL; > > + if(!f->freq) > + return f; > + trivia: Space after if before open parenthesis please. Can you please make sure to style check your code with checkpatch before submission? Thanks.