regulator: onsemi: Do not use regmap_update_bits

regmap_update_bits does a read-modify-write while updating
the device registers. This involves an unwanted read
operation which can be avoided by storing the register
value locally.

Also, make sure that the i2c read call required for
debug is enabled selectively. While at it also print
the FID(feature ID) register.

Change-Id: Ic3a4292a376911b53f1ecddd750ebde2bfb24971
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
regulator: onsemi: Fix access to a NULL pointer

Do not access the global driver data pointer if it is
NULL.

Change-Id: Id32e209c862ab070f0adc46ed0f6c91d59fb4df2
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
regulator: onsemi: Modify set voltage

Consider a scenario where min_uv and max_uv are same and they are
not multiples of step_size. Then, calculated new voltage using
div round up method may not fall into range [min_uv, max_uv].

Modify the driver to set voltage if the calculated new voltage
is in the range [min_uv, max_uv + step_size].

CRs-Fixed: 453932
Change-Id: I4d036315e8499d6e693aa23adb4c4f6dcf53bb28
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>