Commit Graph

112 Commits

Author SHA1 Message Date
lucaswei
54f6dd2f81 Merge android-4.19-stable (4.19.115) into android-msm-pixel-4.19-lts
Merge 4.19.115 into android-4.19
Linux 4.19.115
    drm/msm: Use the correct dma_sync calls in msm_gem
  * drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read()
      drivers/gpu/drm/drm_dp_mst_topology.c
  * usb: dwc3: don't set gadget->is_otg flag
      drivers/usb/dwc3/gadget.c
  * rpmsg: glink: Remove chunk size word align warning
      drivers/rpmsg/qcom_glink_native.c
  * arm64: Fix size of __early_cpu_boot_status
      arch/arm64/kernel/head.S
    drm/msm: stop abusing dma_map/unmap for cache
  * clk: qcom: rcg: Return failure for RCG update
      drivers/clk/qcom/clk-rcg2.c
    fbcon: fix null-ptr-deref in fbcon_switch
    RDMA/cm: Update num_paths in cma_resolve_iboe_route error flow
    Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl
    RDMA/cma: Teach lockdep about the order of rtnl and lock
    RDMA/ucma: Put a lock around every call to the rdma_cm layer
    ceph: canonicalize server path in place
    ceph: remove the extra slashes in the server path
    IB/hfi1: Fix memory leaks in sysfs registration and unregistration
    IB/hfi1: Call kobject_put() when kobject_init_and_add() fails
    ASoC: jz4740-i2s: Fix divider written at incorrect offset in register
    hwrng: imx-rngc - fix an error path
    tools/accounting/getdelays.c: fix netlink attribute length
  * usb: dwc3: gadget: Wrap around when skip TRBs
      drivers/usb/dwc3/gadget.c
  * random: always use batched entropy for get_random_u{32,64}
      drivers/char/random.c
    mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE
    slcan: Don't transmit uninitialized stack data in padding
    net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting
    net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers
    net: dsa: bcm_sf2: Ensure correct sub-node is parsed
    net: dsa: bcm_sf2: Do not register slave MDIO bus with OF
  * ipv6: don't auto-add link-local address to lag ports
      net/ipv6/addrconf.c
    mm: mempolicy: require at least one nodeid for MPOL_PREFERRED
  * include/linux/notifier.h: SRCU: fix ctags
      include/linux/notifier.h
  * bitops: protect variables in set_mask_bits() macro
      include/linux/bitops.h
    padata: always acquire cpu_hotplug_lock before pinst->lock
  * net: Fix Tx hash bound checking
      net/core/dev.c
    rxrpc: Fix sendmsg(MSG_WAITALL) handling
    ALSA: hda/ca0132 - Add Recon3Di quirk to handle integrated sound on EVGA X99 Classified motherboard
    power: supply: axp288_charger: Add special handling for HP Pavilion x2 10
    extcon: axp288: Add wakeup support
    mei: me: add cedar fork device ids
  * coresight: do not use the BIT() macro in the UAPI header
      include/uapi/linux/coresight-stm.h
    misc: pci_endpoint_test: Avoid using module parameter to determine irqtype
    misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
    misc: rtsx: set correct pcr_ops for rts522A
    media: rc: IR signal for Panasonic air conditioner too long
    drm/etnaviv: replace MMU flush marker with flush sequence
    tools/power turbostat: Fix missing SYS_LPI counter on some Chromebooks
    tools/power turbostat: Fix gcc build warnings
    drm/amdgpu: fix typo for vcn1 idle check
  * initramfs: restore default compression behavior
      usr/Kconfig
    drm/bochs: downgrade pci_request_region failure from error to warning
    drm/amd/display: Add link_rate quirk for Apple 15" MBP 2017
    nvme-rdma: Avoid double freeing of async event data
  * sctp: fix possibly using a bad saddr with a given dst
      net/sctp/ipv6.c
      net/sctp/protocol.c
  * sctp: fix refcount bug in sctp_wfree
      net/sctp/socket.c
  * net, ip_tunnel: fix interface lookup with no key
      net/ipv4/ip_tunnel.c
  * ipv4: fix a RCU-list lock in fib_triestat_seq_show
      net/ipv4/fib_trie.c
  * ANDROID: GKI: export symbols required by SPECTRA_CAMERA
      drivers/media/v4l2-core/v4l2-ioctl.c
      drivers/media/v4l2-core/v4l2-subdev.c
  * ANDROID: GKI: ARM/ARM64: Introduce arch_read_hardware_id
      arch/arm64/include/asm/system_misc.h
      arch/arm64/kernel/cpuinfo.c
  * ANDROID: GKI: drivers: base: soc: export symbols for socinfo
      drivers/base/soc.c
    ANDROID: GKI: Update ABI
  * ANDROID: GKI: ASoC: msm: fix integer overflow for long duration offload playback
      include/uapi/sound/compress_offload.h
      sound/core/compress_offload.c
    ANDROID: GKI: Bulk ABI update
  * Revert "ANDROID: GKI: mm: add struct/enum fields for SPECULATIVE_PAGE_FAULTS"
      include/linux/mm.h
      include/linux/mm_types.h
      include/linux/vm_event_item.h
      mm/vmstat.c
  * ANDROID: GKI: Revert "arm64: kill flush_cache_all()"
      arch/arm64/include/asm/cacheflush.h
      arch/arm64/include/asm/proc-fns.h
      arch/arm64/mm/cache.S
      arch/arm64/mm/flush.c
      arch/arm64/mm/proc.S
  * ANDROID: GKI: Revert "arm64: Remove unused macros from assembler.h"
      arch/arm64/include/asm/assembler.h
  * ANDROID: GKI: kernel/dma, mm/cma: Export symbols needed by vendor modules
      kernel/dma/contiguous.c
      mm/cma.c
  * ANDROID: GKI: mm: Export symbols __next_zones_zonelist and zone_watermark_ok_safe
      mm/mmzone.c
      mm/page_alloc.c
  * ANDROID: GKI: mm/memblock: export memblock_overlaps_memory
      mm/memblock.c
  * ANDROID: GKI: net, skbuff: export symbols needed by vendor drivers
      net/core/skbuff.c
  * ANDROID: GKI: Add stub __cpu_isolated_mask symbol
      kernel/cpu.c
  * ANDROID: GKI: sched: stub sched_isolate symbols
      kernel/sched/Makefile
  * ANDROID: GKI: export saved_command_line
      init/main.c
    ANDROID: GKI: Update ABI
  * ANDROID: GKI: ASoC: core: Update ALSA core to issue restart in underrun.
      include/sound/pcm.h
      sound/core/pcm_native.c
  * ANDROID: GKI: SoC: pcm: Add a restart callback field to struct snd_pcm_ops
      include/sound/pcm.h
  * ANDROID: GKI: SoC: pcm: Add fields to struct snd_pcm_ops and struct snd_soc_component_driver
      include/sound/pcm.h
      include/sound/soc.h
  * ANDROID: GKI: ASoC: core: Add compat_ioctl callback to struct snd_pcm_ops
      include/sound/pcm.h
  * ANDROID: GKI: ALSA: core: modify, rename and export create_subdir API
      include/sound/info.h
      sound/core/info.c
  * ANDROID: GKI: usb: Add helper API to issue stop endpoint command
      drivers/usb/core/hcd.c
      drivers/usb/core/usb.c
      drivers/usb/host/xhci.c
      include/linux/usb.h
      include/linux/usb/hcd.h
  * ANDROID: GKI: Thermal: thermal_zone_get_cdev_by_name added
      drivers/thermal/thermal_core.c
      include/linux/thermal.h
  * ANDROID: GKI: add missing exports for CONFIG_ARM_SMMU=m
      drivers/iommu/iommu-sysfs.c
      drivers/iommu/iommu-traces.c
      drivers/iommu/iommu.c
      drivers/of/base.c
      drivers/pci/pci.c
      drivers/pci/search.c
      include/trace/events/iommu.h
  * ANDROID: power: wakeup_reason: wake reason enhancements
      drivers/base/power/main.c
      drivers/base/power/wakeup.c
      drivers/irqchip/irq-gic-v3.c
      include/linux/wakeup_reason.h
      kernel/irq/chip.c
      kernel/power/process.c
      kernel/power/suspend.c
      kernel/power/wakeup_reason.c
  * BACKPORT: FROMGIT: kbuild: mkcompile_h: Include $LD version in /proc/version
      init/Makefile
      scripts/mkcompile_h
  * ANDROID: GKI: kernel: Export symbols needed by msm_minidump.ko and minidump_log.ko
      init/version.c
      mm/percpu.c
    ANDROID: Bulk update the ABI xml
    ANDROID: gki_defconfig: add CONFIG_IPV6_SUBTREES
  * ANDROID: GKI: arm64: reserve space in cpu_hwcaps and cpu_hwcap_keys arrays
      arch/arm64/include/asm/cpucaps.h
  * ANDROID: GKI: of: reserved_mem: Fix kmemleak crash on no-map region
      drivers/of/of_reserved_mem.c
  * ANDROID: GKI: sched: add task boost vendor fields to task_struct
      include/linux/sched.h
  * ANDROID: GKI: mm: add rss counter for unreclaimable pages
      include/linux/mm_types_task.h
  * ANDROID: GKI: irqdomain: add bus token DOMAIN_BUS_WAKEUP
      include/linux/irqdomain.h
  * ANDROID: GKI: arm64: fault: do_tlb_conf_fault_cb register fault callback
      arch/arm64/include/asm/traps.h
      arch/arm64/mm/fault.c
  * ANDROID: GKI: QoS: Enhance framework to support cpu/irq specific QoS requests
      include/linux/pm_qos.h
      kernel/power/qos.c
    ANDROID: GKI: Bulk ABI update
  * ANDROID: GKI: PM/devfreq: Do not switch governors from sysfs when device is suspended
      drivers/devfreq/devfreq.c
      include/linux/devfreq.h
  * ANDROID: GKI: PM / devfreq: Fix race condition between suspend/resume and governor_store
      drivers/devfreq/devfreq.c
      include/linux/devfreq.h
  * ANDROID: GKI: PM / devfreq: Introduce a sysfs lock
      drivers/devfreq/devfreq.c
      include/linux/devfreq.h
  * ANDROID: GKI: regmap: irq: Add support to clear ack registers
      drivers/base/regmap/regmap-irq.c
      include/linux/regmap.h
    ANDROID: GKI: Remove SCHED_AUTOGROUP
  * ANDROID: ignore compiler tag __must_check for GENKSYMS
      include/linux/compiler_types.h
    ANDROID: GKI: Bulk update ABI
  * ANDROID: GKI: Fix ABI diff for struct thermal_cooling_device_ops
      include/linux/thermal.h
  * ANDROID: GKI: ASoC: soc-core: export function to find components
      include/sound/soc.h
      sound/soc/soc-core.c
  * ANDROID: GKI: thermal: thermal_sys: Add configurable thermal trip points.
      include/linux/thermal.h
  * ANDROID: fscrypt: fall back to filesystem-layer crypto when needed
      fs/crypto/fscrypt_private.h
      fs/crypto/inline_crypt.c
      fs/crypto/keysetup.c
  * ANDROID: block: require drivers to declare supported crypto key type(s)
      block/blk-crypto-fallback.c
      block/blk-crypto.c
      block/keyslot-manager.c
      drivers/md/dm-default-key.c
      drivers/md/dm.c
      drivers/scsi/ufs/ufshcd-crypto.c
      fs/crypto/inline_crypt.c
      include/linux/blk-crypto.h
      include/linux/keyslot-manager.h
  * ANDROID: block: make blk_crypto_start_using_mode() properly check for support
      block/blk-crypto-fallback.c
      block/blk-crypto-internal.h
      block/blk-crypto.c
      include/linux/blk-crypto.h
  * ANDROID: GKI: power: supply: format regression
      drivers/power/supply/power_supply_sysfs.c
  * ANDROID: GKI: kobject: increase number of kobject uevent pointers to 64
      include/linux/kobject.h
  * ANDROID: GKI: drivers: video: backlight: Fix ABI diff for struct backlight_device
      include/linux/backlight.h
  * ANDROID: GKI: usb: xhci: Add support for secondary interrupters
      drivers/usb/core/hcd.c
      drivers/usb/core/usb.c
      drivers/usb/host/xhci-mem.c
      drivers/usb/host/xhci.c
      drivers/usb/host/xhci.h
      include/linux/usb.h
      include/linux/usb/hcd.h
  * ANDROID: GKI: usb: host: xhci: Add support for usb core indexing
      drivers/usb/host/xhci.h
    ANDROID: gki_defconfig: enable USB_XHCI_HCD
    ANDROID: gki_defconfig: enable CONFIG_BRIDGE
    ANDROID: GKI: Update ABI report
  * ANDROID: GKI: arm64: smp: Add set_update_ipi_history_callback
      arch/arm64/include/asm/smp.h
      arch/arm64/kernel/smp.c
  * ANDROID: kbuild: ensure __cfi_check is correctly aligned
      Makefile
      scripts/Makefile
  * FROMLIST: kmod: make request_module() return an error when autoloading is disabled
      kernel/kmod.c
    ANDROID: GKI: Update ABI report
  * ANDROID: GKI: ARM64: dma-mapping: export symbol arch_setup_dma_ops
      arch/arm64/mm/dma-mapping.c
    ANDROID: GKI: ARM: dma-mapping: export symbol arch_setup_dma_ops
  * ANDROID: GKI: ASoC: dapm: Avoid static route b/w cpu and codec dai
      include/sound/soc.h
      sound/soc/soc-dapm.c
  * ANDROID: GKI: ASoC: pcm: Add support for hostless playback/capture
      include/sound/soc.h
      sound/soc/soc-pcm.c
  * ANDROID: GKI: ASoC: core - add hostless DAI support
      include/sound/soc.h
      sound/soc/soc-pcm.c
  * ANDROID: GKI: drivers: thermal: Resolve ABI diff for struct thermal_zone_device_ops
      include/linux/thermal.h
  * ANDROID: GKI: drivers: thermal: Add support for getting trip temperature
      drivers/thermal/of-thermal.c
      include/linux/thermal.h
  * ANDROID: GKI: Add functions of_thermal_handle_trip/of_thermal_handle_trip_temp
      drivers/thermal/of-thermal.c
      drivers/thermal/thermal_core.c
      drivers/thermal/thermal_core.h
      include/linux/thermal.h
  * ANDROID: GKI: drivers: thermal: Add post suspend evaluate flag to thermal zone devicetree
      drivers/thermal/of-thermal.c
      drivers/thermal/thermal_core.c
      include/linux/thermal.h
  * UPSTREAM: loop: Only freeze block queue when needed.
      drivers/block/loop.c
  * UPSTREAM: loop: Only change blocksize when needed.
      drivers/block/loop.c
  * ANDROID: Fix wq fp check for CFI builds
      kernel/workqueue.c
    ANDROID: GKI: update abi definition after CONFIG_DEBUG_LIST was enabled
    ANDROID: gki_defconfig: enable CONFIG_DEBUG_LIST
    ANDROID: GKI: Update ABI definition
  * ANDROID: GKI: remove condition causing sk_buff struct ABI differences
      include/linux/skbuff.h
  * ANDROID: GKI: Export symbol arch_timer_mem_get_cval
      drivers/clocksource/arm_arch_timer.c
  * ANDROID: GKI: pwm: core: Add option to config PWM duty/period with u64 data length
      drivers/pwm/core.c
      drivers/pwm/sysfs.c
      include/linux/pwm.h
    ANDROID: Update ABI whitelist for qcom SoCs
  * ANDROID: Incremental fs: Fix remount
      fs/incfs/data_mgmt.c
      fs/incfs/data_mgmt.h
      fs/incfs/vfs.c
  * ANDROID: Incremental fs: Protect get_fill_block, and add a field
      fs/incfs/data_mgmt.c
      fs/incfs/vfs.c
      include/uapi/linux/incrementalfs.h
  * ANDROID: Incremental fs: Fix crash polling 0 size read_log
      fs/incfs/data_mgmt.c
  * ANDROID: Incremental fs: get_filled_blocks: better index_out
      fs/incfs/data_mgmt.c
      fs/incfs/format.c
      fs/incfs/format.h
  * ANDROID: GKI: of: property: Add device links support for "qcom,wrapper-dev"
      drivers/of/property.c
    ANDROID: GKI: update abi definitions due to recent changes
    Merge 4.19.114 into android-4.19
  * ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers
      drivers/clk/clk-composite.c
      drivers/clk/clk-divider.c
      drivers/clk/clk-fixed-factor.c
      drivers/clk/clk-fixed-rate.c
      drivers/clk/clk-fractional-divider.c
      drivers/clk/clk-gate.c
      drivers/clk/clk-mux.c
      drivers/clk/clk-xgene.c
  * ANDROID: GKI: drivers: clksource: Add API to return cval
      drivers/clocksource/arm_arch_timer.c
      include/clocksource/arm_arch_timer.h
  * ANDROID: GKI: clk: Add support for voltage voting
      drivers/clk/clk.c
      include/linux/clk-provider.h
  * ANDROID: GKI: kernel: Export task and IRQ affinity symbols
      kernel/irq/manage.c
      kernel/sched/core.c
  * ANDROID: GKI: regulator: core: Add support for regulator providers with sync state
      drivers/regulator/core.c
      drivers/regulator/proxy-consumer.c
      include/linux/regulator/driver.h
  * ANDROID: GKI: regulator: Call proxy-consumer functions for each regulator registered
      drivers/regulator/core.c
      include/linux/regulator/driver.h
  * ANDROID: GKI: regulator: Add proxy consumer driver
      drivers/regulator/Kconfig
      drivers/regulator/Makefile
      drivers/regulator/proxy-consumer.c
      include/linux/regulator/proxy-consumer.h
  * ANDROID: GKI: regulator: core: allow long device tree supply regulator property names
      drivers/regulator/core.c
  * ANDROID: GKI: Revert "regulator: Enable supply regulator if child rail is enabled."
      drivers/regulator/core.c
  * ANDROID: GKI: regulator: Remove redundant set_mode call in drms_uA_update
      drivers/regulator/core.c
  * ANDROID: GKI: net: Add the get current NAPI context API
      include/linux/netdevice.h
      net/core/dev.c
  * ANDROID: GKI: remove DRM_KMS_CMA_HELPER from GKI configuration
      init/Kconfig.gki
  * ANDROID: GKI: edac: Fix ABI diffs in edac_device_ctl_info struct
      drivers/edac/edac_device.h
  * ANDROID: GKI: pwm: Add different PWM output types support
      drivers/pwm/core.c
      include/linux/pwm.h
  * UPSTREAM: cfg80211: Authentication offload to user space in AP mode
      include/net/cfg80211.h
      include/uapi/linux/nl80211.h
      net/wireless/nl80211.c
  * ANDROID: Incremental fs: Fix four resource bugs
      fs/incfs/vfs.c
    ANDROID: Bulk update the ABI xml based on the referenced bugs.
