]> Git Repo - J-linux.git/commitdiff
Merge tag 'for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux...
authorLinus Torvalds <[email protected]>
Tue, 11 Jan 2022 19:20:27 +0000 (11:20 -0800)
committerLinus Torvalds <[email protected]>
Tue, 11 Jan 2022 19:20:27 +0000 (11:20 -0800)
Pull power supply and reset updates from Sebastian Reichel:
 "Power-supply core:

   - introduce "No Battery" health status

   - use library interpolation

   - add power_supply_battery_info documentation

   - migrate power_supply_battery_info to be fully heap allocated making
     it more obvious that it needs to be free'd manually

  Drivers:

   - max77976-charger: new driver

   - qcom-smbb: add pm8226 charger support

   - bq25890-charger: support battery temperature readings

   - ab8500: continue migrating towards using standard core APIs"

* tag 'for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (28 commits)
  power: supply_core: Pass pointer to battery info
  power: supply: ab8500: Fix the error handling path of ab8500_charger_probe()
  power: reset: mt6397: Check for null res pointer
  power: bq25890: add POWER_SUPPLY_PROP_TEMP
  power: supply: qcom_smbb: support pm8226
  dt-bindings: power: supply: pm8941-charger: add pm8226
  power: supply: ab8500: Standardize capacity lookup
  power: supply: ab8500: Standardize temp res lookup
  power: supply: ab8500: Standardize CV voltage
  power: supply: ab8500: Standardize CC current
  power: supply: ab8500: Make recharge capacity a constant
  power: supply: ab8500: Standardize termination current
  power: supply: ab8500: Standardize internal resistance
  power: supply: ab8500_fg: Init battery data in bind()
  power: supply: ab8500: Standardize voltages
  power: supply: ab8500: Standardize technology
  power: supply: ab8500: Standardize design capacity
  power: supply: ab8500: Use only one battery type
  power: supply: ab8500: Drop unused battery types
  power: supply: ab8500: Standardize operating temperature
  ...

1  2 
MAINTAINERS
drivers/power/supply/bq25890_charger.c
drivers/power/supply/power_supply_core.c

diff --combined MAINTAINERS
index 3b53d0ef7ebb9c89597becc3697dcd32d7b0a10b,96f748c09b629861c983738dab3c72fda8f4260c..2e8a3405a03313c39808aca90eed8322a825273b
@@@ -966,7 -966,6 +966,7 @@@ F: drivers/gpu/drm/amd/include/kgd_kfd_
  F:    drivers/gpu/drm/amd/include/v9_structs.h
  F:    drivers/gpu/drm/amd/include/vi_structs.h
  F:    include/uapi/linux/kfd_ioctl.h
 +F:    include/uapi/linux/kfd_sysfs.h
  
  AMD SPI DRIVER
  M:    Sanjay R Mehta <[email protected]>
@@@ -994,13 -993,6 +994,13 @@@ S:       Supporte
  T:    git https://gitlab.freedesktop.org/agd5f/linux.git
  F:    drivers/gpu/drm/amd/pm/
  
 +AMD PSTATE DRIVER
 +M:    Huang Rui <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    Documentation/admin-guide/pm/amd-pstate.rst
 +F:    drivers/cpufreq/amd-pstate*
 +
  AMD PTDMA DRIVER
  M:    Sanjay R Mehta <[email protected]>
  L:    [email protected]
