lkml.org 
[lkml]   [2019]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 09/13] thermal: qoriq: Convert driver to use regmap API
From
Date
On 05/04/2019 20:24, Andrey Smirnov wrote:

[ ... ]

>>> +static const struct regmap_range qiriq_yes_ranges[] = {
>>> + regmap_reg_range(REGS_TMR, REGS_TSCFGR),
>>> + regmap_reg_range(REGS_TTRnCR(0), REGS_TTRnCR(3)),
>>> + /* Read only registers below */
>>> + regmap_reg_range(REGS_TRITSR(0), REGS_TRITSR(15)),
>>> +};
>>> +
>>> +static const struct regmap_access_table qiriq_wr_table = {
>>> + .yes_ranges = qiriq_yes_ranges,
>>> + .n_yes_ranges = ARRAY_SIZE(qiriq_yes_ranges) - 1,
>>> +};
>>> +
>>> +static const struct regmap_access_table qiriq_rd_table = {
>>> + .yes_ranges = qiriq_yes_ranges,
>>> + .n_yes_ranges = ARRAY_SIZE(qiriq_yes_ranges),
>>> +};
>>
>> As the table are the same, it would make sense to fold both structure to
>> a single one (and s/qiriq/qoriq/ ?)
>>
>
> Writable registers are a subset of readable registers and n_yes_ranges
> is different between the two. Not sure how I could fold the two into a
> single struct.

Right, never mind my comment.




--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

\
 
 \ /
  Last update: 2019-04-11 15:01    [W:0.061 / U:7.844 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site