[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <150e19b9-9ecf-7cac-8aa3-c7c4d7a11468@codeaurora.org>
Date: Thu, 15 Apr 2021 07:01:03 +0530
From: Taniya Das <tdas@...eaurora.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Bjorn Andersson <bjorn.andersson@...aro.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...ainline.org>, agross@...nel.org,
rjw@...ysocki.net, devicetree@...r.kernel.org, robh+dt@...nel.org,
amit.kucheria@...aro.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, phone-devel@...r.kernel.org,
konrad.dybcio@...ainline.org, marijn.suijten@...ainline.org,
martin.botka@...ainline.org, jeffrey.l.hugo@...il.com
Subject: Re: [PATCH v4 5/7] cpufreq: qcom-hw: Implement CPRh aware OSM
programming
On 4/13/2021 9:19 AM, Viresh Kumar wrote:
> On 12-04-21, 15:01, Taniya Das wrote:
>> Technically the HW we are trying to program here differs in terms of
>> clocking, the LUT definitions and many more. It will definitely make
>> debugging much more troublesome if we try to accommodate multiple versions of
>> CPUFREQ-HW in the same code.
>>
>> Thus to keep it simple, easy to read, debug, the suggestion is to keep it
>> with "v1" tag as the OSM version we are trying to put here is from OSM1.0.
>
> That is a valid point and is always a case with so many drivers. What
> I am concerned about is how much code is common across versions, if it
> is 5-70%, or more, then we should definitely share, arrange to have
> callbacks or ops per version and call them in a generic fashion instead
> of writing a new driver. This is what's done across
> drivers/frameworks, etc.
>
The code sharing here between versions should be very minimal as most
portion of the code here in V1 would focus on programming to prepare the
LUT to be further read by the driver, the programming in itself is huge
for v1. I am okay if you move the v1 in a different file and invoke
based on version.
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.
--
Powered by blists - more mailing lists