@@@ -1147,7 -1139,6 +1147,7 @@@ ANALOG DEVICES INC ADV748X DRIVE
  M:    Kieran Bingham <[email protected]>
  L:    [email protected]
  S:    Maintained
 +F:    Documentation/devicetree/bindings/media/i2c/adv748x.yaml
  F:    drivers/media/i2c/adv748x/*
  
  ANALOG DEVICES INC ADV7511 DRIVER
@@@ -1754,21 -1745,17 +1754,21 @@@ B:   https://github.com/AsahiLinux/linux/
  C:    irc://irc.oftc.net/asahi-dev
  T:    git https://github.com/AsahiLinux/linux.git
  F:    Documentation/devicetree/bindings/arm/apple.yaml
 +F:    Documentation/devicetree/bindings/arm/apple/*
  F:    Documentation/devicetree/bindings/i2c/apple,i2c.yaml
  F:    Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
  F:    Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml
  F:    Documentation/devicetree/bindings/pci/apple,pcie.yaml
  F:    Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
 +F:    Documentation/devicetree/bindings/power/apple*
 +F:    Documentation/devicetree/bindings/watchdog/apple,wdt.yaml
  F:    arch/arm64/boot/dts/apple/
  F:    drivers/i2c/busses/i2c-pasemi-core.c
  F:    drivers/i2c/busses/i2c-pasemi-platform.c
  F:    drivers/irqchip/irq-apple-aic.c
  F:    drivers/mailbox/apple-mailbox.c
  F:    drivers/pinctrl/pinctrl-apple-gpio.c
 +F:    drivers/soc/apple/*
  F:    include/dt-bindings/interrupt-controller/apple-aic.h
  F:    include/dt-bindings/pinctrl/apple.h
  F:    include/linux/apple-mailbox.h
  S:    Maintained
  F:    drivers/counter/microchip-tcb-capture.c
  
 +ARM/MILBEAUT ARCHITECTURE
 +M:    Taichi Sugaya <[email protected]>
 +M:    Takao Orito <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Maintained
 +F:    arch/arm/boot/dts/milbeaut*
 +F:    arch/arm/mach-milbeaut/
 +N:    milbeaut
 +
  ARM/MIOA701 MACHINE SUPPORT
  M:    Robert Jarzmik <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -2564,7 -2542,6 +2564,7 @@@ Q:      https://patchwork.kernel.org/project
  F:    Documentation/arm/samsung/
  F:    Documentation/devicetree/bindings/arm/samsung/
  F:    Documentation/devicetree/bindings/power/pd-samsung.yaml
 +F:    Documentation/devicetree/bindings/soc/samsung/
  F:    arch/arm/boot/dts/exynos*
  F:    arch/arm/boot/dts/s3c*
  F:    arch/arm/boot/dts/s5p*
@@@ -2591,7 -2568,7 +2591,7 @@@ N:      s3c64x
  N:    s5pv210
  
  ARM/SAMSUNG S5P SERIES 2D GRAPHICS ACCELERATION (G2D) SUPPORT
 -M:    Andrzej Hajda <a.hajda@samsung.com>
 +M:    Łukasz Stelmach <l.stelmach@samsung.com>
  L:    [email protected] (moderated for non-subscribers)
  L:    [email protected]
  S:    Maintained
@@@ -2615,8 -2592,7 +2615,8 @@@ S:      Maintaine
  F:    drivers/media/platform/s5p-jpeg/
  
  ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT
 -M:    Andrzej Hajda <[email protected]>
 +M:    Marek Szyprowski <[email protected]>
 +M:    Andrzej Hajda <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  L:    [email protected]
  S:    Maintained
@@@ -2753,11 -2729,10 +2753,11 @@@ S:   Maintaine
  F:    drivers/memory/*emif*
  
  ARM/TEXAS INSTRUMENT KEYSTONE ARCHITECTURE
 +M:    Nishanth Menon <[email protected]>
  M:    Santosh Shilimkar <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
  F:    arch/arm/boot/dts/keystone-*
  F:    arch/arm/mach-keystone/
  
@@@ -3013,20 -2988,6 +3013,20 @@@ W:    http://acpi4asus.sf.ne
  F:    drivers/platform/x86/asus*.c
  F:    drivers/platform/x86/eeepc*.c
  
 +ASUS WMI HARDWARE MONITOR DRIVER
 +M:    Ed Brindley <[email protected]>
 +M:    Denis Pauk <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/hwmon/asus_wmi_sensors.c
 +
 +ASUS WMI EC HARDWARE MONITOR DRIVER
 +M:    Eugene Shalygin <[email protected]>
 +M:    Denis Pauk <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/hwmon/asus_wmi_ec_sensors.c
 +
  ASUS WIRELESS RADIO CONTROL DRIVER
  M:    João Paulo Rechi Vita <[email protected]>
  L:    [email protected]
@@@ -3095,7 -3056,7 +3095,7 @@@ F:      Documentation/devicetree/bindings/ph
  F:    drivers/phy/qualcomm/phy-ath79-usb.c
  
  ATHEROS ATH GENERIC UTILITIES
 -M:    Kalle Valo <kvalo@codeaurora.org>
 +M:    Kalle Valo <kvalo@kernel.org>
  L:    [email protected]
  S:    Supported
  F:    drivers/net/wireless/ath/*
@@@ -3110,7 -3071,7 +3110,7 @@@ W:      https://wireless.wiki.kernel.org/en/
  F:    drivers/net/wireless/ath/ath5k/
  
  ATHEROS ATH6KL WIRELESS DRIVER
 -M:    Kalle Valo <kvalo@codeaurora.org>
 +M:    Kalle Valo <kvalo@kernel.org>
  L:    [email protected]
  S:    Supported
  W:    https://wireless.wiki.kernel.org/en/users/Drivers/ath6kl
@@@ -3598,7 -3559,7 +3598,7 @@@ R:      Florent Revest <[email protected]
  R:    Brendan Jackman <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/bpf/bpf_lsm.rst
 +F:    Documentation/bpf/prog_lsm.rst
  F:    include/linux/bpf_lsm.h
  F:    kernel/bpf/bpf_lsm.c
  F:    security/bpf/
  S:    Supported
  F:    drivers/net/ethernet/broadcom/b44.*
  
 -BROADCOM B53 ETHERNET SWITCH DRIVER
 +BROADCOM B53/SF2 ETHERNET SWITCH DRIVER
  M:    Florian Fainelli <[email protected]>
  L:    [email protected]
  L:    [email protected] (subscribers-only)
  S:    Supported
  F:    Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
  F:    drivers/net/dsa/b53/*
 +F:    drivers/net/dsa/bcm_sf2*
  F:    include/linux/dsa/brcm.h
  F:    include/linux/platform_data/b53.h
  
@@@ -3665,7 -3625,6 +3665,7 @@@ F:      drivers/net/ethernet/broadcom/bcm490
  F:    drivers/net/ethernet/broadcom/unimac.h
  
  BROADCOM BCM5301X ARM ARCHITECTURE
 +M:    Florian Fainelli <[email protected]>
  M:    Hauke Mehrtens <[email protected]>
  M:    Rafał Miłecki <[email protected]>
  M:    [email protected]
@@@ -3677,7 -3636,6 +3677,7 @@@ F:      arch/arm/boot/dts/bcm953012
  F:    arch/arm/mach-bcm/bcm_5301x.c
  
  BROADCOM BCM53573 ARM ARCHITECTURE
 +M:    Florian Fainelli <[email protected]>
  M:    Rafał Miłecki <[email protected]>
  L:    [email protected]
  L:    [email protected] (moderated for non-subscribers)
@@@ -3775,7 -3733,7 +3775,7 @@@ F:      drivers/scsi/bnx2i
  BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
  M:    Ariel Elior <[email protected]>
  M:    Sudarsana Kalluru <[email protected]>
 -M:    [email protected]
 +M:    Manish Chopra <[email protected]>
  L:    [email protected]
  S:    Supported
  F:    drivers/net/ethernet/broadcom/bnx2x/
@@@ -3800,8 -3758,7 +3800,8 @@@ S:      Supporte
  F:    drivers/net/wireless/broadcom/brcm80211/
  
  BROADCOM BRCMSTB GPIO DRIVER
 -M:    Gregory Fong <[email protected]>
 +M:    Doug Berger <[email protected]>
 +M:    Florian Fainelli <[email protected]>
  L:    [email protected]
  S:    Supported
  F:    Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt
@@@ -5454,12 -5411,6 +5454,12 @@@ W:    https://linuxtv.or
  T:    git git://linuxtv.org/media_tree.git
  F:    drivers/media/platform/sti/delta
  
 +DELTA AHE-50DC FAN CONTROL MODULE DRIVER
 +M:    Zev Weiss <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/hwmon/pmbus/delta-ahe50dc-fan.c
 +
  DELTA DPS920AB PSU DRIVER
  M:    Robert Marko <[email protected]>
  L:    [email protected]
@@@ -6087,7 -6038,6 +6087,7 @@@ F:      drivers/gpu/drm/tiny/mi0283qt.
  DRM DRIVER FOR MSM ADRENO GPU
  M:    Rob Clark <[email protected]>
  M:    Sean Paul <[email protected]>
 +R:    Abhinav Kumar <[email protected]>
  L:    [email protected]
  L:    [email protected]
  L:    [email protected]
@@@ -6113,17 -6063,10 +6113,17 @@@ F:   drivers/gpu/drm/panel/panel-novatek-
  
  DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS
  M:    Ben Skeggs <[email protected]>
 +M:    Karol Herbst <[email protected]>
 +M:    Lyude Paul <[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Supported
 -T:    git git://github.com/skeggsb/linux
 +W:    https://nouveau.freedesktop.org/
 +Q:    https://patchwork.freedesktop.org/project/nouveau/
 +Q:    https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests
 +B:    https://gitlab.freedesktop.org/drm/nouveau/-/issues
 +C:    irc://irc.oftc.net/nouveau
 +T:    git https://gitlab.freedesktop.org/drm/nouveau.git
  F:    drivers/gpu/drm/nouveau/
  F:    include/uapi/drm/nouveau_drm.h
  
@@@ -6356,7 -6299,7 +6356,7 @@@ F:      Documentation/devicetree/bindings/di
  F:    drivers/gpu/drm/atmel-hlcdc/
  
  DRM DRIVERS FOR BRIDGE CHIPS
 -M:    Andrzej Hajda <a.hajda@samsung.com>
 +M:    Andrzej Hajda <andrzej.hajda@intel.com>
  M:    Neil Armstrong <[email protected]>
  M:    Robert Foss <[email protected]>
  R:    Laurent Pinchart <[email protected]>
@@@ -6463,7 -6406,6 +6463,7 @@@ L:      [email protected]
  L:    [email protected]
  S:    Supported
  T:    git git://linuxtv.org/pinchartl/media drm/du/next
 +F:    Documentation/devicetree/bindings/display/bridge/renesas,dsi-csi2-tx.yaml
  F:    Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.yaml
  F:    Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
  F:    Documentation/devicetree/bindings/display/renesas,du.yaml
@@@ -6582,14 -6524,6 +6582,14 @@@ F:    drivers/gpu/drm/drm_panel.
  F:    drivers/gpu/drm/panel/
  F:    include/drm/drm_panel.h
  
 +DRM PRIVACY-SCREEN CLASS
 +M:    Hans de Goede <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +F:    drivers/gpu/drm/drm_privacy_screen*
 +F:    include/drm/drm_privacy_screen*
 +
  DRM TTM SUBSYSTEM
  M:    Christian Koenig <[email protected]>
  M:    Huang Rui <[email protected]>
@@@ -7577,7 -7511,6 +7577,7 @@@ F:      include/video
  FREESCALE CAAM (Cryptographic Acceleration and Assurance Module) DRIVER
  M:    Horia Geantă <[email protected]>
  M:    Pankaj Gupta <[email protected]>
 +M:    Gaurav Jain <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/crypto/fsl-sec4.txt
@@@ -8542,12 -8475,6 +8542,12 @@@ F:    drivers/hid
  F:    include/linux/hid*
  F:    include/uapi/linux/hid*
  
 +HID LOGITECH DRIVERS
 +R:    Filipe Laíns <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/hid/hid-logitech-*
 +
  HID PLAYSTATION DRIVER
  M:    Roderick Colenbrander <[email protected]>
  L:    [email protected]
@@@ -8669,10 -8596,8 +8669,10 @@@ F:    drivers/misc/hisi_hikey_usb.
  
  HISILICON PMU DRIVER
  M:    Shaokun Zhang <[email protected]>
 +M:    Qi Liu <[email protected]>
  S:    Supported
  W:    http://www.hisilicon.com
 +F:    Documentation/admin-guide/perf/hisi-pcie-pmu.rst
  F:    Documentation/admin-guide/perf/hisi-pmu.rst
  F:    drivers/perf/hisilicon
  
@@@ -8703,7 -8628,6 +8703,7 @@@ F:      drivers/scsi/hisi_sas
  
  HISILICON SECURITY ENGINE V2 DRIVER (SEC2)
  M:    Zaibo Xu <[email protected]>
 +M:    Kai Ye <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/ABI/testing/debugfs-hisi-sec
@@@ -9394,6 -9318,7 +9394,6 @@@ S:      Maintaine
  F:    drivers/iio/pressure/dps310.c
  
  INFINIBAND SUBSYSTEM
 -M:    Doug Ledford <[email protected]>
  M:    Jason Gunthorpe <[email protected]>
  L:    [email protected]
  S:    Supported
@@@ -9554,7 -9479,6 +9554,7 @@@ INTEL DRM DRIVERS (excluding Poulsbo, M
  M:    Jani Nikula <[email protected]>
  M:    Joonas Lahtinen <[email protected]>
  M:    Rodrigo Vivi <[email protected]>
 +M:    Tvrtko Ursulin <[email protected]>
  L:    [email protected]
  S:    Supported
  W:    https://01.org/linuxgraphics/
@@@ -9749,6 -9673,7 +9749,6 @@@ F:      Documentation/devicetree/bindings/cr
  F:    drivers/crypto/keembay/Kconfig
  F:    drivers/crypto/keembay/Makefile
  F:    drivers/crypto/keembay/keembay-ocs-ecc.c
 -F:    drivers/crypto/keembay/ocs-ecc-curve-defs.h
  
  INTEL KEEM BAY OCS HCU CRYPTO DRIVER
  M:    Daniele Alessandrelli <[email protected]>
@@@ -10344,9 -10269,9 +10344,9 @@@ F:   lib/Kconfig.kcsa
  F:    scripts/Makefile.kcsan
  
  KDUMP
 -M:    Dave Young <[email protected]>
  M:    Baoquan He <[email protected]>
  R:    Vivek Goyal <[email protected]>
 +R:    Dave Young <[email protected]>
  L:    [email protected]
  S:    Maintained
  W:    http://lse.sourceforge.net/kdump/
@@@ -10520,7 -10445,7 +10520,7 @@@ F:   arch/riscv/include/uapi/asm/kvm
  F:    arch/riscv/kvm/
  
  KERNEL VIRTUAL MACHINE for s390 (KVM/s390)
 -M:    Christian Borntraeger <borntraeger@de.ibm.com>
 +M:    Christian Borntraeger <borntraeger@linux.ibm.com>
  M:    Janosch Frank <[email protected]>
  R:    David Hildenbrand <[email protected]>
  R:    Claudio Imbrenda <[email protected]>
@@@ -10810,13 -10735,6 +10810,13 @@@ S: Maintaine
  W:    http://legousb.sourceforge.net/
  F:    drivers/usb/misc/legousbtower.c
  
 +LETSKETCH HID TABLET DRIVER
 +M:    Hans de Goede <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git
 +F:    drivers/hid/hid-letsketch.c
 +
  LG LAPTOP EXTRAS
  M:    Matan Ziv-Av <[email protected]>
  L:    [email protected]
@@@ -11605,12 -11523,6 +11605,12 @@@ S: Maintaine
  F:    Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
  F:    drivers/media/i2c/max9286.c
  
 +MAX96712 QUAD GMSL2 DESERIALIZER DRIVER
 +M:    Niklas Söderlund <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/staging/media/max96712/max96712.c
 +
  MAX9860 MONO AUDIO VOICE CODEC DRIVER
  M:    Peter Rosin <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -11668,6 -11580,12 +11668,12 @@@ F: Documentation/devicetree/bindings/*/
  F:    drivers/regulator/max77802-regulator.c
  F:    include/dt-bindings/*/*max77802.h
  
+ MAXIM MAX77976 BATTERY CHARGER
+ M:    Luca Ceresoli <[email protected]>
+ S:    Supported
+ F:    Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml
+ F:    drivers/power/supply/max77976_charger.c
  MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS
  M:    Krzysztof Kozlowski <[email protected]>
  M:    Bartlomiej Zolnierkiewicz <[email protected]>
@@@ -12257,8 -12175,8 +12263,8 @@@ F:   drivers/net/ethernet/mellanox/mlx5/c
  F:    include/linux/mlx5/mlx5_ifc_fpga.h
  
  MELLANOX ETHERNET SWITCH DRIVERS
 -M:    Jiri Pirko <[email protected]>
  M:    Ido Schimmel <[email protected]>
 +M:    Petr Machata <[email protected]>
  L:    [email protected]
  S:    Supported
  W:    http://www.mellanox.com
  S:    Maintained
  F:    drivers/net/ethernet/microchip/lan743x_*
  
 +MICROCHIP LAN966X ETHERNET DRIVER
 +M:    Horatiu Vultur <[email protected]>
 +M:    [email protected]
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/net/ethernet/microchip/lan966x/*
 +
  MICROCHIP LCDFB DRIVER
  M:    Nicolas Ferre <[email protected]>
  L:    [email protected]
@@@ -13333,7 -13244,7 +13339,7 @@@ F:   include/uapi/linux/if_
  F:    include/uapi/linux/netdevice.h
  
  NETWORKING DRIVERS (WIRELESS)
 -M:    Kalle Valo <kvalo@codeaurora.org>
 +M:    Kalle Valo <kvalo@kernel.org>
  L:    [email protected]
  S:    Maintained
  Q:    http://patchwork.kernel.org/project/linux-wireless/list/
@@@ -13870,13 -13781,6 +13876,13 @@@ S: Maintaine
  F:    Documentation/hwmon/nzxt-kraken2.rst
  F:    drivers/hwmon/nzxt-kraken2.c
  
 +NZXT-SMART2 HARDWARE MONITORING DRIVER
 +M:    Aleksandr Mezin <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/hwmon/nzxt-smart2.rst
 +F:    drivers/hwmon/nzxt-smart2.c
 +
  OBJAGG
  M:    Jiri Pirko <[email protected]>
  L:    [email protected]
@@@ -14189,6 -14093,7 +14195,6 @@@ F:   drivers/media/i2c/ov5647.
  
  OMNIVISION OV5670 SENSOR DRIVER
  M:    Chiranjeevi Rapolu <[email protected]>
 -M:    Hyungwoo Yang <[email protected]>
  L:    [email protected]
  S:    Maintained
  T:    git git://linuxtv.org/media_tree.git
@@@ -14201,13 -14106,6 +14207,13 @@@ S: Maintaine
  T:    git git://linuxtv.org/media_tree.git
  F:    drivers/media/i2c/ov5675.c
  
 +OMNIVISION OV5693 SENSOR DRIVER
 +M:    Daniel Scally <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +T:    git git://linuxtv.org/media_tree.git
 +F:    drivers/media/i2c/ov5693.c
 +
  OMNIVISION OV5695 SENSOR DRIVER
  M:    Shunqian Zheng <[email protected]>
  L:    [email protected]
@@@ -14943,7 -14841,7 +14949,7 @@@ PCIE DRIVER FOR MEDIATE
  M:    Ryder Lee <[email protected]>
  M:    Jianjun Wang <[email protected]>
  L:    [email protected]
 -L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/mediatek*
  F:    drivers/pci/controller/*mediatek*
@@@ -15437,7 -15335,6 +15443,7 @@@ M:   Sergey Senozhatsky <senozhatsky@chro
  R:    Steven Rostedt <[email protected]>
  R:    John Ogness <[email protected]>
  S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git
  F:    include/linux/printk.h
  F:    kernel/printk/
  
@@@ -15702,7 -15599,7 +15708,7 @@@ F:   drivers/scsi/qedi
  
  QLOGIC QL4xxx ETHERNET DRIVER
  M:    Ariel Elior <[email protected]>
 -M:    [email protected]
 +M:    Manish Chopra <[email protected]>
  L:    [email protected]
  S:    Supported
  F:    drivers/net/ethernet/qlogic/qed/
@@@ -15803,7 -15700,7 +15809,7 @@@ T:   git git://linuxtv.org/anttip/media_t
  F:    drivers/media/tuners/qt1010*
  
  QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
 -M:    Kalle Valo <kvalo@codeaurora.org>
 +M:    Kalle Valo <kvalo@kernel.org>
  L:    [email protected]
  S:    Supported
  W:    https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
@@@ -15811,7 -15708,7 +15817,7 @@@ T:   git git://git.kernel.org/pub/scm/lin
  F:    drivers/net/wireless/ath/ath10k/
  
  QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
 -M:    Kalle Valo <kvalo@codeaurora.org>
 +M:    Kalle Valo <kvalo@kernel.org>
  L:    [email protected]
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
@@@ -15825,14 -15722,6 +15831,14 @@@ W: https://wireless.wiki.kernel.org/en/
  F:    Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
  F:    drivers/net/wireless/ath/ath9k/
  
 +QUALCOMM BAM-DMUX WWAN NETWORK DRIVER
 +M:    Stephan Gerhold <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml
 +F:    drivers/net/wwan/qcom_bam_dmux.c
 +
  QUALCOMM CAMERA SUBSYSTEM DRIVER
  M:    Robert Foss <[email protected]>
  M:    Todor Tomov <[email protected]>
@@@ -15877,15 -15766,6 +15883,15 @@@ S: Maintaine
  F:    Documentation/devicetree/bindings/net/qcom,ethqos.txt
  F:    drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
  
 +QUALCOMM FASTRPC DRIVER
 +M:    Srinivas Kandagatla <[email protected]>
 +M:    Amol Maheshwari <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
 +F:    drivers/misc/fastrpc.c
 +F:    include/uapi/misc/fastrpc.h
 +
  QUALCOMM GENERIC INTERFACE I2C DRIVER
  M:    Akash Asthana <[email protected]>
  M:    Mukesh Savaliya <[email protected]>
@@@ -15992,7 -15872,7 +15998,7 @@@ F:   Documentation/devicetree/bindings/me
  F:    drivers/media/platform/qcom/venus/
  
  QUALCOMM WCN36XX WIRELESS DRIVER
 -M:    Kalle Valo <kvalo@codeaurora.org>
 +M:    Kalle Valo <kvalo@kernel.org>
  L:    [email protected]
  S:    Supported
  W:    https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx
@@@ -16094,8 -15974,6 +16100,8 @@@ F:   arch/mips/generic/board-ranchu.
  
  RANDOM NUMBER DRIVER
  M:    "Theodore Ts'o" <[email protected]>
 +M:    Jason A. Donenfeld <[email protected]>
 +T:    git https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git
  S:    Maintained
  F:    drivers/char/random.c
  
@@@ -16618,12 -16496,6 +16624,12 @@@ T: git git://linuxtv.org/media_tree.gi
  F:    Documentation/devicetree/bindings/media/allwinner,sun8i-a83t-de2-rotate.yaml
  F:    drivers/media/platform/sunxi/sun8i-rotate/
  
 +RPMSG TTY DRIVER
 +M:    Arnaud Pouliquen <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/tty/rpmsg_tty.c
 +
  RTL2830 MEDIA DRIVER
  M:    Antti Palosaari <[email protected]>
  L:    [email protected]
@@@ -16707,7 -16579,7 +16713,7 @@@ F:   drivers/video/fbdev/savage
  S390
  M:    Heiko Carstens <[email protected]>
  M:    Vasily Gorbik <[email protected]>
 -M:    Christian Borntraeger <borntraeger@de.ibm.com>
 +M:    Christian Borntraeger <borntraeger@linux.ibm.com>
  R:    Alexander Gordeev <[email protected]>
  L:    [email protected]
  S:    Supported
@@@ -16745,8 -16617,8 +16751,8 @@@ W:   http://www.ibm.com/developerworks/li
  F:    drivers/iommu/s390-iommu.c
  
  S390 IUCV NETWORK LAYER
 -M:    Julian Wiedmann <jwi@linux.ibm.com>
 -M:    Karsten Graul <kgraul@linux.ibm.com>
 +M:    Alexandra Winter <wintera@linux.ibm.com>
 +M:    Wenjia Zhang <wenjia@linux.ibm.com>
  L:    [email protected]
  L:    [email protected]
  S:    Supported
@@@ -16756,8 -16628,8 +16762,8 @@@ F:   include/net/iucv
  F:    net/iucv/
  
  S390 NETWORK DRIVERS
 -M:    Julian Wiedmann <jwi@linux.ibm.com>
 -M:    Karsten Graul <kgraul@linux.ibm.com>
 +M:    Alexandra Winter <wintera@linux.ibm.com>
 +M:    Wenjia Zhang <wenjia@linux.ibm.com>
  L:    [email protected]
  L:    [email protected]
  S:    Supported
@@@ -16944,15 -16816,13 +16950,15 @@@ F:        Documentation/devicetree/bindings/ne
  F:    drivers/nfc/s3fwrn5
  
  SAMSUNG S5C73M3 CAMERA DRIVER
 -M:    Andrzej Hajda <[email protected]>
 +M:    Sylwester Nawrocki <[email protected]>
 +M:    Andrzej Hajda <[email protected]>
  L:    [email protected]
  S:    Supported
  F:    drivers/media/i2c/s5c73m3/*
  
  SAMSUNG S5K5BAF CAMERA DRIVER
 -M:    Andrzej Hajda <[email protected]>
 +M:    Sylwester Nawrocki <[email protected]>
 +M:    Andrzej Hajda <[email protected]>
  L:    [email protected]
  S:    Supported
  F:    drivers/media/i2c/s5k5baf.c
@@@ -17533,7 -17403,7 +17539,7 @@@ F:   drivers/video/fbdev/sm712
  SILVACO I3C DUAL-ROLE MASTER
  M:    Miquel Raynal <[email protected]>
  M:    Conor Culhane <[email protected]>
 -L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml
  F:    drivers/i3c/master/svc-i3c-master.c
@@@ -17776,17 -17646,12 +17782,17 @@@ F:        drivers/firmware/arm_sdei.
  F:    include/linux/arm_sdei.h
  F:    include/uapi/linux/arm_sdei.h
  
 -SOFTWARE NODES
 +SOFTWARE NODES AND DEVICE PROPERTIES
  R:    Andy Shevchenko <[email protected]>
 +R:    Daniel Scally <[email protected]>
  R:    Heikki Krogerus <[email protected]>
 +R:    Sakari Ailus <[email protected]>
  L:    [email protected]
  S:    Maintained
 +F:    drivers/base/property.c
  F:    drivers/base/swnode.c
 +F:    include/linux/fwnode.h
 +F:    include/linux/property.h
  
  SOFTWARE RAID (Multiple Disks) SUPPORT
  M:    Song Liu <[email protected]>
@@@ -18271,28 -18136,6 +18277,28 @@@ M: Ion Badulescu <[email protected]
  S:    Odd Fixes
  F:    drivers/net/ethernet/adaptec/starfire*
  
 +STARFIVE JH7100 CLOCK DRIVER
 +M:    Emil Renner Berthing <[email protected]>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/clock/starfive,jh7100-clkgen.yaml
 +F:    drivers/clk/starfive/clk-starfive-jh7100.c
 +F:    include/dt-bindings/clock/starfive-jh7100.h
 +
 +STARFIVE JH7100 PINCTRL DRIVER
 +M:    Emil Renner Berthing <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/pinctrl/starfive,jh7100-pinctrl.yaml
 +F:    drivers/pinctrl/pinctrl-starfive.c
 +F:    include/dt-bindings/pinctrl/pinctrl-starfive.h
 +
 +STARFIVE JH7100 RESET CONTROLLER DRIVER
 +M:    Emil Renner Berthing <[email protected]>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/reset/starfive,jh7100-reset.yaml
 +F:    drivers/reset/reset-starfive-jh7100.c
 +F:    include/dt-bindings/reset/starfive-jh7100.h
 +
  STATIC BRANCH/CALL
  M:    Peter Zijlstra <[email protected]>
  M:    Josh Poimboeuf <[email protected]>
@@@ -18454,7 -18297,6 +18460,7 @@@ M:   Vineet Gupta <[email protected]
  L:    [email protected]
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git
 +F:    Documentation/arc/
  F:    Documentation/devicetree/bindings/arc/*
  F:    Documentation/devicetree/bindings/interrupt-controller/snps,arc*
  F:    arch/arc/
@@@ -18647,7 -18489,6 +18653,7 @@@ F:   include/uapi/linux/pkt_sched.
  F:    include/uapi/linux/tc_act/
  F:    include/uapi/linux/tc_ematch/
  F:    net/sched/
 +F:    tools/testing/selftests/tc-testing
  
  TC90522 MEDIA DRIVER
  M:    Akihiro Tsukada <[email protected]>
@@@ -19196,12 -19037,11 +19202,12 @@@ F:        drivers/mmc/host/tifm_sd.
  F:    include/linux/tifm.h
  
  TI KEYSTONE MULTICORE NAVIGATOR DRIVERS
 +M:    Nishanth Menon <[email protected]>
  M:    Santosh Shilimkar <[email protected]>
  L:    [email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
  F:    drivers/soc/ti/*
  
  TI LM49xxx FAMILY ASoC CODEC DRIVERS
@@@ -19472,6 -19312,12 +19478,6 @@@ W:  https://github.com/srcres258/linux-d
  T:    git git://github.com/srcres258/linux-doc.git doc-zh-tw
  F:    Documentation/translations/zh_TW/
  
 -TRIVIAL PATCHES
 -M:    Jiri Kosina <[email protected]>
 -S:    Maintained
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git
 -K:    ^Subject:.*(?i)trivial
 -
  TTY LAYER
  M:    Greg Kroah-Hartman <[email protected]>
  M:    Jiri Slaby <[email protected]>
@@@ -20327,8 -20173,6 +20333,8 @@@ F:   include/uapi/linux/virtio_gpio.
  VIRTIO GPU DRIVER
  M:    David Airlie <[email protected]>
  M:    Gerd Hoffmann <[email protected]>
 +R:    Gurchetan Singh <[email protected]>
 +R:    Chia-I Wu <[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
@@@ -20479,8 -20323,7 +20485,8 @@@ F:   arch/x86/include/asm/vmware.
  F:    arch/x86/kernel/cpu/vmware.c
  
  VMWARE PVRDMA DRIVER
 -M:    Adit Ranadive <[email protected]>
 +M:    Bryan Tan <[email protected]>
 +M:    Vishnu Dasa <[email protected]>
  M:    VMware PV-Drivers <[email protected]>
  L:    [email protected]
  S:    Maintained
@@@ -20562,7 -20405,7 +20568,7 @@@ M:   Sergey Senozhatsky <senozhatsky@chro
  R:    Andy Shevchenko <[email protected]>
  R:    Rasmus Villemoes <[email protected]>
  S:    Maintained
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git
  F:    Documentation/core-api/printk-formats.rst
  F:    lib/test_printf.c
  F:    lib/test_scanf.c
@@@ -21193,7 -21036,7 +21199,7 @@@ S:   Maintaine
  F:    arch/x86/kernel/cpu/zhaoxin.c
  
  ZONEFS FILESYSTEM
 -M:    Damien Le Moal <[email protected]>
 +M:    Damien Le Moal <damien.lemoal@opensource.wdc.com>
  M:    Naohiro Aota <[email protected]>
  R:    Johannes Thumshirn <[email protected]>
  L:    [email protected]
index b7eac5428083801cd4edc67b8140fe4d1e882b78,78da6e7a8b5b1354527456313c629656a4c5ca5a..e62da9dc4f351fdb23758d2ccd503b3e8c40583d
@@@ -266,6 -266,7 +266,7 @@@ enum bq25890_table_ids 
        /* lookup tables */
        TBL_TREG,
        TBL_BOOSTI,
