G-Link SPI transport is used to communicate with external audio codec.
Add G-Link SPI transport device to support that configuration.
CRs-Fixed: 1106989
Change-Id: Id447b5e89e653065df6f368a4e5e59b22e0dc159
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
G-Link SPI transport is used to communicate with external audio codec.
Add G-Link SPI transport device to support that configuration.
CRs-Fixed: 1106989
Change-Id: Iac48fe87152379244e2c813f767b4e497553b8d1
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Add LPG and PWM parameters to blink the red LED. This is controlled by
userspace during charging.
Disable the battery-charging LED triggers to avoid conflicting LED control
by userspace and kernel battery-charging events.
CRs-Fixed: 1106738
Change-Id: Ic1c0f7ef7f8144fade05cc06db3cf87bce55c236
Signed-off-by: ansharma <ansharma@codeaurora.org>
sdm660 CPU CPR controllers support full hardware closed-loop CPR
operation also known as CPR hardening. Extend the cprh-kbss-regulator
driver to handle CPU subsystem specific power requirements of
the sdm660 chip.
CRs-Fixed: 1105923
Change-Id: I2e24a061a5ad4ee959dd578da9e811ac7700702c
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
As per the hardware documentation, add support for configuring
ESR tight and broad filters for normal and low temperature. This
is needed as the low temperature ESR filter coefficients are not
functional in the hardware.
All the filter values (in terms of percentage) can be configured
through the device tree. When the battery temperature goes below
10 C or user configured temperature threshold, ESR filter values
of room temperature will be applied to ESR low temperature
filters. Once the battery temperature goes above 10 C, original
values will be applied back to ESR low temperature filters.
Change-Id: I347f194f96ace3036a3c49efe0306d9f909cef36
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Battery missing detection interrupt fires prematurely for higher
battery ID values than the desired range. Fix this by disabling
BMD when battery is re-inserted and enable it after obtaining the
battery ID.
While at it, update the battery type shown in particular when a
battery profile is not available.
Change-Id: Ia5458a85289e47bda0a9f4bc59683af695974bc5
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
In certain cases like battery hotswap where a strong charger is
connected and battery is re-inserted, the expectation from the
user is to reload the battery profile. This cannot happen unless
a dVdd reset happens and wipes out FG SRAM. To help with the
aforementioned scenario, clear the profile integrity bit every
time when the battery is re-inserted. This way, FG driver will
reload the profile everytime upon battery insertion.
When the battery is missing, cycle counters cannot be cleared as
the access to FG SRAM might not succeed. Hence remove it from the
battery removal path. It will be cleared anyways when the profile
is loaded after the battery is inserted.
While at it, show the cached value of battery_id instead of
reading it every time from RR_ADC peripheral. When the battery is
re-inserted, battery id is obtained from RR_ADC driver anyways
which is sufficient.
Change-Id: I0b9566f7a9fcc81e26e68280382e2d960c49eeb5
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Add support to dump FG SRAM periodically based on the module
parameters. This will be useful for debugging purpose.
To enable FG SRAM dump,
echo 1 > /sys/module/qpnp_fg_gen3/parameters/sram_dump_en
To disable FG SRAM dump,
echo 0 > /sys/module/qpnp_fg_gen3/parameters/sram_dump_en
To set FG SRAM dump period,
echo 15000 > /sys/module/qpnp_fg_gen3/parameters/sram_dump_period_ms
Change-Id: Ib4bae7f67100a4bda1e4b996f2fbaeb86da979d2
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>