OSDN Git Service

thermal: armada: Clarify control registers accesses
authorMiquel Raynal <miquel.raynal@free-electrons.com>
Fri, 22 Dec 2017 16:14:06 +0000 (17:14 +0100)
committerEduardo Valentin <edubezval@gmail.com>
Mon, 1 Jan 2018 21:16:29 +0000 (13:16 -0800)
commit2f28e4c24b10e29b5f737103a0a6fc77b1c0c99c
tree126a62a8cbbf05f7ce7dc713859c55d84713356d
parent27d92f27ae6c187978eb497fb5f366e7cb807d36
thermal: armada: Clarify control registers accesses

Bindings were incomplete for a long time by only exposing one of the two
available control registers. To ease the migration to the full bindings
(already in use for the Armada 375 SoC), rename the pointers for
clarification. This way, it will only be needed to add another pointer
to access the other control register when the time comes.

This avoids dangerous situations where the offset 0 of the control
area can be either one register or the other depending on the bindings
used. After this change, device trees of other SoCs could be migrated to
the "full" bindings if they may benefit from features from the
unaccessible register, without any change in the driver.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/armada_thermal.c