]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: thermal: tsens: Introduce reg_fields to deal with register description
authorAmit Kucheria <amit.kucheria@linaro.org>
Wed, 20 Mar 2019 13:17:50 +0000 (18:47 +0530)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 14 May 2019 13:59:12 +0000 (06:59 -0700)
commit93a8e27ada74cc1b179cd1e69b1b353a9bfacfe1
tree47baf5692b9e2791cc8f2d934b4b5faa80f1cc5f
parentd85ae11ea93af077363783505a64b2e6a7b528a1
drivers: thermal: tsens: Introduce reg_fields to deal with register description

As we add support for newer versions of the TSENS IP, the current
approach isn't scaling because registers and bitfields get moved around,
requiring platform-specific hacks in the code. By moving to regmap, we
can hide the register level differences away from the code.

Define a common set of registers and bit-fields that we care about
across the various tsens IP versions.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/qcom/tsens-common.c
drivers/thermal/qcom/tsens-v0_1.c
drivers/thermal/qcom/tsens-v2.c
drivers/thermal/qcom/tsens.c
drivers/thermal/qcom/tsens.h