regulator: pf8x00: fix nxp,phase-shift
authorAdrien Grassein <adrien.grassein@gmail.com>
Thu, 14 Jan 2021 17:47:14 +0000 (18:47 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 15 Jan 2021 14:16:15 +0000 (14:16 +0000)
commit475a5d85ff62f7ca73f51f23977e7e3ec8c9f906
tree678452b31da47e204974d71a466ce3655a89adab
parent35a93349932e0e04c284f8a4954f3d1236c97d85
regulator: pf8x00: fix nxp,phase-shift

Fix the ternary condition which is a bad coding style
in the kernel

I also remove the defering configuration of the nxp,phase-shift.
The configuration is now done at parsing time. It save some memory
and it's better for comprehension.

I also use the OTP default configuration when the parameter is wrong
or not specified.
I think that it's better to use the default configuration from the chip
than an arbitrary value.

Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com>
Link: https://lore.kernel.org/r/20210114174714.122561-7-adrien.grassein@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/pf8x00-regulator.c