Linux 4.19.114
    arm64: dts: ls1046ardb: set RGMII interfaces to RGMII_ID mode
    arm64: dts: ls1043a-rdb: correct RGMII delay mode to rgmii-id
    ARM: dts: N900: fix onenand timings
    ARM: dts: imx6: phycore-som: fix arm and soc minimum voltage
    ARM: bcm2835-rpi-zero-w: Add missing pinctrl name
    ARM: dts: oxnas: Fix clear-mask property
    perf map: Fix off by one in strncpy() size argument
  * arm64: alternative: fix build with clang integrated assembler
      arch/arm64/include/asm/alternative.h
    net: ks8851-ml: Fix IO operations, again
    gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 CHT + AXP288 model
  * bpf: Explicitly memset some bpf info structures declared on the stack
      kernel/bpf/btf.c
      kernel/bpf/syscall.c
  * bpf: Explicitly memset the bpf_attr structure
      kernel/bpf/syscall.c
    platform/x86: pmc_atom: Add Lex 2I385SW to critclk_systems DMI table
    vt: vt_ioctl: fix use-after-free in vt_in_use()
    vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
    vt: vt_ioctl: remove unnecessary console allocation checks
  * vt: switch vt_dont_switch to bool
      include/linux/vt_kern.h
    vt: ioctl, switch VT_IS_IN_USE and VT_BUSY to inlines
  * vt: selection, introduce vc_is_sel
      include/linux/selection.h
    mac80211: fix authentication with iwlwifi/mvm
    mac80211: Check port authorization in the ieee80211_tx_dequeue() case
    media: xirlink_cit: add missing descriptor sanity checks
    media: stv06xx: add missing descriptor sanity checks
    media: dib0700: fix rc endpoint lookup
    media: ov519: add missing endpoint sanity checks
  * libfs: fix infoleak in simple_attr_read()
      fs/libfs.c
    ahci: Add Intel Comet Lake H RAID PCI ID
    staging: wlan-ng: fix use-after-free Read in hfa384x_usbin_callback
    staging: wlan-ng: fix ODEBUG bug in prism2sta_disconnect_usb
    staging: rtl8188eu: Add ASUS USB-N10 Nano B1 to device table
    media: usbtv: fix control-message timeouts
    media: flexcop-usb: fix endpoint sanity check
    usb: musb: fix crash with highmen PIO and usbmon
    USB: serial: io_edgeport: fix slab-out-of-bounds read in edge_interrupt_callback
    USB: cdc-acm: restore capability check order
    USB: serial: option: add Wistron Neweb D19Q1
    USB: serial: option: add BroadMobi BM806U
    USB: serial: option: add support for ASKEY WWHC050
    mac80211: set IEEE80211_TX_CTRL_PORT_CTRL_PROTO for nl80211 TX
    mac80211: add option for setting control flags
    Revert "r8169: check that Realtek PHY driver module is loaded"
  * vti6: Fix memory leak of skb if input policy check fails
      net/ipv6/ip6_vti.c
  * bpf/btf: Fix BTF verification of enum members in struct/union
      kernel/bpf/btf.c
    netfilter: nft_fwd_netdev: validate family and chain type
    netfilter: flowtable: reload ip{v6}h in nf_flow_tuple_ip{v6}
  * afs: Fix some tracing details
      include/trace/events/afs.h
  * xfrm: policy: Fix doulbe free in xfrm_policy_timer
      net/xfrm/xfrm_policy.c
  * xfrm: add the missing verify_sec_ctx_len check in xfrm_add_acquire
      net/xfrm/xfrm_user.c
  * xfrm: fix uctx len check in verify_sec_ctx_len
      net/xfrm/xfrm_user.c
    RDMA/mlx5: Block delay drop to unprivileged users
  * vti[6]: fix packet tx through bpf_redirect() in XinY cases
      net/ipv4/Kconfig
      net/ipv4/ip_vti.c
      net/ipv6/ip6_vti.c
  * xfrm: handle NETDEV_UNREGISTER for xfrm device
      net/xfrm/xfrm_device.c
  * genirq: Fix reference leaks on irq affinity notifiers
      kernel/irq/manage.c
    RDMA/core: Ensure security pkey modify is not lost
    gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 BYT + AXP288 model
    gpiolib: acpi: Rework honor_wakeup option into an ignore_wake option
    gpiolib: acpi: Correct comment for HP x2 10 honor_wakeup quirk
    mac80211: mark station unauthorized before key removal
  * nl80211: fix NL80211_ATTR_CHANNEL_WIDTH attribute type
      net/wireless/nl80211.c
  * scsi: sd: Fix optimal I/O size for devices that change reported values
      drivers/scsi/sd.c
    scripts/dtc: Remove redundant YYLOC global declaration
    tools: Let O= makes handle a relative path with -C option
    perf probe: Do not depend on dwfl_module_addrsym()
    ARM: dts: omap5: Add bus_dma_limit for L3 bus
    ARM: dts: dra7: Add bus_dma_limit for L3 bus
  * ceph: check POOL_FLAG_FULL/NEARFULL in addition to OSDMAP_FULL/NEARFULL
      include/linux/ceph/osdmap.h
      include/linux/ceph/rados.h
  * Input: avoid BIT() macro usage in the serio.h UAPI header
      include/uapi/linux/serio.h
    Input: synaptics - enable RMI on HP Envy 13-ad105ng
    Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger()
    i2c: hix5hd2: add missed clk_disable_unprepare in remove
    ftrace/x86: Anotate text_mutex split between ftrace_arch_code_modify_post_process() and ftrace_arch_code_modify_prepare()
    sxgbe: Fix off by one in samsung driver strncpy size arg
    dpaa_eth: Remove unnecessary boolean expression in dpaa_get_headroom
    mac80211: Do not send mesh HWMP PREQ if HWMP is disabled
    scsi: ipr: Fix softlockup when rescanning devices in petitboot
    s390/qeth: handle error when backing RX buffer
  * fsl/fman: detect FMan erratum A050385
      drivers/net/ethernet/freescale/fman/Kconfig
    arm64: dts: ls1043a: FMan erratum A050385
    dt-bindings: net: FMan erratum A050385
  * cgroup1: don't call release_agent when it is ""
      kernel/cgroup/cgroup-v1.c
  * drivers/of/of_mdio.c:fix of_mdiobus_register()
      drivers/of/of_mdio.c
    cpupower: avoid multiple definition with gcc -fno-common
    nfs: add minor version to nfs_server_key for fscache
  * cgroup-v1: cgroup_pidlist_next should update position index
      kernel/cgroup/cgroup-v1.c
    hsr: set .netnsok flag
    hsr: add restart routine into hsr_get_node_list()
    hsr: use rcu_read_lock() in hsr_get_node_{list/status}()
    vxlan: check return value of gro_cells_init()
  * tcp: repair: fix TCP_QUEUE_SEQ implementation
      net/ipv4/tcp.c
    r8169: re-enable MSI on RTL8168c
    net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value
    net: dsa: mt7530: Change the LINK bit to reflect the link status
    net: ip_gre: Accept IFLA_INFO_DATA-less configuration
    net: ip_gre: Separate ERSPAN newlink / changelink callbacks
    bnxt_en: Reset rings if ring reservation fails during open()
    bnxt_en: fix memory leaks in bnxt_dcbnl_ieee_getets()
    slcan: not call free_netdev before rtnl_unlock in slcan_open
    NFC: fdp: Fix a signedness bug in fdp_nci_send_patch()
    net: stmmac: dwmac-rk: fix error path in rk_gmac_probe
    net_sched: keep alloc_hash updated after hash allocation
    net_sched: cls_route: remove the right filter from hashtable
    net: qmi_wwan: add support for ASKEY WWHC050
  * net/packet: tpacket_rcv: avoid a producer race condition
      net/packet/af_packet.c
      net/packet/internal.h
    net: mvneta: Fix the case where the last poll did not process all rx
    net: dsa: Fix duplicate frames flooded by learning
    net: cbs: Fix software cbs to consider packet sending time
    mlxsw: spectrum_mr: Fix list iteration in error path
    macsec: restrict to ethernet devices
    hsr: fix general protection fault in hsr_addr_is_self()
    geneve: move debug check after netdev unregister
  * Revert "drm/dp_mst: Skip validating ports during destruction, just ref"
      drivers/gpu/drm/drm_dp_mst_topology.c
    mmc: sdhci-tegra: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY
    mmc: sdhci-omap: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY
    mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for eMMC sleep command
    mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard
  * mmc: core: Allow host controllers to require R1B for CMD6
      include/linux/mmc/host.h
  * ANDROID: GKI: block: resolve ABI diff when CONFIG_BLK_DEV_BSG is unset
      include/linux/blkdev.h
      include/linux/bsg.h
  * ANDROID: GKI: bfq-iosched: update struct elevator_mq_ops ABI
      include/linux/elevator.h
  * ANDROID: GKI: locking/rwsem: add vendor field to struct rw_semaphore
      include/linux/rwsem.h
  * ANDROID: GKI: fs: add umount_end() function to struct super_operations
      include/linux/fs.h
  * ANDROID: GKI: perf: Add fields for CPU hotplug feature
      include/linux/perf_event.h
  * ANDROID: GKI: perf: Add field for struct perf_event
      include/linux/perf_event.h
  * ANDROID: GKI: cpuset: add field for task affinity for cpusets
      include/linux/sched.h
      init/init_task.c
    UPSTREAM: ubifs: wire up FS_IOC_GET_ENCRYPTION_NONCE
  * UPSTREAM: f2fs: wire up FS_IOC_GET_ENCRYPTION_NONCE
      fs/f2fs/file.c
  * UPSTREAM: ext4: wire up FS_IOC_GET_ENCRYPTION_NONCE
      fs/ext4/ioctl.c
  * UPSTREAM: fscrypt: add FS_IOC_GET_ENCRYPTION_NONCE ioctl
      fs/crypto/fscrypt_private.h
      fs/crypto/keysetup.c
      fs/crypto/policy.c
      include/linux/fscrypt.h
      include/uapi/linux/fscrypt.h
  * UPSTREAM: usb: raw_gadget: fix compilation warnings in uapi headers
      include/uapi/linux/usb/raw_gadget.h
  * BACKPORT: usb: gadget: add raw-gadget interface
      drivers/usb/gadget/legacy/Kconfig
      drivers/usb/gadget/legacy/Makefile
      include/uapi/linux/usb/raw_gadget.h
  * UPSTREAM: usb: gadget: move choice ... endchoice to legacy/Kconfig
      drivers/usb/gadget/Kconfig
      drivers/usb/gadget/legacy/Kconfig
  * UPSTREAM: ipv6: ndisc: add support for 'PREF64' dns64 prefix identifier
      include/net/ndisc.h
      net/ipv6/ndisc.c
    ANDROID: GKI: Removed cuttlefish configs
    ANDROID: clang: update to 10.0.5
  * FROMLIST: arm64: define __alloc_zeroed_user_highpage
      arch/arm64/include/asm/page.h
  * ANDROID: Incremental fs: Add INCFS_IOC_GET_FILLED_BLOCKS
      fs/incfs/data_mgmt.c
      fs/incfs/data_mgmt.h
      fs/incfs/format.c
      fs/incfs/format.h
      fs/incfs/vfs.c
      include/uapi/linux/incrementalfs.h
  * ANDROID: Incremental fs: Fix two typos
      fs/incfs/data_mgmt.c
      fs/incfs/integrity.c
    ANDROID: GKI: Update ABI
  * ANDROID: GKI: power_supply: add more soc properties
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
    ANDROID: GKI: Update ABI
  * ANDROID: GKI: google_battery: return string type for serial_number property
      drivers/power/supply/power_supply_sysfs.c
  * ANDROID: GKI: power: supply: Add APSD based power-supply properties
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: Remove "Wipower" PSY type
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: Add support for HVDCP_3P5
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: Define Debug Accessory Mode
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_AICL_*
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_ALIGNMENT
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: Add CP_ISNS_SLAVE power supply property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: add properties to report parallel connection topology
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: add POWER_SUPPLY_PROP_IRQ_STATUS property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: add CHARGE_CHARGER_STATE property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_PTMC_ID
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_OTG_FASTROLESWAP
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: Add VOLTAGE_STEP property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: Add AICL_DONE parameter
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: Add operating frequency property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_CC_UAH
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_VOLTAGE_FIFO
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: Add capacity and resistance estimates
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: Add vendor specific dead battery property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power-supply: add ADAPTER_DETAILS power supply property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_CHARGE_DISABLE
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: power_supply: Add property to display skin thermal status
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: Add properties to support PPS constant current(CC) mode
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: power_supply: Add REAL_CAPACITY property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: Add VOLTAGE_MAX_LIMIT power supply property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: Add DC_RESET power-supply property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: Add "THERM_ICL_LIMIT" property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: add CHIP_VERSION property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power-supply: Add VOLTAGE_VPH power supply property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: Add SCALE_MODE_EN power-supply property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: Add local extensions of string property names properly
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: add batt_age_level property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power-supply: Add CC_SOC power supply property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: add property to disable QC userspace optimizations
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: power_supply: Add FG_RESET power supply property
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power_supply: Add power supply type "Charge Pump"
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: supply: Add snapshot of power supply framework files
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: power_supply: Add property CHARGE_COUNTER_EXT and 64-bit precision properties
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: power_supply: add POWER_SUPPLY_PROP_CHARGE_ENABLED
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: power_supply: add POWER_SUPPLY_PROP_USB_OTG
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
  * ANDROID: GKI: power: power_supply: Add custom property for USB High Current mode
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
    UPSTREAM: coresight: Potential uninitialized variable in probe()
    ANDROID: GKI: Update ABI.
  * ANDROID: GKI: Add API to create pagetable mappings.
      arch/arm64/mm/mmu.c
      include/linux/memblock.h
  * ANDROID: GKI: drivers: usb: Add functions usb_func_ep_queue/usb_func_wakeup
      drivers/usb/gadget/composite.c
      drivers/usb/gadget/udc/core.c
      include/linux/usb/composite.h
      include/linux/usb/gadget.h
  * ANDROID: GKI: Add API usb_ep_autoconfig_by_name
      drivers/usb/gadget/epautoconf.c
      include/linux/usb/gadget.h
  * ANDROID: GKI: usb: core: Add helper function to return controller id
      drivers/usb/core/hcd.c
      drivers/usb/core/usb.c
      include/linux/usb.h
      include/linux/usb/hcd.h
    ANDROID: dm-bow: Fix free_show value is incorrect
    ANDROID: GKI: update ABI after fixing cfg80211_chan_def diff
  * BACKPORT: nl80211: Add support for EDMG channels
      include/net/cfg80211.h
      include/uapi/linux/nl80211.h
      net/wireless/chan.c
      net/wireless/nl80211.c
      net/wireless/util.c
  * FROMGIT: sched/rt: cpupri_find: Trigger a full search as fallback
      kernel/sched/cpupri.c
  * FROMGIT: sched/rt: Remove unnecessary push for unfit tasks
      kernel/sched/rt.c
  * BACKPORT: FROMGIT: sched/rt: Allow pulling unfitting task
      kernel/sched/rt.c
  * FROMGIT: sched/rt: Optimize cpupri_find() on non-heterogenous systems
      kernel/sched/cpupri.c
      kernel/sched/cpupri.h
      kernel/sched/rt.c
  * FROMGIT: sched/rt: Re-instate old behavior in select_task_rq_rt()
      kernel/sched/rt.c
  * BACKPORT: FROMGIT: sched/rt: cpupri_find: Implement fallback mechanism for !fit case
      kernel/sched/cpupri.c
    ANDROID: GKI: re-enable LTO, CFI and SCS
    Merge 4.19.113 into android-4.19
