Move header files to /soc/qcom so that any kernel client
could use that and add Auto-generated header files.
export method for get client env so that kernel client
can use the api to get root env object.
Change-Id: Iec6492144602cf09892be5912079056a5970ee85
Signed-off-by: Nitin LNU <quic_nlakra@quicinc.com>
Add qcom-reboot-reason to modules list for Anorak.
Change-Id: I1226cfb1ee15405f9e6b12e6a2e072b003c0906f
Signed-off-by: Kamati Srinivas <quic_kamasrin@quicinc.com>
'Commit 106a4b85e0
("BACKPORT: FROMLIST: pwm: Add support for different PWM output types")'
cannot be carried forward. To support breath functionality make use of
the following APIs.
- qpnp_lpg_pwm_set_output_type
- qpnp_lpg_pwm_get_output_types_supported
This is needed to switch PWM output type to PWM (fixed) or LPG/PPG
(modulated).
Change-Id: I7e82f5d102b382c2a059e7b11a907c1d0c654b26
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
During vote_clock_off when wait_for_transfers_inflight
returned error indicating rx data is still to be read,
it went ahead, called powered off and set check_wakeup_byte
to true. Since check_wakeup_byte is true, pending rx data
is dropped in search of wakeup byte by msm_geni_find_wakeup_byte.
In meanwhile due to vote_clock_on check_wakeup_byte is
set to false, and some valid data is lost. Since wakeup
byte is not present in pending rx data, check_wakeup_byte
returned -EINVAL, due to which offset of rx_buf was
interpreted wrongly, resulting in crash when pushing
data to upper layer.
Return error in vote_clock_off if still data is inflight,
drop the complete rx buffer if msm_geni_find_wakeup_byte
returns error.
Change-Id: I938a12c343e377521a2fafa2ef353f705c533758
Signed-off-by: Visweswara Tanuku <quic_vtanuku@quicinc.com>
This is enabling modules to load in First stage of module
loading.
Change-Id: I1c3a388b2feacfc2748670e658d4bbf36c59e325
Signed-off-by: Raghavendra Kakarla <quic_rkakarla@quicinc.com>
Update scaling ratios used for charging-related channels used on
ADC5 Gen3 peripherals.
Change-Id: Idcaa8f39e96fd5510811f85141e82c52d54c7dc0
Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com>
Currently __tm_handler_work() assumes that each element in chan_props[]
represents 1 SDAM register. However, chan_props[] has an element for every
ADC and ADC TM channel. Since every ADC channel shares the same SDAM
register the loop within __tm_handler_work() has incorrect conditions. Fix
this.
While at it, remove __tm_handler_work() which was invoked for every SDAM
as tm_handler_work() goes through all channels.
Change-Id: I5f3444ab831ff2067a1a53f49dea0c5dbbdc8758
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
Add TEMP_ALARM_LITE channel mapping so that the proper scaling
function can be used with ADC code obtained after the conversion.
Change-Id: I4ad0564ba4e4bd3d8409e3923d4b0ad5f0395503
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
Currently adc5_gen3_probe() registers thermal zone devices and then
registers interrupt handlers. While registering the thermal zones the
ADC5 GEN3 TM get/set callbacks are called by thermal framework that relies
on interrupt completion. Since interrupts have not been registered the
callbacks will time out. Fix this and add error handling for thermal zone
registration.
Change-Id: I3ad94211f7831c94b0847fda549295ecfebcb90b
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
Fix the indentation to keep it uniform and readable.
Change-Id: I73da8941c72857a9f63dca3e8085873413b3a1f2
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
Currently, when reading an ADC channel the SID is always configured to 0.
This is causing incorrect readings for ADC and ADC TM channels. Fix this.
Change-Id: If6332c6ec83f04ce4294df27e5bdb784cc5d23be
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
Currently, the adc5 gen3 interrupt handler always returns IRQ_HANDLED.
Fix the handler so that on errors IRQ_NONE is returned.
Change-Id: I2ccebb985c81ad9de57b829b469ec8e58437f9e9
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
Currently, ADC5 GEN3 driver allows up to 8 channels. In Kalama up to 16
channels can be configured over 2 SDAMS. Update member variables,
interrupt handling and read and write functions so that driver can handle
2 or more SDAMS.
Change-Id: I2d65d9a420092db98cdbf27bba5188700c46fd0a
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
Currently, ADC5 GEN3 driver allows up to 8 channels. In Kalama up to 16
channels can be configured over 2 SDAMs. Dynamically set max_channels
based on number of registers(SDAMs) specified.
Change-Id: I789b142306dfb0099d955f9e166c17b331a47517
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
Currently, the debug base address is defined under the reg property. This
would be confusing if multiple addresses are specified under reg property
to support more ADC channels. Separate debug base into its own property.
Change-Id: Id96621bafd85bde0e601a89849aef7f094f53bf9
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
When an ADC conversion results in a conversion fault, the
conversion fault bit in the status register is set, but never
cleared, by PBS, causing an error print for conversion fault
to appear for all future conversions. Update interrupt handler
to clear conversion fault bit if it is found set.
Change-Id: I83b36ce585ab5d20639dbf5050f91e8850cc2b75
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
Correct base offset and register read API used in register
dump API called for conversion faults.
Change-Id: I274d40fe29f9f32238b9baa5e42b23d4df64cbf2
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
Fix timer value for immediate conversion to the right constant
to avoid TM conversions for immediate conversion requests.
Correct TM channel offsets checked from status and data registers
in TM interrupt handler.
Change-Id: I43a9a5cf33d31029fe306e61c4bf2e80966b9b7e
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
1.Remove mutexes used in TM configure API to avoid deadlock.
2.Update register writes in immediate and TM configure APIs.
3.Correct register and bit to check for end of conversion for immediate
conversion in IRQ handler.
Change-Id: I68d0bc4d6aeef089939d0d9ae9161b6122bf110e
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
Add scaling functions for batt_therm, batt_id and usb_in_i ADC channels
for PM5100. Also add usb_sns_v_div_16 and vin_div_16 channels to list of
supported channels and correct default prescaling value for vbat_sns
channel and full scale ADC current.
Change-Id: I86b86c319bff6df583efab8cc4c877218a79fe56
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
print error number when scmi_get_tunable_cpufreq_stats
return error. This will help in knowing exact error.
Change-Id: I4cf827186974e8d7bf084f081227bcf920a4f07b
Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
Add check to return value of do_xfer and if do_xfer
returns failure, then do not access buffer.
Change-Id: I31e4b55f424e2791a5da5659bef14fd4cd79af7b
Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>