Commit graph

92 commits

Author SHA1 Message Date
Priyansh Jain
d6f59978b7 drivers: thermal: Add valid cpu check in cpu isolate driver
Add a check for valid cpu and create cpu isolation cooling
device only for those cpu's which passes this check.

Change-Id: Ic931a1aa51857ed109555e055879cb39da11f3cf
Signed-off-by: Priyansh Jain <quic_priyjain@quicinc.com>
2022-08-10 09:43:03 +05:30
Srinivasarao Pathipati
cddb6100fd fix 'key ffffffe58e1b37c0 not in .data!' in nvmem and dcvs
Initialize sysfs attributes before device_create_file call.

Change-Id: I53577c86ccaf6f448700e4bf39b50be635eb83b7
Signed-off-by: Srinivasarao Pathipati <quic_spathi@quicinc.com>
2022-03-08 01:34:39 -08:00
Gopala Krishna Nuthaki
73d583e72a drivers: thermal: validate cdev sysfs state request before using it
There is a chance that userspace cooling device cur_state or
min_state sysfs node can request any random value. It may be
a value greater than max supported state. In that case if
cooling device is not bailing out, cooling device stats module
may behave unexpectedly.

Validate whether cur_state or min_state request is within the
range of max supported state or not for each cooling device.
If it is greater than max_state, bail out for that request for
different cooling devices.

Change-Id: If6422327b2bf4235617203588a5fe5805bf918f2
Signed-off-by: Gopala Krishna Nuthaki <quic_gnuthaki@quicinc.com>
2022-02-14 11:26:52 +05:30
Gopala Krishna Nuthaki
f391b6c81f drivers: thermal: Update a variable type in QMI encode logic
Change a variable type in QMI encode logic to avoid
buffer overflow scenario.

Change-Id: I11b10cce0e9ab5b02738b2ba13e637df979e9310
Signed-off-by: Gopala Krishna Nuthaki <gnuthaki@codeaurora.org>
2021-10-18 13:05:49 +05:30
Manaf Meethalavalappu Pallikunhi
efdce97d4a drivers: thermal: virtual-sensor: Add new virtual sensor for MSM8917
Add new virtual sensor definition for penta-cpu-max-step for MSM8917.
This virtual sensor can be used to monitor the overall temperature
of CPU cluster device.

Change-Id: I6a587b42cb4a474e1ce53ebbf893bbc168f22be4
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
2021-08-18 10:23:38 +05:30
Gopala Krishna Nuthaki
ab67ab07c5 drivers: thermal: Add support for RPM SMD cooling device
Add a snapshot of RPM SMD cooling device driver from msm-4.14
as of 'commit <f7835e76aab01> ("drivers: thermal: Add support
for RPM SMD cooling device")'.

Change-Id: Ica341e96a2951e5c48dcef66883b5c0af24ba60f
Signed-off-by: Gopala Krishna Nuthaki <gnuthaki@codeaurora.org>
2021-08-02 05:43:39 -07:00
Manaf Meethalavalappu Pallikunhi
b5dd98cdf6 drivers: thermal: qcom: Add driver to modify thermal zone based on efuse
Add driver to enable/disable pre-configured thermal zones
selectively at runtime based on efuse value. It uses QFPROM
nvmem cell interface to read efuse data. It supports multiple
efuse condtion and if any of them fails, driver just exit
with default enabled thermal zones.

Change-Id: I9bca61eb1ae9eeceff4ee0dd630c1ddb5967e2a5
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2021-02-08 14:27:39 +05:30
Manaf Meethalavalappu Pallikunhi
60fb845694 drivers: thermal: qmi_sensors: update QMI beamer ADC sensors support
Add new 3 QMI beamer ADC sensors to qmi sensor driver. It enables
thermal framework can configure thermal zone and monitor these sensors
from apps side.

Change-Id: Ifc577ccd312ab57e1f6a88269884c4c92b306264
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2020-08-17 10:38:34 -07:00
Manaf Meethalavalappu Pallikunhi
9a6dc22214 drivers: thermal: Handle min state clear condition properly
Currently thermal framework passes min_state value as ULONG_MAX to
clear the vote. But the min_state callback API for few cooling device
drivers are checking whether requested state is within cooling device
max limit or not. If it is not within max limit, it returns error.
It leads to a case where framework clears the request, but cooling
device is still holding previous request.