Linux 4.19.113
    staging: greybus: loopback_test: fix potential path truncations
    staging: greybus: loopback_test: fix potential path truncation
    drm/bridge: dw-hdmi: fix AVI frame colorimetry
  * arm64: smp: fix crash_smp_send_stop() behaviour
      arch/arm64/kernel/smp.c
  * arm64: smp: fix smp_send_stop() behaviour
      arch/arm64/kernel/smp.c
    ALSA: hda/realtek: Fix pop noise on ALC225
  * Revert "ipv6: Fix handling of LLA with VRF and sockets bound to VRF"
      net/ipv6/tcp_ipv6.c
    Revert "vrf: mark skb for multicast or link-local as enslaved to VRF"
  * futex: Unbreak futex hashing
      kernel/futex.c
  * futex: Fix inode life-time issue
      fs/inode.c
      include/linux/fs.h
      include/linux/futex.h
      kernel/futex.c
  * kbuild: Disable -Wpointer-to-enum-cast
      scripts/Makefile.extrawarn
    iio: light: vcnl4000: update sampling periods for vcnl4200
    USB: cdc-acm: fix rounding error in TIOCSSERIAL
    USB: cdc-acm: fix close_delay and closing_wait units in TIOCSSERIAL
  * x86/mm: split vmalloc_sync_all()
      include/linux/vmalloc.h
      kernel/notifier.c
      mm/vmalloc.c
  * page-flags: fix a crash at SetPageError(THP_SWAP)
      include/linux/page-flags.h
  * mm, slub: prevent kmalloc_node crashes and memory leaks
      mm/slub.c
  * mm: slub: be more careful about the double cmpxchg of freelist
      mm/slub.c
  * memcg: fix NULL pointer dereference in __mem_cgroup_usage_unregister_event
      mm/memcontrol.c
  * drm/lease: fix WARNING in idr_destroy
      drivers/gpu/drm/drm_lease.c
    drm/amd/amdgpu: Fix GPR read from debugfs (v2)
    btrfs: fix log context list corruption after rename whiteout error
  * xhci: Do not open code __print_symbolic() in xhci trace events
      drivers/usb/host/xhci-trace.h
  * rtc: max8907: add missing select REGMAP_IRQ
      drivers/rtc/Kconfig
    intel_th: pci: Add Elkhart Lake CPU support
    intel_th: Fix user-visible error codes
    staging/speakup: fix get_word non-space look-ahead
    staging: greybus: loopback_test: fix poll-mask build breakage
    staging: rtl8188eu: Add device id for MERCUSYS MW150US v2
    mmc: sdhci-of-at91: fix cd-gpios for SAMA5D2
    mmc: rtsx_pci: Fix support for speed-modes that relies on tuning
    iio: adc: at91-sama5d2_adc: fix differential channels in triggered mode
    iio: magnetometer: ak8974: Fix negative raw values in sysfs
    iio: trigger: stm32-timer: disable master mode when stopping
    iio: st_sensors: remap SMO8840 to LIS2DH12
    ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks
    ALSA: pcm: oss: Avoid plugin buffer overflow
    ALSA: seq: oss: Fix running status after receiving sysex
    ALSA: seq: virmidi: Fix running status after receiving sysex
    ALSA: line6: Fix endless MIDI read loop
  * usb: xhci: apply XHCI_SUSPEND_DELAY to AMD XHCI controller 1022:145c
      drivers/usb/host/xhci-pci.c
    USB: serial: pl2303: add device-id for HP LD381
  * usb: host: xhci-plat: add a shutdown
      drivers/usb/host/xhci-plat.c
    USB: serial: option: add ME910G1 ECM composition 0x110b
  * usb: quirks: add NO_LPM quirk for RTL8153 based ethernet adapters
      drivers/usb/core/quirks.c
  * USB: Disable LPM on WD19's Realtek Hub
      drivers/usb/core/quirks.c
    parse-maintainers: Mark as executable
    block, bfq: fix overwrite of bfq_group pointer in bfq_find_set_group()
    xenbus: req->err should be updated before req->state
    xenbus: req->body should be updated before req->state
    drm/amd/display: fix dcc swath size calculations on dcn1
    drm/amd/display: Clear link settings on MST disable connector
    riscv: avoid the PIC offset of static percpu data in module beyond 2G limits
    dm integrity: use dm_bio_record and dm_bio_restore
    dm bio record: save/restore bi_end_io and bi_integrity
    altera-stapl: altera_get_note: prevent write beyond end of 'key'
    drivers/perf: arm_pmu_acpi: Fix incorrect checking of gicc pointer
    drm/exynos: dsi: fix workaround for the legacy clock name
    drm/exynos: dsi: propagate error value and silence meaningless warning
    spi/zynqmp: remove entry that causes a cs glitch
    spi: pxa2xx: Add CS control clock quirk
    ARM: dts: dra7: Add "dma-ranges" property to PCIe RC DT nodes
    powerpc: Include .BTF section
    spi: qup: call spi_qup_pm_resume_runtime before suspending
    drm/mediatek: Find the cursor plane instead of hard coding it
    ANDROID: ABI: Update ABI with CONFIG_SOC_BUS enabled
  * ANDROID: GKI: Add CONFIG_SOC_BUS to gki_defconfig
      init/Kconfig.gki
    ANDROID: kbuild: do not merge .section..* into .section in modules
  * ANDROID: scsi: ufs: add ->map_sg_crypto() variant op
      drivers/scsi/ufs/ufshcd-crypto.c
      drivers/scsi/ufs/ufshcd-crypto.h
      drivers/scsi/ufs/ufshcd.c
      drivers/scsi/ufs/ufshcd.h
    ANDROID: GKI: Update ABI after fixing vm_event_item diffs
  * ANDROID: GKI: mm: vmstat: add pageoutclean
      include/linux/vm_event_item.h
      mm/filemap.c
      mm/vmstat.c
  * ANDROID: GKI: mm: add struct/enum fields for SPECULATIVE_PAGE_FAULTS
      include/linux/mm.h
      include/linux/mm_types.h
      include/linux/vm_event_item.h
      mm/vmstat.c
    ANDROID: GKI: Update ABI after fixing mm diffs
  * ANDROID: GKI: Add write_pending and max_writes fields to swap_info_struct
      include/linux/swap.h
  * ANDROID: GKI: memblock: Add memblock_overlaps_memory() to fix ABI diff
      include/linux/memblock.h
      mm/memblock.c
  * ANDROID: GKI: net: remove conditional members causing ABI diffs
      include/net/net_namespace.h
      include/net/netns/netfilter.h
      include/net/netns/x_tables.h
  * ANDROID: GKI: mm: introduce NR_UNRECLAIMABLE_PAGES
      include/linux/mmzone.h
      mm/vmstat.c
    ANDROID: GKI: Update ABI
  * ANDROID: GKI: sound: soc: Resolve ABI diff for struct snd_compr_stream
      include/sound/compress_driver.h
      include/sound/soc.h
  * ANDROID: GKI: sound: pcm: Add field hw_no_buffer to snd_pcm_substream
      include/sound/pcm.h
  * ANDROID: GKI: ALSA: core: Add snd_soc_card_change_online_state() API
      include/sound/core.h
      include/sound/soc.h
      sound/core/init.c
      sound/soc/soc-core.c
  * ANDROID: GKI: SoC: core: Introduce macro SOC_SINGLE_MULTI_EXT
      include/sound/soc.h
      sound/soc/soc-core.c
  * ANDROID: GKI: ALSA: PCM: User control API implementation
      include/sound/pcm.h
      sound/core/pcm.c
      sound/core/pcm_lib.c
  * ANDROID: GKI: ALSA: PCM: volume API implementation
      include/sound/pcm.h
      sound/core/pcm.c
      sound/core/pcm_lib.c
  * ANDROID: GKI: kernel: tick-sched: Add API to get the next wakeup for a CPU
      include/linux/tick.h
      kernel/time/tick-sched.c
  * ANDROID: GKI: extcon: Add extcon_register_blocking_notifier API.
      drivers/extcon/extcon.c
      drivers/extcon/extcon.h
      include/linux/extcon.h
  * UPSTREAM: bpf: Explicitly memset some bpf info structures declared on the stack
      kernel/bpf/btf.c
      kernel/bpf/syscall.c
  * UPSTREAM: bpf: Explicitly memset the bpf_attr structure
      kernel/bpf/syscall.c
    ANDROID: ABI: Update abi after enabling CONFIG_USB_PHY
  * ANDROID: GKI: Enable CONFIG_USB_PHY for usb drivers like dwc3
      init/Kconfig.gki
  * UPSTREAM: driver core: Add device link support for SYNC_STATE_ONLY flag
      drivers/base/core.c
      include/linux/device.h
  * ANDROID: Conflict fix for merging 4.19.112
      drivers/base/core.c
    Merge 4.19.112 into android-4.19
  * Revert "ANDROID: driver core: Add device link support for SYNC_STATE_ONLY flag"
      drivers/base/core.c
      include/linux/device.h
    ANDROID: update the ABI xml representation
  * ANDROID: GKI: Enable V4L2 hidden configs
      init/Kconfig.gki
