powertool: main: reduce code a little

usage already returns -EINVAL, so we can use that. Further, there
is no need to include i2c logic in code that never uses it.

Signed-off-by: Nishanth Menon <nm@ti.com>
powertool: in1226-sandbox: remove i2c

sandbox does not use i2c. so remove it.

Signed-off-by: Nishanth Menon <nm@ti.com>
powertool: ina226-sandbox:  split it to common code

We do use weak functions to help reuse code a little, but then
we can easily do better by splitting into common code..

Signed-off-by: Nishanth Menon <nm@ti.com>
powertool: main/algo: move the algo list to algo file

As algorithms increase in list (hopefully), the help text
will need constant modification to keep up with the list, so
move it to the algo file itself.

Signed-off-by: Nishanth Menon <nm@ti.com>
Makefile: dont strip for sandbox

sandbox lets us run valgrind etc. stripped binary is not of much use
there. So, dont strip for sandbox.

Further, we might do native/sandbox builds on ARCH=arm.. just handle
sandbox alone and not anything architecture specific, please.

Signed-off-by: Nishanth Menon <nm@ti.com>
Makefile: integrate C=1 sparse check

no support for C=2 (force check), but easier to do this with C=1

Signed-off-by: Nishanth Menon <nm@ti.com>
Makefile: define SPARSE_MODE to hack certain logic parts for sparse

Some parts of userspace logic is more than ok Vs what sparse tries
So, skip those parts using SPARSE_MODE definition

Signed-off-by: Nishanth Menon <nm@ti.com>
version: fix sparse warning

Sparse showed that header file inclusion errors could occur.

Signed-off-by: Nishanth Menon <nm@ti.com>
lib: l4cfg: sparse fixes

I dont like modifying l4cfg_static logic a lot since it is
autogenerated, so hack a little to keep original logic working

Signed-off-by: Nishanth Menon <nm@ti.com>
powertool: parse_config: misc sparse fixes

misc sparse fixes for parse handling..

The interesting one was mismatch when we included actual header

Signed-off-by: Nishanth Menon <nm@ti.com>
powertool: algo/main: trivial fixes for sparse

header inclusion error and usage of NULL..

Signed-off-by: Nishanth Menon <nm@ti.com>