If min_state request is greater than max_state, cap the min_state
request to max state and apply max state vote for cooling device.

Change-Id: I69d8f1af704532b6a223c34ad825d231e50b8ca3
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2020-06-20 13:41:31 +05:30
qctecmdr
f75836aa9e Merge "drivers: thermal: bcl: Add BCL peripheral driver" 2020-06-07 02:53:21 -07:00
qctecmdr
a9dc695e87 Merge "thermal: adc_tm: Update support for PMIC4 ADC_TM" 2020-06-07 02:53:21 -07:00
Manaf Meethalavalappu Pallikunhi
7f054f2f95 thermal: lmh_dcvs: Add support for legacy hardware
Add support to enable legacy LMH hardware features like different LMH
algorithms enablement, LMH profile change feature etc. to limits
driver. These feature will be optional and will be enabled based on
devicetree flag.

Change-Id: I1949c574b0783d9f363c8ac068f9b5250b49b119
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
Signed-off-by: Asha Magadi Venkateshamurthy <amagad@codeaurora.org>
2020-06-05 00:57:05 -07:00
Jishnu Prakash
84e9cfe05d thermal: adc_tm: Update support for PMIC4 ADC_TM
Add new compatible field and corresponding device data
for PMIC4 ADC_TM to distinguish it from PMIC5, which
has different device data.