Linux 4.19.112
  * ipv4: ensure rcu_read_lock() in cipso_v4_error()
      net/ipv4/cipso_ipv4.c
    efi: Fix debugobjects warning on 'efi_rts_work'
  * HID: google: add moonball USB id
      drivers/hid/hid-ids.h
  * mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
      mm/slub.c
    ARM: 8958/1: rename missed uaccess .fixup section
    ARM: 8957/1: VDSO: Match ARMv8 timer in cntvct_functional()
  * net: qrtr: fix len of skb_put_padto in qrtr_node_enqueue
      net/qrtr/qrtr.c
  * driver core: Fix creation of device links with PM-runtime flags
      drivers/base/core.c
  * driver core: Remove device link creation limitation
      drivers/base/core.c
      drivers/base/power/runtime.c
      include/linux/device.h
  * driver core: Add device link flag DL_FLAG_AUTOPROBE_CONSUMER
      drivers/base/core.c
      drivers/base/dd.c
      include/linux/device.h
  * driver core: Make driver core own stateful device links
      drivers/base/core.c
  * driver core: Fix adding device links to probing suppliers
      drivers/base/core.c
  * driver core: Remove the link if there is no driver with AUTO flag
      drivers/base/core.c
    mmc: sdhci-omap: Fix Tuning procedure for temperatures < -20C
    mmc: sdhci-omap: Don't finish_mrq() on a command error during tuning
    wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle
    wimax: i2400: fix memory leak
  * jbd2: fix data races at struct journal_head
      fs/jbd2/transaction.c
    sfc: fix timestamp reconstruction at 16-bit rollover points
  * net: rmnet: fix packet forwarding in rmnet bridge mode
      drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
  * net: rmnet: fix bridge mode bugs
      drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
      drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h
      drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
      drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h
  * net: rmnet: use upper/lower device infrastructure
      drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
  * net: rmnet: do not allow to change mux id if mux id is duplicated
      drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
  * net: rmnet: remove rcu_read_lock in rmnet_force_unassociate_device()
      drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
  * net: rmnet: fix suspicious RCU usage
      drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
      drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h
      drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
  * net: rmnet: fix NULL pointer dereference in rmnet_changelink()
      drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
  * net: rmnet: fix NULL pointer dereference in rmnet_newlink()
      drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
    hinic: fix a bug of setting hw_ioctxt
    hinic: fix a irq affinity bug
    slip: not call free_netdev before rtnl_unlock in slip_open
  * signal: avoid double atomic counter increments for user accounting
      kernel/signal.c
    mac80211: rx: avoid RCU list traversal under mutex
    net: ks8851-ml: Fix IRQ handling and locking
    net: usb: qmi_wwan: restore mtu min/max values after raw_ip switch
    scsi: libfc: free response frame from GPN_ID
  * cfg80211: check reg_rule for NULL in handle_channel_custom()
      net/wireless/reg.c
    HID: i2c-hid: add Trekstor Surfbook E11B to descriptor override
  * HID: apple: Add support for recent firmware on Magic Keyboards
      drivers/hid/hid-apple.c
    ACPI: watchdog: Allow disabling WDAT at boot
  * mmc: host: Fix Kconfig warnings on keystone_defconfig
      drivers/mmc/host/Kconfig
  * mmc: sdhci-omap: Workaround errata regarding SDR104/HS200 tuning failures (i929)
      drivers/mmc/host/Kconfig
    mmc: sdhci-omap: Add platform specific reset callback
    perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag
    ANDROID: GKI: Enable CONFIG_BACKLIGHT_CLASS_DEVICE in gki_defconfig
  * ANDROID: Incremental fs: Add INCFS_IOC_PERMIT_FILL
      fs/incfs/vfs.c
      include/uapi/linux/incrementalfs.h
  * ANDROID: Incremental fs: Remove signature checks from kernel
      fs/incfs/data_mgmt.c
      fs/incfs/data_mgmt.h
      fs/incfs/format.c
      fs/incfs/format.h
      fs/incfs/integrity.c
      fs/incfs/integrity.h
      fs/incfs/vfs.c
      include/uapi/linux/incrementalfs.h
  * ANDROID: Incremental fs: Pad hash blocks
      fs/incfs/integrity.c
  * ANDROID: Incremental fs: Make fill block an ioctl
      fs/incfs/data_mgmt.c
      fs/incfs/data_mgmt.h
      fs/incfs/vfs.c
      include/uapi/linux/incrementalfs.h
  * ANDROID: Incremental fs: Remove all access_ok checks
      fs/incfs/vfs.c
    Merge 4.19.111 into android-4.19
