lkml.org 
[lkml]   [2019]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC 4/8] soc: samsung: Add Exynos Adaptive Supply Voltage driver
From
Date
On 4/23/19 12:50, Krzysztof Kozlowski wrote:
>> +static int exynos5422_asv_get_table(void)
>> +{
>> + unsigned int reg = exynos_chipid_read(EXYNOS_CHIPID_REG_PKG_ID);
>
> One more thought: you read this register multiple times in the same
> function. I think it is not needed - just read once, store the value
> and use the helpers to parse it.

Yes, I have noticed that as well. I'm not sure though if it is worth
to additionally cache registers manually like this when we use the
regmap. I have already converted that code to use the regmap API for
v2. And these are barely few registers reads at the driver
initialization time, not any hot path.

--
Thanks,
Sylwester

\
 
 \ /
  Last update: 2019-04-24 10:10    [W:0.089 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site