media: atomisp: add support for different PMIC configurations
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 11 May 2020 12:07:26 +0000 (14:07 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 May 2020 12:51:28 +0000 (14:51 +0200)
commitb4dc4e139beb406784c4ef2f1bc359eac37de5be
treebddfb63a670b93253cf121fc804db6882297db0c
parent0741bf667f3cf2e9cf6ec88985e14495a95f1540
media: atomisp: add support for different PMIC configurations

This patch required lots of research and work. The existing
atomisp driver at staging assumed that all Intel PMIC would
be using regulators, but upstream didn't follow it. Instead,
the intel_pmic.c driver added a hack, instead of using i2c_transfer,
it writes I2C values directly via regmapped registers.

Oh, well... At least, it provided a common API for doing that.

The PMIC settings used here came from the driver at the
yocto Aero distribution:

https://download.01.org/aero/deb/pool/main/l/linux-4.4.76-aero-1.3/

The logic itself was re-written, in order to use the I2C address
detected by the probing part.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c