Linux 4.19.111
    batman-adv: Avoid free/alloc race when handling OGM2 buffer
    efi: Add a sanity check to efivar_store_raw()
    net/smc: cancel event worker during device removal
    net/smc: check for valid ib_client_data
  * ipv6: restrict IPV6_ADDRFORM operation
      net/ipv6/ipv6_sockglue.c
    i2c: acpi: put device when verifying client fails
    iommu/vt-d: Ignore devices with out-of-spec domain number
    iommu/vt-d: Fix the wrong printing in RHSA parsing
    netfilter: nft_tunnel: add missing attribute validation for tunnels
    netfilter: nft_payload: add missing attribute validation for payload csum flags
    netfilter: cthelper: add missing attribute validation for cthelper
    perf bench futex-wake: Restore thread count default to online CPU count
  * nl80211: add missing attribute validation for channel switch
      net/wireless/nl80211.c
  * nl80211: add missing attribute validation for beacon report scanning
      net/wireless/nl80211.c
  * nl80211: add missing attribute validation for critical protocol indication
      net/wireless/nl80211.c
    i2c: gpio: suppress error on probe defer
    drm/i915/gvt: Fix unnecessary schedule timer when no vGPU exits
  * pinctrl: core: Remove extra kref_get which blocks hogs being freed
      drivers/pinctrl/core.c
    pinctrl: meson-gxl: fix GPIOX sdio pins
    batman-adv: Don't schedule OGM for disabled interface
    iommu/vt-d: Fix a bug in intel_iommu_iova_to_phys() for huge page
    iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint
  * iommu/dma: Fix MSI reservation allocation
      drivers/iommu/dma-iommu.c
    x86/mce: Fix logic and comments around MSR_PPIN_CTL
    mt76: fix array overflow on receiving too many fragments for a packet
  * efi: Make efi_rts_work accessible to efi page fault handler
      include/linux/efi.h
    efi: Fix a race and a buffer overflow while reading efivars via sysfs
    macintosh: windfarm: fix MODINFO regression
    ARC: define __ALIGN_STR and __ALIGN symbols for ARC
    KVM: x86: clear stale x86_emulate_ctxt->intercept value
    gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache
  * cifs_atomic_open(): fix double-put on late allocation failure
      fs/open.c
    ktest: Add timeout for ssh sync testing
    drm/amd/display: remove duplicated assignment to grph_obj_type
  * workqueue: don't use wq_select_unbound_cpu() for bound works
      kernel/workqueue.c
  * netfilter: x_tables: xt_mttg_seq_next should increase position index
      net/netfilter/x_tables.c
    netfilter: xt_recent: recent_seq_next should increase position index
    netfilter: synproxy: synproxy_cpu_seq_next should increase position index
  * netfilter: nf_conntrack: ct_cpu_seq_next should increase position index
      net/netfilter/nf_conntrack_standalone.c
    iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint
    virtio-blk: fix hw_queue stopped on arbitrary error
    iwlwifi: mvm: Do not require PHY_SKU NVM section for 3168 devices
  * cgroup: Iterate tasks that did not finish do_exit()
      include/linux/cgroup.h
      kernel/cgroup/cgroup.c
  * cgroup: cgroup_procs_next should increase position index
      kernel/cgroup/cgroup.c
    macvlan: add cond_resched() during multicast processing
    net: fec: validate the new settings in fec_enet_set_coalesce()
  * slip: make slhc_compress() more robust against malicious packets
      drivers/net/slip/slhc.c
  * bonding/alb: make sure arp header is pulled before accessing it
      drivers/net/bonding/bond_alb.c
    devlink: validate length of region addr/len
  * tipc: add missing attribute validation for MTU property
      net/tipc/netlink.c
  * net/ipv6: remove the old peer route if change it to a new one
      net/ipv6/addrconf.c
  * net/ipv6: need update peer route when modify metric
      net/ipv6/addrconf.c
    selftests/net/fib_tests: update addr_metric_test for peer route testing
  * net: phy: fix MDIO bus PM PHY resuming
      drivers/net/phy/phy_device.c
      include/linux/phy.h
    nfc: add missing attribute validation for vendor subcommand
    nfc: add missing attribute validation for deactivate target
    nfc: add missing attribute validation for SE API
    team: add missing attribute validation for array index
    team: add missing attribute validation for port ifindex
    net: fq: add missing attribute validation for orphan mask
    macsec: add missing attribute validation for port
    can: add missing attribute validation for termination
    nl802154: add missing attribute validation for dev_type
    nl802154: add missing attribute validation
  * fib: add missing attribute validation for tun_id
      include/net/fib_rules.h
    devlink: validate length of param values
  * net: memcg: fix lockdep splat in inet_csk_accept()
      net/ipv4/inet_connection_sock.c
  * net: memcg: late association of sock to memcg
      mm/memcontrol.c
      net/core/sock.c
      net/ipv4/inet_connection_sock.c
  * cgroup: memcg: net: do not associate sock with unrelated cgroup
      kernel/cgroup/cgroup.c
      mm/memcontrol.c
    bnxt_en: reinitialize IRQs when MTU is modified
    sfc: detach from cb_page in efx_copy_channel()
  * r8152: check disconnect status after long sleep
      drivers/net/usb/r8152.c
    net: systemport: fix index check to avoid an array out of bounds access
    net: stmmac: dwmac1000: Disable ACS if enhanced descs are not used
  * net/packet: tpacket_rcv: do not increment ring index on drop
      net/packet/af_packet.c
    net: nfc: fix bounds checking bugs on "pipe"
    net: macsec: update SCI upon MAC address change.
  * netlink: Use netlink header as base to calculate bad attribute offset
      net/netlink/af_netlink.c
  * net/ipv6: use configured metric when add peer route
      net/ipv6/addrconf.c
    ipvlan: don't deref eth hdr before checking it's set
    ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast()
    ipvlan: do not add hardware address of master to its unicast filter list
    ipvlan: add cond_resched_rcu() while processing muticast backlog
  * ipv6/addrconf: call ipv6_mc_up() for non-Ethernet interface
      net/ipv6/addrconf.c
  * inet_diag: return classid for all socket types
      include/linux/inet_diag.h
      net/ipv4/inet_diag.c
      net/ipv4/udp_diag.c
      net/sctp/diag.c
  * gre: fix uninit-value in __iptunnel_pull_header
      net/ipv4/gre_demux.c
    cgroup, netclassid: periodically release file_lock on classid updating
  * net: phy: Avoid multiple suspends
      drivers/net/phy/phy_device.c
  * phy: Revert toggling reset changes.
      drivers/net/phy/phy_device.c
  * ANDROID: kbuild: fix module linker script flags for LTO
      Makefile
  * ANDROID: kbuild: avoid excessively long argument lists
      scripts/Makefile.build
  * UPSTREAM: cgroup: Iterate tasks that did not finish do_exit()
      include/linux/cgroup.h
      kernel/cgroup/cgroup.c
    ANDROID: update the ABI xml representation
    Revert "ANDROID: gki_defconfig: Temporarily disable CFI"
  * ANDROID: GKI: dma-buf: Add support for XXX_cpu_access_umapped ops
      drivers/dma-buf/dma-buf.c
      include/linux/dma-buf.h
      include/uapi/linux/dma-buf.h
  * ANDROID: GKI: dma-buf: Add support to set a destructor on a dma-buf
      drivers/dma-buf/dma-buf.c
      include/linux/dma-buf.h
  * ANDROID: GKI: dma-buf: use spinlock to protect set/get name operation
      drivers/dma-buf/dma-buf.c
      include/linux/dma-buf.h
  * ANDROID: GKI: dma-buf: Add support to get flags associated with a buffer
      drivers/dma-buf/dma-buf.c
      include/linux/dma-buf.h
  * ANDROID: GKI: dma-buf: Add support for mapping buffers with DMA attributes
      include/linux/dma-buf.h
  * ANDROID: GKI: dma-buf: Add support for partial cache maintenance
      drivers/dma-buf/dma-buf.c
      include/linux/dma-buf.h
  * ANDROID: GKI: arm64: mm: Support setting removed_dma_ops in arch_setup_dma_ops
      arch/arm64/mm/dma-mapping.c
      include/linux/dma-removed.h
  * ANDROID: GKI: drivers: Add dma removed ops
      include/linux/device.h
      kernel/dma/Makefile
      kernel/dma/removed.c
  * ANDROID: GKI: add dma_map_ops remap/unremap operations
      arch/arm64/mm/dma-mapping.c
      include/linux/dma-mapping.h
    ANDROID: Add build.config files for ARM 32-bit
    ANDROID: GKI: update abi due to CONFIG_JUMP_LABEL being enabled
    ANDROID: GKI: enable CONFIG_JUMP_LABEL
    ANDROID: Add build.config.gki-debug.x86_64
    ANDROID: Add build.config.gki-debug.aarch64