+       TBL_TSPCT,
  };
  
  /* Thermal Regulation Threshold lookup table, in degrees Celsius */
@@@ -280,6 -281,28 +281,28 @@@ static const u32 bq25890_boosti_tbl[] 
  
  #define BQ25890_BOOSTI_TBL_SIZE               ARRAY_SIZE(bq25890_boosti_tbl)
  
+ /* NTC 10K temperature lookup table in tenths of a degree */
+ static const u32 bq25890_tspct_tbl[] = {
+       850, 840, 830, 820, 810, 800, 790, 780,
+       770, 760, 750, 740, 730, 720, 710, 700,
+       690, 685, 680, 675, 670, 660, 650, 645,
+       640, 630, 620, 615, 610, 600, 590, 585,
+       580, 570, 565, 560, 550, 540, 535, 530,
+       520, 515, 510, 500, 495, 490, 480, 475,
+       470, 460, 455, 450, 440, 435, 430, 425,
+       420, 410, 405, 400, 390, 385, 380, 370,
+       365, 360, 355, 350, 340, 335, 330, 320,
+       310, 305, 300, 290, 285, 280, 275, 270,
+       260, 250, 245, 240, 230, 225, 220, 210,
+       205, 200, 190, 180, 175, 170, 160, 150,
+       145, 140, 130, 120, 115, 110, 100, 90,
+       80, 70, 60, 50, 40, 30, 20, 10,
+       0, -10, -20, -30, -40, -60, -70, -80,
+       -90, -10, -120, -140, -150, -170, -190, -210,
+ };
+ #define BQ25890_TSPCT_TBL_SIZE                ARRAY_SIZE(bq25890_tspct_tbl)
  struct bq25890_range {
        u32 min;
        u32 max;
@@@ -308,7 -331,8 +331,8 @@@ static const union 
  
        /* lookup tables */
        [TBL_TREG] =    { .lt = {bq25890_treg_tbl, BQ25890_TREG_TBL_SIZE} },
-       [TBL_BOOSTI] =  { .lt = {bq25890_boosti_tbl, BQ25890_BOOSTI_TBL_SIZE} }
+       [TBL_BOOSTI] =  { .lt = {bq25890_boosti_tbl, BQ25890_BOOSTI_TBL_SIZE} },
+       [TBL_TSPCT] =   { .lt = {bq25890_tspct_tbl, BQ25890_TSPCT_TBL_SIZE} }
  };
  
  static int bq25890_field_read(struct bq25890_device *bq,
@@@ -388,6 -412,7 +412,7 @@@ static bool bq25890_is_adc_property(enu
        switch (psp) {
        case POWER_SUPPLY_PROP_VOLTAGE_NOW:
        case POWER_SUPPLY_PROP_CURRENT_NOW:
+       case POWER_SUPPLY_PROP_TEMP:
                return true;
  
        default:
@@@ -528,6 -553,15 +553,15 @@@ static int bq25890_power_supply_get_pro
                val->intval = ret * -50000;
                break;
  
+       case POWER_SUPPLY_PROP_TEMP:
+               ret = bq25890_field_read(bq, F_TSPCT);
+               if (ret < 0)
+                       return ret;
+               /* convert TS percentage into rough temperature */
+               val->intval = bq25890_find_val(ret, TBL_TSPCT);
+               break;
        default:
                return -EINVAL;
        }
@@@ -581,12 -615,12 +615,12 @@@ static irqreturn_t __bq25890_handle_irq
  
        if (!new_state.online && bq->state.online) {        /* power removed */
                /* disable ADC */
 -              ret = bq25890_field_write(bq, F_CONV_START, 0);
 +              ret = bq25890_field_write(bq, F_CONV_RATE, 0);
                if (ret < 0)
                        goto error;
        } else if (new_state.online && !bq->state.online) { /* power inserted */
                /* enable ADC, to have control of charge current/voltage */
 -              ret = bq25890_field_write(bq, F_CONV_START, 1);
 +              ret = bq25890_field_write(bq, F_CONV_RATE, 1);
                if (ret < 0)
                        goto error;
        }
@@@ -713,6 -747,7 +747,7 @@@ static const enum power_supply_propert
        POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT,
        POWER_SUPPLY_PROP_VOLTAGE_NOW,
        POWER_SUPPLY_PROP_CURRENT_NOW,
+       POWER_SUPPLY_PROP_TEMP,
  };
  
  static char *bq25890_charger_supplied_to[] = {
index 6093754cebd5631c99bc09aa9a784836bd0171bd,fffb87dca5a01052253d5dc6d387b93ecfff9639..ec838c9bcc0a5e07454156aa52b55cff47481d62
@@@ -21,6 -21,7 +21,7 @@@
  #include <linux/power_supply.h>
  #include <linux/property.h>
  #include <linux/thermal.h>
+ #include <linux/fixp-arith.h>
  #include "power_supply.h"
  
  /* exported for the APM Power driver, APM emulation */
@@@ -563,14 -564,19 +564,19 @@@ EXPORT_SYMBOL_GPL(devm_power_supply_get
  #endif /* CONFIG_OF */
  
  int power_supply_get_battery_info(struct power_supply *psy,
-                                 struct power_supply_battery_info *info)
+                                 struct power_supply_battery_info **info_out)
  {
        struct power_supply_resistance_temp_table *resist_table;
+       struct power_supply_battery_info *info;
        struct device_node *battery_np;
        const char *value;
        int err, len, index;
        const __be32 *list;
  
+       info = devm_kmalloc(&psy->dev, sizeof(*info), GFP_KERNEL);
+       if (!info)
+               return -ENOMEM;
        info->technology                     = POWER_SUPPLY_TECHNOLOGY_UNKNOWN;
        info->energy_full_design_uwh         = -EINVAL;
        info->charge_full_design_uah         = -EINVAL;
        info->charge_term_current_ua         = -EINVAL;
        info->constant_charge_current_max_ua = -EINVAL;
        info->constant_charge_voltage_max_uv = -EINVAL;
+       info->tricklecharge_current_ua       = -EINVAL;
+       info->precharge_voltage_max_uv       = -EINVAL;
+       info->charge_restart_voltage_uv      = -EINVAL;
+       info->overvoltage_limit_uv           = -EINVAL;
        info->temp_ambient_alert_min         = INT_MIN;
        info->temp_ambient_alert_max         = INT_MAX;
        info->temp_alert_min                 = INT_MIN;
  
        list = of_get_property(battery_np, "resistance-temp-table", &len);
        if (!list || !len)
-               goto out_put_node;
+               goto out_ret_pointer;
  
        info->resist_table_size = len / (2 * sizeof(__be32));
        resist_table = info->resist_table = devm_kcalloc(&psy->dev,
                resist_table[index].resistance = be32_to_cpu(*list++);
        }
  
+ out_ret_pointer:
+       /* Finally return the whole thing */
+       *info_out = info;
  out_put_node:
        of_node_put(battery_np);
        return err;
@@@ -763,6 -777,8 +777,8 @@@ void power_supply_put_battery_info(stru
  
        if (info->resist_table)
                devm_kfree(&psy->dev, info->resist_table);
+       devm_kfree(&psy->dev, info);
  }
  EXPORT_SYMBOL_GPL(power_supply_put_battery_info);
  
  int power_supply_temp2resist_simple(struct power_supply_resistance_temp_table *table,
                                    int table_len, int temp)
  {
-       int i, resist;
+       int i, high, low;
  
-       for (i = 0; i < table_len; i++)
+       /* Break loop at table_len - 1 because that is the highest index */
+       for (i = 0; i < table_len - 1; i++)
                if (temp > table[i].temp)
                        break;
  
-       if (i > 0 && i < table_len) {
-               int tmp;
-               tmp = (table[i - 1].resistance - table[i].resistance) *
-                       (temp - table[i].temp);
-               tmp /= table[i - 1].temp - table[i].temp;
-               resist = tmp + table[i].resistance;
-       } else if (i == 0) {
-               resist = table[0].resistance;
-       } else {
-               resist = table[table_len - 1].resistance;
-       }
-       return resist;
+       /* The library function will deal with high == low */
+       if ((i == 0) || (i == (table_len - 1)))
+               high = i;
+       else
+               high = i - 1;
+       low = i;
+       return fixp_linear_interpolate(table[low].temp,
+                                      table[low].resistance,
+                                      table[high].temp,
+                                      table[high].resistance,
+                                      temp);
  }
  EXPORT_SYMBOL_GPL(power_supply_temp2resist_simple);
  
  int power_supply_ocv2cap_simple(struct power_supply_battery_ocv_table *table,
                                int table_len, int ocv)
  {
-       int i, cap, tmp;
+       int i, high, low;
  
-       for (i = 0; i < table_len; i++)
+       /* Break loop at table_len - 1 because that is the highest index */
+       for (i = 0; i < table_len - 1; i++)
                if (ocv > table[i].ocv)
                        break;
  
-       if (i > 0 && i < table_len) {
-               tmp = (table[i - 1].capacity - table[i].capacity) *
-                       (ocv - table[i].ocv);
-               tmp /= table[i - 1].ocv - table[i].ocv;
-               cap = tmp + table[i].capacity;
-       } else if (i == 0) {
-               cap = table[0].capacity;
-       } else {
-               cap = table[table_len - 1].capacity;
-       }
-       return cap;
+       /* The library function will deal with high == low */
+       if ((i == 0) || (i == (table_len - 1)))
+               high = i - 1;
+       else
+               high = i; /* i.e. i == 0 */
+       low = i;
+       return fixp_linear_interpolate(table[low].ocv,
+                                      table[low].capacity,
+                                      table[high].ocv,
+                                      table[high].capacity,
+                                      ocv);
  }
  EXPORT_SYMBOL_GPL(power_supply_ocv2cap_simple);
  
@@@ -853,10 -869,6 +869,10 @@@ power_supply_find_ocv2cap_table(struct 
                return NULL;
  
        for (i = 0; i < POWER_SUPPLY_OCV_TEMP_MAX; i++) {
 +              /* Out of capacity tables */
 +              if (!info->ocv_table[i])
 +                      break;
 +
                temp_diff = abs(info->ocv_temp[i] - temp);
  
                if (temp_diff < best_temp_diff) {
This page took 0.12998 seconds and 4 git commands to generate.