staging: regulator: hi6421v600-regulator: better handle modes
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 17 Aug 2020 07:10:50 +0000 (09:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Aug 2020 14:15:26 +0000 (16:15 +0200)
commite086a9cd2b9facf9e081af63f4728371645d1a6f
treea034114da55b88bcf74c7d536bb529e056a3348b
parentdb27f8294cd703bc23f4b1ccc5023d354c6a63d2
staging: regulator: hi6421v600-regulator: better handle modes

Instead of implementing a custom set of properties, set
valid_modes_mask based on having or not a mask for enabling
the eco_mode.

This makes the code clearer, and remove some uneeded props
from DT.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/0f4ac5a4167bbca428c8507b6992acd8b3ebabd1.1597647359.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/hikey9xx/hi6421v600-regulator.c