Change-Id: Ifef77d2201a3833e4970cc7617d45814990bc3cb
Signed-off-by: lucaswei <lucaswei@google.com>
2020-08-25 20:09:36 +08:00
George Lee
c0f9037932 ANDROID: GKI: Thermal: thermal_zone_get_cdev_by_name added
thermal_zone_get_cdev_by_name added to thermal_core for cooling device
querying by name.

Bug: 128625129
Bug: 143740346
Bug: 149945768
Test: build
Change-Id: I3253e61800f8514769d1efc33111dec1e9000e26
Signed-off-by: George Lee <geolee@google.com>
(cherry picked from commit e1a515b24088b0051506fa7d54c5b9d6e6b870b0)
Signed-off-by: TeYuan Wang <kamewang@google.com>
(cherry picked from commit 5e9b1d82fd)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-09 12:47:53 -07:00
Hridya Valsaraju
8c83a60c3b ANDROID: GKI: Fix ABI diff for struct thermal_cooling_device_ops
Adds members set/get_min_state() to struct
thermal_cooling_device_ops.

Also adds the field min_state_throttle to struct thermal_governor.

Test: build
Bug: 149945768
Change-Id: I085feb9d3b818dcf9754f0f624166c360593bce6
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
(cherry picked from commit 8a12149c26)
[hridya: cherry-picked only the ABI diff]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-07 11:05:17 -07:00
Hridya Valsaraju
9159a8134c ANDROID: GKI: thermal: thermal_sys: Add configurable thermal trip points.
Modify enum thermal_trip_type to add configurable thermal
trip points of THERMAL_TRIP_CONFIGURABLE_HI,
THERMAL_TRIP_CONFIGURABLE_LOW, and THERMAL_TRIP_CRITICAL_LOW.

Bug: 149945768
Change-Id: I25c9c3bcfd58e44da5369187d1095559062f1860
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
(cherry picked from commit 3f67fe6c0a)
[hridya: commit amended to only include ABI diff].
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-07 11:05:17 -07:00
Manaf Meethalavalappu Pallikunhi
4f04e3ea54 ANDROID: GKI: drivers: thermal: Resolve ABI diff for struct thermal_zone_device_ops
The following members are added to struct thermal_zone_device_ops:
int (*set_polling_delay)(struct thermal_zone_device *, int);
int (*set_passive_delay)(struct thermal_zone_device *, int);

Test: build and boot
Bug: 149945768
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
(cherry picked from commit f68eb1a39e)
[hridya: commit amended to only include ABI diff]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Change-Id: Iad25d6585a35ecb71fdef36e27b27bece93a7c11
2020-04-06 07:17:39 -07:00
Ram Chandrasekar
10d3954a78 ANDROID: GKI: drivers: thermal: Add support for getting trip temperature
Add support for the sensor drivers using of-thermal interface to support
reading the trip temperature from the hardware using a callback. This
can be used in case, when the hardware works on a pre-configured
threshold different from the threshold set by software.

Test: build
Bug: 149945768
Change-Id: Ic5aaf1586b8dcbb3da0dd775718407c257b2064f
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
(cherry picked from commit 8a12149c26)
[hridya: added an extra null pointer check, partial cherry-pick]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-06 07:17:39 -07:00
Hridya Valsaraju
5a7902fba4 ANDROID: GKI: Add functions of_thermal_handle_trip/of_thermal_handle_trip_temp
These APIs handle thermal trips from sensors.
These are required to reduce ABI diff.

Test: build
Bug: 149945768
Change-Id: I2ba4e91c954c9b13a323ec729b0c5a99f51e8fc3
(cherry picked from commit 8a12149c26)
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
[hridya: commit amended to only include ABI diff, some pointer checks
added, also squashed 'c379a963e6ce9  drivers: thermal: Evaluate based on
trip temperature']
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-06 07:17:39 -07:00
Manaf Meethalavalappu Pallikunhi
b078dd60e3 ANDROID: GKI: drivers: thermal: Add post suspend evaluate flag to thermal zone devicetree
Thermal core framework subscribes for suspend/resume notification.
On resume notification it re-evaluates each thermal zone for
temperature and cooling state update. For some devices,
a large number of thermal zones are enabled for different mitigations.
Re-evaluating each thermal zone during resume leads to multiple issues
including delay in back to back suspend resume scenario, power penalty
for frequent wake up due to re-setting trip threshold especially
during cold temperature usecases.

Add wake-capable-sensor property to thermal zone devicetree node to
denote that these sensors are wakeup capable. If a thermal zone has
this property defined, thermal framework ignores resume re-evaluation
and can service the threshold notification during the suspend/resume
path.

Test: build
Bug: 149945768
Change-Id: I07edf80ad29009378af4c70e750d01bde6f30806
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
(cherry picked from commit a915ed479e)
[hridya: added some pointer checks]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-06 07:17:38 -07:00
Ram Chandrasekar
3b10834869 ANDROID: GKI: Add devm_thermal_of_virtual_sensor_register API.
This API registers a virtual thermal sensor.

Test: build
Bug: 149945768
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Change-Id: I72b29b4296d9be949d096913471153b596c67e1f
[hridya: commit amended to only pull in the API implementation and code
needed to build it.]
(cherry picked commit from 8a12149c26)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-03-12 10:46:18 -07:00
Hridya Valsaraju
986a427e56 ANDROID: GKI: drivers: thermal: Fix ABI diff for struct thermal_cooling_device
Add new fields to struct thermal_cooling_device.

Test: make
Bug: 149945768

Change-Id: Ib0d55a0ee7ad8f835a5e969b7ef268d420085acf
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
(cherry picked commit from 8a12149c26)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-03-07 00:18:21 +00:00
Hridya Valsaraju
82bda5d639 ANDROID: GKI: drivers: thermal: Indicate in DT the trips are for temperature falling
SoCs may need to handle the case where the temperature is below the
timing closure temperatures of the logic. At low temperature, the timing
closures may not be met. The compensative action at such temperatures is
to increase the voltage, by switching to a higher OPP.

Thermal governors need to understand that the temperatures are
descending in order to correctly estimate the mitigative actions.

Change-Id: I56eb249a853d9c8ed9a96ff8a41a1ba87abb29f4
Bug: 149945768
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
(cherry picked commit from 8a12149c26)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-03-07 00:18:09 +00:00
George Lee
c340876991 Thermal: Added VIRT_COUNT_THRESHOLD to virtual sensor
VIRT_COUNT_THRESHOLD added to qti_virtual_sensor for combining multiple
sensors triggered condition.

Bug: 128625129
Bug: 143740346
Test: Boot to home
Change-Id: Ib0dcb753180f0cec72b1cc4e5c3b2b899abbb9ea
Signed-off-by: George Lee <geolee@google.com>
(cherry picked from commit 6abe69a5952967dbc78ecdca9fa2d9e4362ca277)
Signed-off-by: mandyshen <mandyshen@google.com>
2019-11-06 22:21:14 +08:00
George Lee
5e9b1d82fd Thermal: thermal_zone_get_cdev_by_name added
thermal_zone_get_cdev_by_name added to thermal_core for cooling device
querying by name.

Bug: 128625129
Bug: 143740346
Change-Id: I3253e61800f8514769d1efc33111dec1e9000e26
Signed-off-by: George Lee <geolee@google.com>
(cherry picked from commit e1a515b24088b0051506fa7d54c5b9d6e6b870b0)
Signed-off-by: TeYuan Wang <kamewang@google.com>
2019-11-05 10:39:04 +00:00
Wei Wang
83773de341 FROMLIST: thermal: make thermal_cooling_device_register accepts const string
Change the argument similarly to thermal_zone_device_register. This will
help register names get from of_property_read_string during probe.

LKML link: https://lkml.org/lkml/2019/5/14/631

Bug: 128625129
Bug: 143740346
Test: Build
Change-Id: I966fbe10ac84705f5dd4d26af4d0a848a2f36b68
Signed-off-by: Wei Wang <wvw@google.com>
(cherry picked from commit 1021e50225dce1d5b995658b04dc84a4fdc95abd)
Signed-off-by: TeYuan Wang <kamewang@google.com>
2019-11-05 10:18:57 +00:00
Manaf Meethalavalappu Pallikunhi
f68eb1a39e drivers: thermal: Add support to modify passive/polling delay to of_thermal
Whenever userspace modifies thermal zone passive delay or polling
delay from sysfs, of_thermal can reset this value to devicetree
defaults while re-enabling thermal zone. Add support to update
passive delay and polling delay to the of_thermal framework so that
userspace can modify and retain the delay across multiple disable
and enable actions.

Change-Id: I68c2bcd2eebeeffa48b3f8ecfb2882c77ff9d6ee
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-06-06 11:02:19 -07:00
Manaf Meethalavalappu Pallikunhi
a915ed479e drivers: thermal: Add post suspend evaluate flag to thermal zone devicetree
Thermal core framework subscribes for suspend/resume notification.
On resume notification it re-evaluates each thermal zone for
temperature and cooling state update. Most of the qcom targets,
large number of thermal zones are enabled for different mitigations.
Re-evaluating each thermal zone during resume leads to multiple issues
including delay in back to back suspend resume scenario, power penalty
for frequent wake up due to re-setting trip threshold especially
during cold temperature usecases. But almost all qcom target TSENS and
ADC sensor interrupts are wakeup capable. More over all internal
cooling devices are platform cooling devices and no impact for cooling
states during suspend. With such sensor and cooling device support,
thermal core resume re-evaluation for each thermal zone is redundant
and it can be ignored to avoid issues mentioned above.

Add wake-capable-sensor property to thermal zone devicetree node to
denote that these sensors are wakeup capable. If a thermal zone has
this property defined, thermal framework ignores resume re-evaluation
and can service the threshold notification during the suspend/resume
path.

Change-Id: I07edf80ad29009378af4c70e750d01bde6f30806
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2019-04-18 04:34:14 -07:00
Siddartha Mohanadoss
3f67fe6c0a thermal: tsens: Add TSENS driver snapshot
Temperature sensor (TSENS) driver is used by thermal
client to set temperature thresholds and send notification
once set thresholds are crossed. Clients can read from
supported TSENS sensors from the TSENS controller.
There can be multiple instances of the TSENS controllers
to support multiple sensors across the system.

This snapshot is taken as of msm-4.14
'commit <405fe31> ("Merge "ARM: dts: msm: Enable
remotefs for trinket"")'.

