soc/tegra: pmc: Factor out DPD register bit calculation
authorAapo Vienamo <avienamo@nvidia.com>
Fri, 10 Aug 2018 18:08:08 +0000 (21:08 +0300)
committerThierry Reding <treding@nvidia.com>
Mon, 27 Aug 2018 10:25:17 +0000 (12:25 +0200)
commit00ead3c913afe8872a428e56e2a815adb2b230d1
treed5156cc9193871b9c37d2d6a0fe6ecd80f3e60f0
parent13136a47a061c01c91df78b37f7708dd5ce7035f
soc/tegra: pmc: Factor out DPD register bit calculation

Factor out the the code to calculate the correct DPD register and bit
number for a given pad. This logic will be needed to query the status
register.

Signed-off-by: Aapo Vienamo <avienamo@nvidia.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/soc/tegra/pmc.c