thermal: imx: Add support for reading OCOTP through nvmem
authorLeonard Crestez <leonard.crestez@nxp.com>
Fri, 14 Jul 2017 14:11:08 +0000 (17:11 +0300)
committerZhang Rui <rui.zhang@intel.com>
Wed, 20 Sep 2017 01:36:18 +0000 (09:36 +0800)
commitae6215576d6b2251ab8c6bbeaf1c4cea99f0481b
treebd429fb2cc5c7b3a63629bd48cde00455690f00d
parent4633f7a156bf41003b1527f88ddf843ce0bb7d68
thermal: imx: Add support for reading OCOTP through nvmem

On newer imx SOCs accessing OCOTP directly is wrong because the ocotp
clock needs to be enabled first. Add support for reading those same
values through the nvmem API instead.

The older path is preserved for compatibility with older dts and because
it works correctly on imx6qdl chips.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/imx_thermal.c