Change-Id: I0217c55d8462812bfa545fdadf545897da66bebb
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2018-12-21 16:43:14 -08:00
Ram Chandrasekar
c379a963e6 drivers: thermal: Evaluate based on trip temperature
With virtual sensors, temperature reads by different zones at different
time can be different and hence can result in different set of
thresholds. This can lead to a case where we can get interrupt for the
same temperature back to back if the temperature is fluctuating.

To avoid this, allow sensor drivers to read the temperature and provide
that information along when notifying for trip notification. Thermal
framework will now make sure all the thermal zones will use the same
temperature in all thermal zones to evaluate.

Change-Id: I10861be54f0948081a83a1e839d8f9401929c61b
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2018-12-19 21:40:55 +05:30
Ram Chandrasekar
8a12149c26 drivers: thermal: snapshot of thermal core from msm-4.14
Add a snapshot of thermal core framework changes from msm-4.14.
This is snapshot as of 'commit <0a56f56a528f> ("drivers: thermal:
virtual-sensor: Add new virtual sensors for SDMMAGPIE")'.

Change-Id: Ib0c7a15fadc095fe97c1d7efb4ea7527384c2782
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2018-12-19 13:03:25 +05:30
Lina Iyer
7e3c03817f drivers: thermal: Update license to SPDX format
Update licences format for core thermal files.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2018-05-30 14:46:17 +08:00
Viresh Kumar
8ea229511e thermal: Add cooling device's statistics in sysfs
This extends the sysfs interface for thermal cooling devices and exposes
some pretty useful statistics. These statistics have proven to be quite
useful specially while doing benchmarks related to the task scheduler,
where we want to make sure that nothing has disrupted the test,
specially the cooling device which may have put constraints on the CPUs.
The information exposed here tells us to what extent the CPUs were
constrained by the thermal framework.

The write-only "reset" file is used to reset the statistics.

The read-only "time_in_state_ms" file shows the time (in msec) spent by the
device in the respective cooling states, and it prints one line per
cooling state.

The read-only "total_trans" file shows single positive integer value
showing the total number of cooling state transitions the device has
gone through since the time the cooling device is registered or the time
when statistics were reset last.

The read-only "trans_table" file shows a two dimensional matrix, where
an entry <i,j> (row i, column j) represents the number of transitions
from State_i to State_j.

This is how the directory structure looks like for a single cooling
device:

$ ls -R /sys/class/thermal/cooling_device0/
/sys/class/thermal/cooling_device0/:
cur_state  max_state  power  stats  subsystem  type  uevent

/sys/class/thermal/cooling_device0/power:
autosuspend_delay_ms  runtime_active_time  runtime_suspended_time
control               runtime_status

/sys/class/thermal/cooling_device0/stats:
reset  time_in_state_ms  total_trans  trans_table

This is tested on ARM 64-bit Hisilicon hikey620 board running Ubuntu and
ARM 64-bit Hisilicon hikey960 board running Android.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2018-04-02 21:49:01 +08:00
Arvind Yadav
023b7b07cc thermal : Remove const to make same prototype
Here, prototype of thermal_zone_device_register is not matching
with static inline thermal_zone_device_register. One is using
const thermal_zone_params. Other is using non-const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2017-10-17 15:52:57 +08:00
Brian Bian
38e44da591 thermal: int3400_thermal: process "thermal table changed" event
Some BIOS implement ACPI notification code 0x83 to indicate active
relationship table(ART) and/or thermal relationship table(TRT) changes
to INT3400 device. This event needs to be propagated to user space so
that it can be handled by the user space thermal daemon.

Signed-off-by: Brian Bian <brian.bian@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2017-08-11 10:51:22 +08:00
Matthew Wilcox
b31ef8285b thermal core: convert ID allocation to IDA
The thermal core does not use the ability to look up pointers by ID, so
convert it from using an IDR to the more space-efficient IDA.

Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2017-01-04 12:47:28 +08:00
Eduardo Valentin
4d0fe7490d thermal: core: move trips attributes to tz->device.groups
Finally, move the last thermal zone sysfs attributes to
tz->device.groups: trips attributes. This requires adding a
attribute_group to thermal_zone_device, creating it dynamically, and
then setting all trips attributes in it. The trips attribute is then
added to the tz->device.groups.

As the removal of all attributes are handled by device core, the device
remove calls are not needed anymore.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-11-23 10:06:12 +08:00
Srinivas Pandruvada
0e70f466fb thermal: Enhance thermal_zone_device_update for events
Added one additional parameter to thermal_zone_device_update() to provide
caller with an optional capability to specify reason.
Currently this event is used by user space governor to trigger different
processing based on event code. Also it saves an additional call to read
temperature when the event is received.
The following events are cuurently defined:
- Unspecified event
- New temperature sample
- Trip point violated
- Trip point changed
- thermal device up and down
- thermal device power capability changed

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-09-27 14:35:21 +08:00
Sascha Hauer
e78eaf4599 thermal: streamline get_trend callbacks
The .get_trend callback in struct thermal_zone_device_ops has
the prototype:
        int (*get_trend) (struct thermal_zone_device *, int,
                          enum thermal_trend *);
whereas the .get_trend callback in struct thermal_zone_of_device_ops
has:
        int (*get_trend)(void *, long *);

Streamline both prototypes and add the trip argument to the OF callback
aswell and use enum thermal_trend * instead of an integer pointer.

While the OF prototype may be the better one, this should be decided at
framework level and not on OF level.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: linux-pm@vger.kernel.org
Reviewed-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-09-27 14:02:16 +08:00
Sascha Hauer
826386e731 thermal: of: implement .set_trips for device tree thermal zones
This patch implements .set_trips for device tree thermal zones.
As the hardware-tracked trip points is supported by thermal core patch[0].

patch[0]
"thermal: Add support for hardware-tracked trip points".

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Reviewed-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-09-27 14:02:16 +08:00
Sascha Hauer
060c034a97 thermal: Add support for hardware-tracked trip points
This adds support for hardware-tracked trip points to the device tree
thermal sensor framework.