Change-Id: I6c9f20963248c763a6df1f996fd25bdfd6749fa3
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
Signed-off-by: Asha Magadi Venkateshamurthy <amagad@codeaurora.org>
2020-06-04 23:08:31 -07:00
Ram Chandrasekar
c91e08d2c7 drivers: thermal: bcl: Add BCL peripheral driver
Add snapshot of BCL driver from kernel 4.14 as of 'commit
<2a82a82> ("Merge "msm: ais: fix soc resource start
sequence")'.

Change-Id: I903fdec14b1657e3da762e254de6a391ef8e630a
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Signed-off-by: Asha Magadi Venkateshamurthy <amagad@codeaurora.org>
2020-06-03 22:48:18 +05:30
Asha Magadi Venkateshamurthy
0ecf7170f1 thermal: adc_tm: adc_init for sdm660
Added initialization for PMIC4 to support SDM660.

Change-Id: I9703bb8dee21ee084917b044f7aa83a5087b49b4
Signed-off-by: Asha Magadi Venkateshamurthy <amagad@codeaurora.org>
2020-05-20 20:38:17 +05:30
qctecmdr
bd0b720350 Merge "thermal: adc-tm: Add correction for PMIC7 ADC_TM" 2020-02-17 03:03:14 -08:00
Guru Das Srinagesh
f350eec219 thermal: adc-tm: Fix match table description
Due to an error in the specification of the multiple compatible strings
in the match table, nodes defined with compatible string "adc-tm5-iio"
failed to probe. Fix this.

Change-Id: I6cf544b202dfb0773215aeaeae8a12bae5b79dde
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2020-02-14 17:18:05 +05:30
Jishnu Prakash
36d13c8717 thermal: adc-tm: Add correction for PMIC7 ADC_TM
Correct calculation of value written to ADC_TM measurement enable
register.

Change-Id: I14a6f585bb0cee678aa6eee749ba3e983ba47173
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2020-02-14 15:46:18 +05:30
Jishnu Prakash
bfdf14029c thermal: adc-tm: Add support for PMIC7 ADC_TM
Add support for PMIC7 ADC_TM peripheral in ADC_TM common driver files.
Add main ADC_TM driver file for PMIC7. As register offsets and SW flows
have changed significantly for ADC_TM due to ADC architecture change,
this new driver is required for ADC_TM on PMIC7.

Change-Id: I9211552317955c503b7287876e11cd161c37f706
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2020-02-01 21:12:37 -08:00
Manaf Meethalavalappu Pallikunhi
bf06d70114 drivers: thermal: Add support for CDSP cooling devices via qmi cdev
Add support for CDSP DCVS and CDSP hardware cooling devices to QMI
cooling device driver. These cooling devices can be used to mitigate
CDSP subsystem at high temperature via qmi interface.

Change-Id: Ia9906b07ebca4bd6158b68e6e100405ebaa30b60
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-12-17 13:14:43 +05:30
Ram Chandrasekar
5483be2fd6 drivers: thermal: virtual-sensor: Add support for gpu skin sensor
Add a new virtual sensor based on gpu and skin sensors. This sensor will
do a weighted average of both the sensors.

Change-Id: I403ab74814090604f54c4f5858bbdfb77930a930
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2019-12-12 12:01:02 -07:00
Manaf Meethalavalappu Pallikunhi
db807a5da5 drivers: thermal: bcl_soc: Skip thermal evaluation during zone register
During bcl soc thermal zone register, framework calls soc set trip
function and if it is already violated state, it schedules workqueue
to evaluate trip and notify the framework. But if this workqueue
get scheduled prior to thermal zone register complete, there is a
chance that workqueue will use uninitialized thermal zone pointer
to notify thermal framework for re-evaluation. It leads to
unexpected behaviour.

Check whether thermal zone variable is initialized or not. If it is
initialized, then only notify thermal framework for re-evaluation.
Post thermal zone registration, the bcl soc driver explicitly request
to re-evalute trip immediately. It ensures that if above condition
happens, after thermal zone register, it will notify framework.

Change-Id: I2797140847d8ddc462053c1a40f2404f55971c81
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-11-27 10:41:47 +05:30
Manaf Meethalavalappu Pallikunhi
5069a29e82 drivers: thermal: validate cdev sysfs cur_state request before using it
There is a chance that userspace cooling device cur_state sysfs node
can request any random value. It may be a value greater than
max supported state. In that case if cooling device is not
bailing out, cooling device stats module may behave unexpectedly.

Validate whether cur_state request is within the range of max
supported state or not for each cooling device. If it is greater than
max_state, bail out for that request for different cooling devices.

Change-Id: Iaa6216ad1d2f1e5b92469cd3904715dd6c0b940c
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-11-27 10:35:13 +05:30
Manaf Meethalavalappu Pallikunhi
b9795e11da drivers: thermal: virtual-sensor: Add new virtual sensor for BENGAL
Add new virtual sensor definition for hepta-cpu-max-step for BENGAL.
This virtual sensor can be used to monitor the overall temperature of
CPU subsystem.

Change-Id: Iaf22102a26a0f0f274adef0f0a09f89007677e89
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-11-25 03:48:01 -08:00
Manaf Meethalavalappu Pallikunhi
dfe3da00b5 drivers: thermal: bcl_pmic5: filter out BCL spurious interrupts
There is a chance that BCL interrupt can trigger with no level status
bit set. In such cases, BCL irq handler notifies the framework for
BCL thermal zone re-evaluation. This spurious interrupt notification
may lead to some unwanted race condition with previous valid
notification or passive worker thread re-evaluation.

Check interrupt status register prior to framework notification and
notify framework only if respective status bit for each level is set.

Pass BCL level thermal zone trip value while notifying to framework.

Change-Id: Icff4b86ea738d18f06252f66a54d67083bfd51a0
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-11-13 10:26:44 +05:30
Manaf Meethalavalappu Pallikunhi
04ada42d1e drivers: bcl_pmic5: Add ibat scaling factor support for ibat conversion
For some pmic, based on pmic FG/QG ADC range, BCL Ibat scaling factor
needs to be changed. Add an optional devicetree property to choose
QG_ADC with 5A range. If this property is defined, ibat scaling
factor will be divided by two. By default ibat scaling factor will be
one corresponding to FG_ADC with 10A range.

Change-Id: I9f176f61a7187e5307943ee473e06bc9261c0a56
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-11-11 16:22:42 +05:30
qctecmdr
c654863226 Merge "drivers: thermal: Return zero on success for qmi_tmd_send_state_request" 2019-11-02 06:34:37 -07:00
Manaf Meethalavalappu Pallikunhi
e26a1b23a6 drivers: thermal: Return zero on success for qmi_tmd_send_state_request
The qmi APIs return a positive transaction result value on successful
qmi message update for all qmi cooling devices. The qmi cooling
devices return the same value for cooling device state update request
from thermal framework. But thermal framework expects zero as return
value for successful cdev update and then only it will update cooling
device stats for that cooling device.

Update qmi cooling device driver to return zero on successful cooling
device state update to thermal framework.

Change-Id: Id9d59ed2c88c7e95dc2746a061e0ebadf0477a30
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-10-29 21:28:09 +05:30
Manaf Meethalavalappu Pallikunhi
64d04720d8 drivers: thermal: CX IPeak: Add snapshot of CX IPeak cooling device
Add a snapshot of CX IPeak cooling device driver from msm-4.14 as of
'commit <829fee7bd3d86> ("driver: thermal: Update CX Ipeak driver to
support CX Ipeak v1.1 hardware")'.

Change-Id: I29eba311f835948c57784375c2cc11a3566bfd57
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-10-23 10:47:34 +05:30
Jishnu Prakash
db884bc24b thermal: adc_tm: Ensure drvdata is set for all adc_tm instances
For adc_tm instances of type iio, drvdata is not set before
exiting probe, which may lead to issues when dev_pm_ops are
used. Set drvdata for these adc_tm instances too.

Change-Id: If78162455abf44d3071a8816582262d776a12318
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2019-10-17 01:30:32 -07:00
Jishnu Prakash
62d8f4b256 thermal: adc_tm: Update ADC_TM channel configuration API
Update ADC_TM channel configuration API by writing separately to
each configuration register.

Change-Id: Ieca4b95d137b23c901eaac43d1ae26aa813e1b6d
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2019-10-13 06:56:38 -07:00
Ram Chandrasekar
a94095a353 drivers: thermal: qmi_cdev: update the cooling devices
Add support for an additional charge state mitigation device. Also rename
the pa_1 to pa_fr1 and modem_skin# to mmw_skin# mitigation devices.

Change-Id: I1ea5889dbfdfaff77d3d0c9bbdbcbfc3b744501c
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2019-09-30 11:08:18 -06:00
qctecmdr
92345df5ac Merge "drivers: thermal: qmi_cdev: Add new pa cooling device" 2019-09-17 10:40:30 -07:00
Manaf Meethalavalappu Pallikunhi
31d1fde36c drivers: thermal: Add limits cdsp Isense driver
Add driver to read limits cdsp Isense calibration data from SMEM
and enable sysfs file support to userspace daemon to access this data.
This driver is needed to avoid multiple re-calibration.

Change-Id: I1f1a70937034db388297c1ab52e12dcc468ee1dd
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-09-14 07:27:18 -07:00
Ram Chandrasekar
7355d6acef drivers: thermal: qmi_cdev: Add new pa cooling device
Add support for an additional pa mitigation device. This support will
enable the driver to expose both the pa based mitigation devices.

Change-Id: I750b39a3813c8d85da1800db860b1aa3a9041739
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2019-09-12 12:43:13 -07:00
Ivaylo Georgiev
e09e20aa23 Merge android-4.19.51 (d1f7f3b) into msm-4.19
* refs/heads/tmp-d1f7f3b:
  Linux 4.19.51
  ALSA: seq: Cover unsubscribe_port() in list_mutex
  drm/vc4: fix fb references in async update
  ovl: support stacked SEEK_HOLE/SEEK_DATA
  ovl: check the capability before cred overridden
  Revert "drm/nouveau: add kconfig option to turn off nouveau legacy contexts. (v3)"
  Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"
  percpu: do not search past bitmap when allocating an area
  gpio: vf610: Do not share irq_chip
  soc: renesas: Identify R-Car M3-W ES1.3
  usb: typec: fusb302: Check vconn is off when we start toggling
  ARM: exynos: Fix undefined instruction during Exynos5422 resume
  pwm: Fix deadlock warning when removing PWM device
  ARM: dts: exynos: Always enable necessary APIO_1V8 and ABB_1V8 regulators on Arndale Octa
  pwm: tiehrpwm: Update shadow register for disabling PWMs
  dmaengine: idma64: Use actual device for DMA transfers
  ice: Add missing case in print_link_msg for printing flow control
  gpio: gpio-omap: add check for off wake capable gpios
  PCI: xilinx: Check for __get_free_pages() failure
  block, bfq: increase idling for weight-raised queues
  video: imsttfb: fix potential NULL pointer dereferences
  video: hgafb: fix potential NULL pointer dereference
  scsi: qla2xxx: Reset the FCF_ASYNC_{SENT|ACTIVE} flags
  PCI: rcar: Fix 64bit MSI message address handling
  PCI: rcar: Fix a potential NULL pointer dereference
  net: hns3: return 0 and print warning when hit duplicate MAC
  power: supply: max14656: fix potential use-before-alloc
  platform/x86: intel_pmc_ipc: adding error handling
  ARM: OMAP2+: pm33xx-core: Do not Turn OFF CEFUSE as PPA may be using it
  drm/amd/display: Use plane->color_space for dpp if specified
  PCI: rpadlpar: Fix leaked device_node references in add/remove paths
  ARM: dts: imx6qdl: Specify IMX6QDL_CLK_IPG as "ipg" clock to SDMA
  ARM: dts: imx6sx: Specify IMX6SX_CLK_IPG as "ipg" clock to SDMA
  ARM: dts: imx6ul: Specify IMX6UL_CLK_IPG as "ipg" clock to SDMA
  ARM: dts: imx7d: Specify IMX7D_CLK_IPG as "ipg" clock to SDMA
  ARM: dts: imx6sll: Specify IMX6SLL_CLK_IPG as "ipg" clock to SDMA
  ARM: dts: imx6sx: Specify IMX6SX_CLK_IPG as "ahb" clock to SDMA
  ARM: dts: imx53: Specify IMX5_CLK_IPG as "ahb" clock to SDMA
  ARM: dts: imx50: Specify IMX5_CLK_IPG as "ahb" clock to SDMA
  ARM: dts: imx51: Specify IMX5_CLK_IPG as "ahb" clock to SDMA
  soc: rockchip: Set the proper PWM for rk3288
  clk: rockchip: Turn on "aclk_dmac1" for suspend on rk3288
  soc: mediatek: pwrap: Zero initialize rdata in pwrap_init_cipher
  PCI: keystone: Prevent ARM32 specific code to be compiled for ARM64
  platform/chrome: cros_ec_proto: check for NULL transfer function
  i40e: Queues are reserved despite "Invalid argument" error
  x86/PCI: Fix PCI IRQ routing table memory leak
  net: thunderbolt: Unregister ThunderboltIP protocol handler when suspending
  switchtec: Fix unintended mask of MRPC event
  iommu/arm-smmu-v3: Don't disable SMMU in kdump kernel
  vfio: Fix WARNING "do not call blocking ops when !TASK_RUNNING"
  nfsd: avoid uninitialized variable warning
  nfsd: allow fh_want_write to be called twice
  fuse: retrieve: cap requested size to negotiated max_write
  nvmem: sunxi_sid: Support SID on A83T and H5
  nvmem: core: fix read buffer in place
  ALSA: hda - Register irq handler after the chip initialization
  netfilter: nf_flow_table: fix netdev refcnt leak
  netfilter: nf_flow_table: check ttl value in flow offload data path
  nvme-pci: shutdown on timeout during deletion
  nvme-pci: unquiesce admin queue on shutdown
  PCI: designware-ep: Use aligned ATU window for raising MSI interrupts
  misc: pci_endpoint_test: Fix test_reg_bar to be updated in pci_endpoint_test
  iommu/vt-d: Set intel_iommu_gfx_mapped correctly
  blk-mq: move cancel of requeue_work into blk_mq_release
  watchdog: fix compile time error of pretimeout governors
  watchdog: imx2_wdt: Fix set_timeout for big timeout values
  netfilter: nf_tables: fix base chain stat rcu_dereference usage
  mips: Make sure dt memory regions are valid
  netfilter: nf_conntrack_h323: restore boundary check correctness
  netfilter: nf_flow_table: fix missing error check for rhashtable_insert_fast
  mmc: mmci: Prevent polling for busy detection in IRQ context
  ovl: do not generate duplicate fsnotify events for "fake" path
  PCI: dwc: Free MSI IRQ page in dw_pcie_free_msi()
  PCI: dwc: Free MSI in dw_pcie_host_init() error path
  uml: fix a boot splat wrt use of cpu_all_mask
  configfs: fix possible use-after-free in configfs_register_group
  percpu: remove spurious lock dependency between percpu and sched
  f2fs: fix to do checksum even if inode page is uptodate
  f2fs: fix to do sanity check on valid block count of segment
  f2fs: fix to use inline space only if inline_xattr is enable
  f2fs: fix to avoid panic in dec_valid_block_count()
  f2fs: fix to clear dirty inode in error path of f2fs_iget()
  f2fs: fix to do sanity check on free nid
  f2fs: fix to avoid panic in f2fs_remove_inode_page()
  f2fs: fix to avoid panic in f2fs_inplace_write_data()
  f2fs: fix to avoid panic in do_recover_data()
  ntp: Allow TAI-UTC offset to be set to zero
  mailbox: stm32-ipcc: check invalid irq
  pwm: meson: Use the spin-lock only to protect register modifications
  EDAC/mpc85xx: Prevent building as a module
  bpf: fix undefined behavior in narrow load handling
  drm/nouveau/kms/gv100-: fix spurious window immediate interlocks
  objtool: Don't use ignore flag for fake jumps
  drm/bridge: adv7511: Fix low refresh rate selection
  drm/nouveau/kms/gf119-gp10x: push HeadSetControlOutputResource() mthd when encoders change
  perf/x86/intel: Allow PEBS multi-entry in watermark mode
  mfd: twl6040: Fix device init errors for ACCCTL register
  drm/nouveau/disp/dp: respect sink limits when selecting failsafe link configuration
  mfd: intel-lpss: Set the device in reset state when init
  mfd: tps65912-spi: Add missing of table registration
  drivers: thermal: tsens: Don't print error message on -EPROBE_DEFER
  thermal: rcar_gen3_thermal: disable interrupt in .remove
  kernel/sys.c: prctl: fix false positive in validate_prctl_map()
  mm/slab.c: fix an infinite loop in leaks_show()
  mm/cma_debug.c: fix the break condition in cma_maxchunk_get()
  mm: page_mkclean vs MADV_DONTNEED race
  mm/cma.c: fix the bitmap status to show failed allocation reason
  initramfs: free initrd memory if opening /initrd.image fails
  mm/cma.c: fix crash on CMA allocation if bitmap allocation fails
  mem-hotplug: fix node spanned pages when we have a node with only ZONE_MOVABLE
  hugetlbfs: on restore reserve error path retain subpool reservation
  mm/hmm: select mmu notifier when selecting HMM
  ARM: prevent tracing IPI_CPU_BACKTRACE
  drm/pl111: Initialize clock spinlock early
  ipc: prevent lockup on alloc_msg and free_msg
  sysctl: return -EINVAL if val violates minmax
  fs/fat/file.c: issue flush after the writeback of FAT
  rapidio: fix a NULL pointer dereference when create_workqueue() fails
  x86: Fix RETPOLINE_CFLAGS check
  BACKPORT: kheaders: Do not regenerate archive if config is not changed
  BACKPORT: kheaders: Move from proc to sysfs
  BACKPORT: Provide in-kernel headers to make extending kernel easier
  UPSTREAM: binder: check for overflow when alloc for security context

Conflicts:
	arch/arm/kernel/smp.c

Change-Id: I3ea68f5be5910b6ae24d16194db149c24c36da36
Signed-off-by: Ivaylo Georgiev <irgeorgiev@codeaurora.org>
2019-07-18 07:43:59 -07:00
Manaf Meethalavalappu Pallikunhi
a5b4fd1b99 drivers: thermal: qmi_cooling: Add support for wlan cooling device
Add support for modem wlan cooling device for qmi cooling device
driver. It enables thermal framework to use this cooling device
mitigation for any thermal zone.

Change-Id: I740394d6f1fcaffdf6f2982d01af5bcdfd7f209a
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-07-03 21:12:16 +05:30
qctecmdr
a7c3f5a8e8 Merge "drivers: thermal: qmi_sensor: Add support for new sensors" 2019-06-28 16:25:11 -07:00
Ram Chandrasekar
076ba8f024 drivers: thermal: qmi_sensor: Add support for new sensors
Add support for monitoring new sensors that are available in the modem
sub system. This will enable the driver to register them as thermal zone
and perform any mitigation when a threshold is reached.

Change-Id: I436e05249e52e25cbf017b2c923e1d3efe62303a
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2019-06-27 10:20:23 -06:00
Manaf Meethalavalappu Pallikunhi
162e59ac03 drivers: lmh_dcvs: Add support to selectively register cooling devices
CPU cooling device register and handling max and min limit
functionalities are moved to cpu clock driver and cpu vdd min voltage
cooling device driver respectively. Add support to selectively
register cooling devices for LMH DCVSh driver so that other LMH DCVSh
features can be enabled without cooling device register.

Change-Id: I9e346c2410ff34c5b1dc9d0fdc19970a403007cc
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-06-18 15:22:43 +05:30
qctecmdr
d85069455a Merge "drivers: thermal: Add shared interrupt handler support to LMH DCVS" 2019-06-15 21:43:33 -07:00
qctecmdr
bf462d1828 Merge "drivers: thermal: cpu_isolate: core isolate outside critical section" 2019-06-15 21:43:33 -07:00
Amit Kucheria
1196b79a20 drivers: thermal: tsens: Don't print error message on -EPROBE_DEFER
[ Upstream commit fc7d18cf6a923cde7f5e7ba2c1105bb106d3e29a ]

We print a calibration failure message on -EPROBE_DEFER from
nvmem/qfprom as follows:
[    3.003090] qcom-tsens 4a9000.thermal-sensor: version: 1.4
[    3.005376] qcom-tsens 4a9000.thermal-sensor: tsens calibration failed
[    3.113248] qcom-tsens 4a9000.thermal-sensor: version: 1.4

This confuses people when, in fact, calibration succeeds later when
nvmem/qfprom device is available. Don't print this message on a
-EPROBE_DEFER.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-15 11:54:02 +02:00
qctecmdr
8fa5b27a5a Merge "thermal: adc_tm: Update threshold cross notification to thermal client" 2019-06-13 16:51:13 -07:00
Ram Chandrasekar
d68bd7fb21 drivers: thermal: cpu_isolate: core isolate outside critical section
Core isolation and unisolation is done inside the critical section with
the core isolation mutex. There is a possibility of deadlock, when the
core unisolation and core online from userspace happens simultaneously.
To avoid this move the core isolation and unisolation outside the
critical section so that deadlock is avoided.

Change-Id: Ic685a69ce8aa9929a3f12a7d0f287444748f1e26
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2019-06-11 11:20:34 -06:00
Jishnu Prakash
44dc73c3a3 thermal: adc_tm: Update threshold cross notification to thermal client
Increased resolution of mapping between raw adc code and temperature
for thermistors. Adjust thresholds written to ensure interrupts get
triggered correctly for temperatures read.
In addition, measure temperature causing threshold violation and
provide it directly to thermal framework instead of waiting for thermal
framework to read it.

Change-Id: I4330c659a91021ef44fa17c9c79e379105aa8fc3
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2019-06-11 17:15:01 +05:30
Manaf Meethalavalappu Pallikunhi
64f28e29c2 drivers: thermal: Add shared interrupt handler support to LMH DCVS
Add support for shared interrupt handler to LMH DCVS. It helps to
notify scheduler properly for target which has common LMH hardware
and different clock domains.

Ignore thermal zone register error in case if thermal zone is not
defined for the shared LMH DCVS instance.

Change-Id: I2f0aa3da4e5a1d032602dd7c1e595830c7883c4e
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-06-07 05:58:39 -07:00
Ram Chandrasekar
bdab10c60b drivers: msm_lmh_dcvs: Change devicetree optional properties
LMH DCVSh driver always expects the properties like interrupts, affinity
and reg as mandatory devicetree properties. The driver in certain
targets will have to just be probed with just isens regulator devicetree
properties with the others. In order to handle that make all the
properties as optional.

Change-Id: I5cacf7cce4b184d6926ae74d6097c9f956dd6595
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2019-05-22 11:56:53 -06:00
Ram Chandrasekar
a30f6ceaa2 driver: thermal: bcl_pmic5: Use mitigation level interrupts
BCL peripheral will eventually translate all the vbat and ibat
interrupts to mitigation level interrupts. And the interrupts also will
correspond to the levels instead of the vbat or ibat events. So use
these interrupts in HLOS to trigger mitigation.

The vbat and ibat will still be registered as sensors, but they wont
support interrupts and hence no mitigation for violation. Instead the
levels will be registered as interrupts and the mitigation config should
be based on this mitigation level sensor.

Change-Id: I45d2f63f2390eb4c59c45ca7d8aff758e1f88ce0
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2019-05-22 11:56:49 -06:00
qctecmdr
1d45792cb5 Merge "drivers: thermal: cpu_isolate: Add NULL check for get_cpu_device" 2019-05-21 13:49:51 -07:00