The framework supports an arbitrary number of trip points. Whenever
the current temperature is updated, the trip points immediately
below and above the current temperature are found. A .set_trips
callback is then called with the temperatures. If there is no trip
point above or below the current temperature, the passed trip
temperature will be -INT_MAX or INT_MAX respectively. In this callback,
the driver should program the hardware such that it is notified
when either of these trip points are triggered. When a trip point
is triggered, the driver should call `thermal_zone_device_update'
for the respective thermal zone. This will cause the trip points
to be updated again.

If .set_trips is not implemented, the framework behaves as before.

This patch is based on an earlier version from Mikko Perttunen
<mikko.perttunen@kapsi.fi>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: linux-pm@vger.kernel.org
Reviewed-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-09-27 14:02:16 +08:00
Rajendra Nayak
4a7069a32c thermal: core: export apis to get slope and offset
Add apis for platform thermal drivers to query for slope and offset
attributes, which might be needed for temperature calculations.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-09-27 14:02:16 +08:00
Caesar Wang
5a5e78cd70 thermal: add the note for set_trip_temp
Fixes commit 60f9ce3ada53
("thermal: of-thermal: allow setting trip_temp on hardware")

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-06-01 22:25:48 +08:00
Wei Ni
c35095215a thermal: of-thermal: allow setting trip_temp on hardware
In current of-thermal, the .set_trip_temp only support to
set trip_temp for SW. But some sensors support to set
trip_temp on hardware, so that can trigger interrupt,
shutdown or any other events.
This patch adds .set_trip_temp() callback in
thermal_zone_of_device_ops{}, so that the sensor device can
use it to set trip_temp on hardware.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2016-05-17 07:28:28 -07:00
Wei Ni
1d0fd42fa3 thermal: consistently use int for trip temp
The commit 17e8351a77 consistently use int for temperature,
however it missed a few in trip temperature and thermal_core.

In current codes, the trip->temperature used "unsigned long"
and zone->temperature used"int", if the temperature is negative
value, it will get wrong result when compare temperature with
trip temperature.

This patch can fix it.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2016-04-20 20:31:14 -07:00
Zhang Rui
81ad4276b5 Thermal: Ignore invalid trip points
In some cases, platform thermal driver may report invalid trip points,
thermal core should not take any action for these trip points.

This fixed a regression that bogus trip point starts to screw up thermal
control on some Lenovo laptops, after
commit bb431ba26c
Author: Zhang Rui <rui.zhang@intel.com>
Date:   Fri Oct 30 16:31:47 2015 +0800

    Thermal: initialize thermal zone device correctly

    After thermal zone device registered, as we have not read any
    temperature before, thus tz->temperature should not be 0,
    which actually means 0C, and thermal trend is not available.
    In this case, we need specially handling for the first
    thermal_zone_device_update().

    Both thermal core framework and step_wise governor is
    enhanced to handle this. And since the step_wise governor
    is the only one that uses trends, so it's the only thermal
    governor that needs to be updated.

    Tested-by: Manuel Krause <manuelkrause@netscape.net>
    Tested-by: szegad <szegadlo@poczta.onet.pl>
    Tested-by: prash <prash.n.rao@gmail.com>
    Tested-by: amish <ammdispose-arch@yahoo.com>
    Tested-by: Matthias <morpheusxyz123@yahoo.de>
    Reviewed-by: Javi Merino <javi.merino@arm.com>
    Signed-off-by: Zhang Rui <rui.zhang@intel.com>
    Signed-off-by: Chen Yu <yu.c.chen@intel.com>

CC: <stable@vger.kernel.org> #3.18+
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1317190
Link: https://bugzilla.kernel.org/show_bug.cgi?id=114551
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-03-18 14:10:57 +08:00
Laxman Dewangan
e498b4984d thermal: of-thermal: Add devm version of thermal_zone_of_sensor_register
Add resource managed version of thermal_zone_of_sensor_register() and
thermal_zone_of_sensor_unregister().

This helps in reducing the code size in error path, remove of
driver remove callbacks and making proper sequence for deallocations.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2016-03-09 10:31:20 -08:00
Chen Yu
4511f7166a Thermal: do thermal zone update after a cooling device registered
When a new cooling device is registered, we need to update the
thermal zone to set the new registered cooling device to a proper
state.

This fixes a problem that the system is cool, while the fan devices
are left running on full speed after boot, if fan device is registered
after thermal zone device.

Here is the history of why current patch looks like this:
https://patchwork.kernel.org/patch/7273041/

CC: <stable@vger.kernel.org> #3.18+
Reference:https://bugzilla.kernel.org/show_bug.cgi?id=92431
Tested-by: Manuel Krause <manuelkrause@netscape.net>
Tested-by: szegad <szegadlo@poczta.onet.pl>
Tested-by: prash <prash.n.rao@gmail.com>
Tested-by: amish <ammdispose-arch@yahoo.com>
Reviewed-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
2015-12-29 16:00:00 +08:00
Zhang Rui
bb431ba26c Thermal: initialize thermal zone device correctly
After thermal zone device registered, as we have not read any
temperature before, thus tz->temperature should not be 0,
which actually means 0C, and thermal trend is not available.
In this case, we need specially handling for the first
thermal_zone_device_update().

Both thermal core framework and step_wise governor is
enhanced to handle this. And since the step_wise governor
is the only one that uses trends, so it's the only thermal
governor that needs to be updated.

CC: <stable@vger.kernel.org> #3.18+
Tested-by: Manuel Krause <manuelkrause@netscape.net>
Tested-by: szegad <szegadlo@poczta.onet.pl>
Tested-by: prash <prash.n.rao@gmail.com>
Tested-by: amish <ammdispose-arch@yahoo.com>
Tested-by: Matthias <morpheusxyz123@yahoo.de>
Reviewed-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
2015-12-29 15:59:44 +08:00
Arnd Bergmann
c86b3de8c8 thermal: fix thermal_zone_bind_cooling_device prototype
When the prototype for thermal_zone_bind_cooling_device
changed, the static inline wrapper function was left alone,
which in theory can cause build warnings:

I have seen this error in the past:
drivers/thermal/db8500_thermal.c: In function 'db8500_cdev_bind':
drivers/thermal/db8500_thermal.c:78:9: error: too many arguments to function 'thermal_zone_bind_cooling_device'
   ret = thermal_zone_bind_cooling_device(thermal, i, cdev,

while this one no longer shows up, there is no doubt that
the prototype is still wrong, so let's just fix it anyway.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 6cd9e9f629 ("thermal: of: fix cooling device weights in device tree")
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2015-11-23 15:34:34 -08:00
Rasmus Villemoes
e866a2e395 linux/thermal.h: rename KELVIN_TO_CELSIUS to DECI_KELVIN_TO_CELSIUS
The macros KELVIN_TO_CELSIUS and CELSIUS_TO_KELVIN actually convert
between deciKelvins and Celsius, so rename them to reflect that. While
at it, use a statement expression in DECI_KELVIN_TO_CELSIUS to prevent
expanding the argument multiple times and get rid of a few casts.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2015-10-10 11:32:30 +08:00
Javi Merino
c973c3bcec thermal: Add a function to get the minimum power
The thermal core already has a function to get the maximum power of a
cooling device: power_actor_get_max_power().  Add a function to get the
minimum power of a cooling device.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2015-09-14 07:39:46 -07:00
Punit Agrawal
cd33dc9ac2 thermal: Fix thermal_zone_of_sensor_register to match documentation
thermal_zone_of_sensor_register is documented as returning a pointer
to either a valid thermal_zone_device on success, or a corresponding
ERR_PTR() value.

In contrast, the function returns NULL when THERMAL_OF is configured
off. Fix this.

Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2015-09-13 19:33:07 -07:00
Sascha Hauer
17e8351a77 thermal: consistently use int for temperatures
The thermal code uses int, long and unsigned long for temperatures
in different places.

Using an unsigned type limits the thermal framework to positive
temperatures without need. Also several drivers currently will report
temperatures near UINT_MAX for temperatures below 0°C. This will probably
immediately shut the machine down due to overtemperature if started below
0°C.

'long' is 64bit on several architectures. This is not needed since INT_MAX °mC
is above the melting point of all known materials.

Consistently use a plain 'int' for temperatures throughout the thermal code and
the drivers. This only changes the places in the drivers where the temperature
is passed around as pointer, when drivers internally use another type this is
not changed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Peter Feuerer <peter@piie.net>
Cc: Punit Agrawal <punit.agrawal@arm.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.de>
Cc: Peter Feuerer <peter@piie.net>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-acpi@vger.kernel.org
Cc: platform-driver-x86@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: lm-sensors@lm-sensors.org
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2015-08-03 23:15:50 +08:00
Eduardo Valentin
9d0be7f481 thermal: support slope and offset coefficients
It is common to have a linear extrapolation from
the current sensor readings and the actual temperature
value. This is specially the case when the sensor
is in use to extrapolate hotspots.

This patch adds slope and offset constants for
single sensor linear extrapolation equation. Because
the same sensor can be use in different locations,
from board to board, these constants are added
as part of thermal_zone_params.

The constants are available through sysfs.

It is up to the device driver to determine
the usage of these values.

Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2015-05-11 19:46:52 -07:00
Javi Merino
6b775e870c thermal: introduce the Power Allocator governor
The power allocator governor is a thermal governor that controls system
and device power allocation to control temperature.  Conceptually, the
implementation divides the sustainable power of a thermal zone among
all the heat sources in that zone.

This governor relies on "power actors", entities that represent heat
sources.  They can report current and maximum power consumption and
can set a given maximum power consumption, usually via a cooling
device.

The governor uses a Proportional Integral Derivative (PID) controller
driven by the temperature of the thermal zone.  The output of the
controller is a power budget that is then allocated to each power
actor that can have bearing on the temperature we are trying to
control.  It decides how much power to give each cooling device based
on the performance they are requesting.  The PID controller ensures
that the total power budget does not exceed the control temperature.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2015-05-04 21:27:52 -07:00
Javi Merino
35b11d2e3a thermal: extend the cooling device API to include power information
Add three optional callbacks to the cooling device interface to allow
them to express power.  In addition to the callbacks, add helpers to
identify cooling devices that implement the power cooling device API.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2015-05-04 21:27:52 -07:00
Javi Merino
e33df1d2f3 thermal: let governors have private data for each thermal zone
A governor may need to store its current state between calls to
throttle().  That state depends on the thermal zone, so store it as
private data in struct thermal_zone_device.

The governors may have two new ops: bind_to_tz() and unbind_from_tz().
When provided, these functions let governors do some initialization
and teardown when they are bound/unbound to a tz and possibly store that
information in the governor_data field of the struct
thermal_zone_device.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2015-05-04 21:27:52 -07:00
Javi Merino
bcdcbbc711 thermal: fair_share: generalize the weight concept
The fair share governor has the concept of weights, which is the
influence of each cooling device in a thermal zone.  The current
implementation forces the weights of all cooling devices in a thermal
zone to add up to a 100.  This complicates setups, as you need to know
in advance how many cooling devices you are going to have.  If you bind a
new cooling device, you have to modify all the other cooling devices
weights, which is error prone.  Furthermore, you can't specify a
"default" weight for platforms since that default value depends on the
number of cooling devices in the platform.

This patch generalizes the concept of weight by allowing any number to
be a "weight".  Weights are now relative to each other.  Platforms that
don't specify weights get the same default value for all their cooling
devices, so all their cdevs are considered to be equally influential.

It's important to note that previous users of the weights don't need to
alter the code: percentages continue to work as they used to.  This
patch just removes the constraint of all the weights in a thermal zone
having to add up to a 100.  If they do, you get the same behavior as
before.  If they don't, fair share now works for that platform.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Durgadoss R <durgadoss.r@intel.com>
Acked-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2015-05-04 21:27:51 -07:00
Kapileshwar Singh
6cd9e9f629 thermal: of: fix cooling device weights in device tree
Currently you can specify the weight of the cooling device in the device
tree but that information is not populated to the
thermal_bind_params where the fair share governor expects it to
be.  The of thermal zone device doesn't have a thermal_bind_params
structure and arguably it's better to pass the weight inside the
thermal_instance as it is specific to the bind of a cooling device to a
thermal zone parameter.

Core thermal code is fixed to populate the weight in the instance from
the thermal_bind_params, so platform code that was passing the weight
inside the thermal_bind_params continue to work seamlessly.

While we are at it, create a default value for the weight parameter for
those thermal zones that currently don't define it and remove the
hardcoded default in of-thermal.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>
Cc: Peter Feuerer <peter@piie.net>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2015-05-04 21:27:50 -07:00
Nishanth Menon
12ca718846 thermal: Introduce dummy functions when thermal is not defined
When CONFIG_THERMAL is not enabled, it is better to introduce
equivalent dummy functions in the exported header than to
introduce #ifdeffery in drivers using the function.

This will prevent issues such as that reported in:
http://www.spinics.net/lists/linux-next/msg31573.html

While at it switch over to IS_ENABLED for thermal macros
to allow for thermal framework to be built as framework
and relevant APIs be usable by relevant drivers as a result.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2015-02-24 14:40:42 -04:00
Zhang Rui
32c9edc4e3 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into thermal-soc 2014-12-21 22:49:12 +08:00