]> Git Repo - linux.git/commitdiff
Merge tag 'hwmon-for-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
authorLinus Torvalds <[email protected]>
Wed, 5 Oct 2022 02:02:54 +0000 (19:02 -0700)
committerLinus Torvalds <[email protected]>
Wed, 5 Oct 2022 02:02:54 +0000 (19:02 -0700)
Pull hwmon updates from Guenter Roeck:
 "New drivers:

   - Driver for MAX31760 fan speed controller

   - Driver for TEXAS TPS546D24 Buck Converter

   - Driver for EMC2301/2/3/5 RPM-based PWM Fan Speed Controller

  Removed drivers:

   - Drop obsolete asus_wmi_ec_sensors driver

  Cleanups, affecting various drivers:

   - Use DEFINE_SIMPLE_DEV_PM_OPS where appropriate

   - Remove forward declarations

   - Move from strlcpy with unused retval to strscpy

   - Make use of devm_clk_get_enabled()

   - Drop devm_of_pwm_get()

  Other notable cleanup and improvements:

   - Support for additional USB devide ID and support for reporting of
     rail mode via debugfs added to corsair-psu driver

   - Support for aditional USB ID in nzxt-smart2 driver

   - Support for Aquacomputer High Flow Next in aquacomputer_d5next
     driver

   - Major cleanup of pwm-fan driver

   - Major cleanup of mr75203 driver, and added support for new device
     revision

  And various other minor fixes and cleanups"

* tag 'hwmon-for-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (86 commits)
  hwmon: (corsair-psu) add USB id of new revision of the HX1000i psu
  hwmon: (pmbus/mp2888) Fix sensors readouts for MPS Multi-phase mp2888 controller
  dt-bindings: hwmon: sensirion,shtc1: Clean up spelling mistakes and grammar
  hwmon: (nct6683) remove unused variable in nct6683_create_attr_group
  hwmon: w83627hf: Reorder symbols to get rid of a few forward declarations
  hwmon: (ina3221) Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr()
  hwmon: (w83627ehf) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  hwmon: (tmp108) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  hwmon: (tmp103) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  hwmon: (tmp102) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  hwmon: (pwm-fan) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  hwmon: (nct6775) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  hwmon: (max6639) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  hwmon: (max31730) witch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  hwmon: (max31722) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  hwmon: (ltc2947) Switch to EXPORT_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  hwmon: (lm90) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  hwmon: (it87) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  hwmon: (gpio-fan) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  hwmon: (adt7x10) Switch to EXPORT_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  ...

20 files changed:
1  2 
Documentation/driver-api/driver-model/devres.rst
MAINTAINERS
drivers/hwmon/acpi_power_meter.c
drivers/hwmon/adc128d818.c
drivers/hwmon/asb100.c
drivers/hwmon/asc7621.c
drivers/hwmon/dme1737.c
drivers/hwmon/emc2305.c
drivers/hwmon/f75375s.c
drivers/hwmon/fschmd.c
drivers/hwmon/ftsteutates.c
drivers/hwmon/ina3221.c
drivers/hwmon/jc42.c
drivers/hwmon/tps23861.c
drivers/hwmon/w83781d.c
drivers/hwmon/w83791d.c
drivers/hwmon/w83792d.c
drivers/hwmon/w83793.c
drivers/hwmon/w83795.c
drivers/hwmon/w83l785ts.c

index dc1b2353cea3f730b99374ab31c5cf3e1a1d3692,38a8b036e52769be429a51fab2d2a4c17c62ac42..80bb31c37909e9e3a1a9af97f2b06abfd2e72cac
@@@ -301,7 -301,6 +301,7 @@@ IO regio
    devm_release_region()
    devm_release_resource()
    devm_request_mem_region()
 +  devm_request_free_mem_region()
    devm_request_region()
    devm_request_resource()
  
@@@ -335,7 -334,7 +335,7 @@@ IR
    devm_irq_alloc_descs_from()
    devm_irq_alloc_generic_chip()
    devm_irq_setup_generic_chip()
 -  devm_irq_sim_init()
 +  devm_irq_domain_create_sim()
  
  LED
    devm_led_classdev_register()
@@@ -393,9 -392,7 +393,9 @@@ PH
  PINCTRL
    devm_pinctrl_get()
    devm_pinctrl_put()
 +  devm_pinctrl_get_select()
    devm_pinctrl_register()
 +  devm_pinctrl_register_and_init()
    devm_pinctrl_unregister()
  
  POWER
  
  PWM
    devm_pwm_get()
-   devm_of_pwm_get()
    devm_fwnode_pwm_get()
  
  REGULATOR
@@@ -430,8 -426,6 +429,8 @@@ SLAVE DMA ENGIN
    devm_acpi_dma_controller_register()
  
  SPI
 +  devm_spi_alloc_master()
 +  devm_spi_alloc_slave()
    devm_spi_register_master()
  
  WATCHDOG
diff --combined MAINTAINERS
index a8e68844b34b4fc9b44a7ac91d4b183acf384e88,7f40ac1735ae49c143fa57257654ac4113374ad7..b3a2880db324e344a9ba924849fcd9cb58553ac3
@@@ -348,6 -348,7 +348,6 @@@ M: "Rafael J. Wysocki" <[email protected]
  R:    Len Brown <[email protected]>
  L:    [email protected]
  S:    Supported
 -W:    https://01.org/linux-acpi
  Q:    https://patchwork.kernel.org/project/linux-acpi/list/
  B:    https://bugzilla.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
@@@ -426,6 -427,7 +426,6 @@@ M: Rafael J. Wysocki <[email protected]
  R:    Zhang Rui <[email protected]>
  L:    [email protected]
  S:    Supported
 -W:    https://01.org/linux-acpi
  B:    https://bugzilla.kernel.org
  F:    drivers/acpi/*thermal*
  
@@@ -669,8 -671,7 +669,8 @@@ F: fs/afs
  F:    include/trace/events/afs.h
  
  AGPGART DRIVER
 -M:    David Airlie <[email protected]>
 +M:    David Airlie <[email protected]>
 +L:    [email protected]
  S:    Maintained
  T:    git git://anongit.freedesktop.org/drm/drm
  F:    drivers/char/agp/
@@@ -877,13 -878,6 +877,13 @@@ L:       [email protected]
  S:    Maintained
  F:    drivers/net/ethernet/altera/
  
 +ALTERA TSE PCS
 +M:    Maxime Chevallier <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/net/pcs/pcs-altera-tse.c
 +F:    include/linux/pcs-altera-tse.h
 +
  ALTERA UART/JTAG UART SERIAL DRIVERS
  M:    Tobias Klauser <[email protected]>
  L:    [email protected]
@@@ -1016,6 -1010,7 +1016,6 @@@ F:      drivers/spi/spi-amd.
  
  AMD MP2 I2C DRIVER
  M:    Elie Morisse <[email protected]>
 -M:    Nehal Shah <[email protected]>
  M:    Shyam Sundar S K <[email protected]>
  L:    [email protected]
  S:    Maintained
@@@ -1339,6 -1334,15 +1339,15 @@@ F:    drivers/iio/amplifiers/hmc425a.
  F:    drivers/staging/iio/*/ad*
  X:    drivers/iio/*/adjd*
  
+ ANALOG DEVICES INC MAX31760 DRIVER
+ M:    Ibrahim Tilki <[email protected]>
+ S:    Maintained
+ W:    http://wiki.analog.com/
+ W:    https://ez.analog.com/linux-software-drivers
+ F:    Documentation/devicetree/bindings/hwmon/adi,max31760.yaml
+ F:    Documentation/hwmon/max31760.rst
+ F:    drivers/hwmon/max31760.c
  ANALOGBITS PLL LIBRARIES
  M:    Paul Walmsley <[email protected]>
  S:    Supported
@@@ -1808,7 -1812,7 +1817,7 @@@ N:      sun[x456789]
  N:    sun50i
  
  ARM/Amlogic Meson SoC CLOCK FRAMEWORK
 -M:    Neil Armstrong <n[email protected]>
 +M:    Neil Armstrong <n[email protected]>
  M:    Jerome Brunet <[email protected]>
  L:    [email protected]
  S:    Maintained
@@@ -1833,7 -1837,7 +1842,7 @@@ F:      Documentation/devicetree/bindings/so
  F:    sound/soc/meson/
  
  ARM/Amlogic Meson SoC support
 -M:    Neil Armstrong <n[email protected]>
 +M:    Neil Armstrong <n[email protected]>
  M:    Kevin Hilman <[email protected]>
  R:    Jerome Brunet <[email protected]>
  R:    Martin Blumenstingl <[email protected]>
@@@ -2399,7 -2403,6 +2408,7 @@@ N:      atme
  ARM/Microchip Sparx5 SoC support
  M:    Lars Povlsen <[email protected]>
  M:    Steen Hegelund <[email protected]>
 +M:    Daniel Machon <[email protected]>
  M:    [email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Supported
@@@ -2537,7 -2540,7 +2546,7 @@@ W:      http://www.digriz.org.uk/ts78xx/kern
  F:    arch/arm/mach-orion5x/ts78xx-*
  
  ARM/OXNAS platform support
 -M:    Neil Armstrong <n[email protected]>
 +M:    Neil Armstrong <n[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
@@@ -2585,7 -2588,7 +2594,7 @@@ W:      http://www.armlinux.org.uk
  
  ARM/QUALCOMM SUPPORT
  M:    Andy Gross <[email protected]>
 -M:    Bjorn Andersson <bjorn.andersson@linaro.org>
 +M:    Bjorn Andersson <andersson@kernel.org>
  R:    Konrad Dybcio <[email protected]>
  L:    [email protected]
  S:    Maintained
@@@ -2676,6 -2679,7 +2685,6 @@@ M:      Russell King <[email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  W:    http://www.armlinux.org.uk/
 -F:    arch/arm/include/asm/hardware/entry-macro-iomd.S
  F:    arch/arm/include/asm/hardware/ioc.h
  F:    arch/arm/include/asm/hardware/iomd.h
  F:    arch/arm/include/asm/hardware/memc.h
  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 EC HARDWARE MONITOR DRIVER
  M:    Eugene Shalygin <[email protected]>
  L:    [email protected]
@@@ -3830,7 -3827,6 +3832,7 @@@ F:      kernel/bpf/dispatcher.
  F:    kernel/bpf/trampoline.c
  F:    include/linux/bpf*
  F:    include/linux/filter.h
 +F:    include/linux/tnum.h
  
  BPF [BTF]
  M:    Martin KaFai Lau <[email protected]>
@@@ -5251,7 -5247,6 +5253,7 @@@ F:      block/blk-throttle.
  F:    include/linux/blk-cgroup.h
  
  CONTROL GROUP - CPUSET
 +M:    Waiman Long <[email protected]>
  M:    Zefan Li <[email protected]>
  L:    [email protected]
  S:    Maintained
@@@ -5729,6 -5724,13 +5731,6 @@@ F:     include/linux/tfrc.
  F:    include/uapi/linux/dccp.h
  F:    net/dccp/
  
 -DECnet NETWORK LAYER
 -L:    [email protected]
 -S:    Orphan
 -W:    http://linux-decnet.sourceforge.net
 -F:    Documentation/networking/decnet.rst
 -F:    net/decnet/
 -
  DECSTATION PLATFORM SUPPORT
  M:    "Maciej W. Rozycki" <[email protected]>
  L:    [email protected]
@@@ -6181,7 -6183,7 +6183,7 @@@ F:      Documentation/devicetree/bindings/me
  F:    drivers/memory/samsung/exynos5422-dmc.c
  
  DME1737 HARDWARE MONITOR DRIVER
- M:    Juerg Haefliger <juergh@gmail.com>
+ M:    Juerg Haefliger <juergh@proton.me>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/hwmon/dme1737.rst
@@@ -6753,7 -6755,7 +6755,7 @@@ F:      Documentation/devicetree/bindings/di
  F:    drivers/gpu/drm/panel/panel-widechips-ws2401.c
  
  DRM DRIVERS
 -M:    David Airlie <airlied@linux.ie>
 +M:    David Airlie <airlied@gmail.com>
  M:    Daniel Vetter <[email protected]>
  L:    [email protected]
  S:    Maintained
@@@ -6792,7 -6794,7 +6794,7 @@@ F:      Documentation/devicetree/bindings/di
  F:    drivers/gpu/drm/sun4i/
  
  DRM DRIVERS FOR AMLOGIC SOCS
 -M:    Neil Armstrong <n[email protected]>
 +M:    Neil Armstrong <n[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Supported
@@@ -6814,7 -6816,7 +6816,7 @@@ F:      drivers/gpu/drm/atmel-hlcdc
  
  DRM DRIVERS FOR BRIDGE CHIPS
  M:    Andrzej Hajda <[email protected]>
 -M:    Neil Armstrong <n[email protected]>
 +M:    Neil Armstrong <n[email protected]>
  M:    Robert Foss <[email protected]>
  R:    Laurent Pinchart <[email protected]>
  R:    Jonas Karlman <[email protected]>
@@@ -7687,6 -7689,7 +7689,6 @@@ R:      Kees Cook <[email protected]
  L:    [email protected]
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/execve
 -F:    arch/alpha/kernel/binfmt_loader.c
  F:    fs/*binfmt_*.c
  F:    fs/exec.c
  F:    include/linux/binfmts.h
@@@ -8003,7 -8006,6 +8005,7 @@@ L:      [email protected]
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
  F:    include/linux/fortify-string.h
 +F:    lib/fortify_kunit.c
  F:    lib/test_fortify/*
  F:    scripts/test_fortify.sh
  K:    \b__NO_FORTIFY\b
@@@ -8652,8 -8654,8 +8654,8 @@@ F:      drivers/input/touchscreen/goodix
  
  GOOGLE ETHERNET DRIVERS
  M:    Jeroen de Borst <[email protected]>
 -R:    Catherine Sullivan <[email protected]>
 -R:    David Awogbemila <awogbemila@google.com>
 +M:    Catherine Sullivan <[email protected]>
 +R:    Shailend Chand <shailend@google.com>
  L:    [email protected]
  S:    Supported
  F:    Documentation/networking/device_drivers/ethernet/google/gve.rst
@@@ -8943,7 -8945,7 +8945,7 @@@ F:      include/linux/hw_random.
  
  HARDWARE SPINLOCK CORE
  M:    Ohad Ben-Cohen <[email protected]>
 -M:    Bjorn Andersson <bjorn.andersson@linaro.org>
 +M:    Bjorn Andersson <andersson@kernel.org>
  R:    Baolin Wang <[email protected]>
  L:    [email protected]
  S:    Maintained
@@@ -9122,7 -9124,7 +9124,7 @@@ S:      Maintaine
  F:    drivers/dma/hisi_dma.c
  
  HISILICON GPIO DRIVER
 -M:    Luo Jiaxing <luojiaxing@huawei.com>
 +M:    Jay Fang <f.fangjian@huawei.com>
  L:    [email protected]
  S:    Maintained
  F:    drivers/gpio/gpio-hisi.c
@@@ -10378,6 -10380,7 +10380,6 @@@ INTEL MENLOW THERMAL DRIVE
  M:    Sujith Thomas <[email protected]>
  L:    [email protected]
  S:    Supported
 -W:    https://01.org/linux-acpi
  F:    drivers/thermal/intel/intel_menlow.c
  
  INTEL P-Unit IPC DRIVER
@@@ -10827,7 -10830,7 +10829,7 @@@ F:   drivers/media/tuners/it913x
  
  ITE IT66121 HDMI BRIDGE DRIVER
  M:    Phong LE <[email protected]>
 -M:    Neil Armstrong <n[email protected]>
 +M:    Neil Armstrong <n[email protected]>
  S:    Maintained
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  F:    Documentation/devicetree/bindings/display/bridge/ite,it66121.yaml
@@@ -11346,7 -11349,7 +11348,7 @@@ F:   kernel/debug
  F:    kernel/module/kdb.c
  
  KHADAS MCU MFD DRIVER
 -M:    Neil Armstrong <n[email protected]>
 +M:    Neil Armstrong <n[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/mfd/khadas,mcu.yaml
@@@ -12982,9 -12985,9 +12984,9 @@@ F:   drivers/input/touchscreen/melfas_mip
  
  MELLANOX BLUEFIELD I2C DRIVER
  M:    Khalil Blaiech <[email protected]>
 +M:    Asmaa Mnebhi <[email protected]>
  L:    [email protected]
  S:    Supported
 -F:    Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml
  F:    drivers/i2c/busses/i2c-mlxbf.c
  
  MELLANOX ETHERNET DRIVER (mlx4_en)
@@@ -13217,7 -13220,7 +13219,7 @@@ S:   Maintaine
  F:    drivers/watchdog/menz69_wdt.c
  
  MESON AO CEC DRIVER FOR AMLOGIC SOCS
 -M:    Neil Armstrong <n[email protected]>
 +M:    Neil Armstrong <n[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Supported
@@@ -13228,7 -13231,7 +13230,7 @@@ F:   drivers/media/cec/platform/meson/ao-
  F:    drivers/media/cec/platform/meson/ao-cec.c
  
  MESON GE2D DRIVER FOR AMLOGIC SOCS
 -M:    Neil Armstrong <n[email protected]>
 +M:    Neil Armstrong <n[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Supported
@@@ -13244,7 -13247,7 +13246,7 @@@ F:   Documentation/devicetree/bindings/mt
  F:    drivers/mtd/nand/raw/meson_*
  
  MESON VIDEO DECODER DRIVER FOR AMLOGIC SOCS
 -M:    Neil Armstrong <n[email protected]>
 +M:    Neil Armstrong <n[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Supported
@@@ -13433,14 -13436,6 +13435,14 @@@ F: Documentation/devicetree/bindings/nv
  F:    drivers/nvmem/microchip-otpc.c
  F:    include/dt-bindings/nvmem/microchip,sama7g5-otpc.h
  
 +MICROCHIP PCI1XXXX I2C DRIVER
 +M:    Tharun Kumar P <[email protected]>
 +M:    Kumaravel Thiagarajan <[email protected]>
 +M:    Microchip Linux Driver Support <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/i2c/busses/i2c-mchp-pci1xxxx.c
 +
  MICROCHIP PWM DRIVER
  M:    Claudiu Beznea <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -14456,7 -14451,6 +14458,7 @@@ M:   Willy Tarreau <[email protected]
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/nolibc.git
  F:    tools/include/nolibc/
 +F:    tools/testing/selftests/nolibc/
  
  NSDEPS
  M:    Matthias Maennich <[email protected]>
@@@ -14754,13 -14748,6 +14756,13 @@@ F: net/dsa/tag_ocelot.
  F:    net/dsa/tag_ocelot_8021q.c
  F:    tools/testing/selftests/drivers/net/ocelot/*
  
 +OCELOT EXTERNAL SWITCH CONTROL
 +M:    Colin Foster <[email protected]>
 +S:    Supported
 +F:    Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml
 +F:    drivers/mfd/ocelot*
 +F:    include/linux/mfd/ocelot.h
 +
  OCXL (Open Coherent Accelerator Processor Interface OpenCAPI) DRIVER
  M:    Frederic Barrat <[email protected]>
  M:    Andrew Donnellan <[email protected]>
@@@ -16140,7 -16127,7 +16142,7 @@@ F:   drivers/gpio/gpio-sama5d2-piobu.
  F:    drivers/pinctrl/pinctrl-at91*
  
  PIN CONTROLLER - QUALCOMM
 -M:    Bjorn Andersson <bjorn.andersson@linaro.org>
 +M:    Bjorn Andersson <andersson@kernel.org>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/pinctrl/qcom,*.txt
@@@ -16833,7 -16820,7 +16835,7 @@@ F:   Documentation/devicetree/bindings/me
  F:    drivers/media/platform/qcom/camss/
  
  QUALCOMM CLOCK DRIVERS
 -M:    Bjorn Andersson <bjorn.andersson@linaro.org>
 +M:    Bjorn Andersson <andersson@kernel.org>
  L:    [email protected]
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git
@@@ -16872,7 -16859,6 +16874,7 @@@ F:   drivers/net/ethernet/qualcomm/emac
  
  QUALCOMM ETHQOS ETHERNET DRIVER
  M:    Vinod Koul <[email protected]>
 +R:    Bhupesh Sharma <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/net/qcom,ethqos.txt
@@@ -17323,7 -17309,7 +17325,7 @@@ S:   Supporte
  F:    fs/reiserfs/
  
  REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM
 -M:    Bjorn Andersson <bjorn.andersson@linaro.org>
 +M:    Bjorn Andersson <andersson@kernel.org>
  M:    Mathieu Poirier <[email protected]>
  L:    [email protected]
  S:    Maintained
@@@ -17336,7 -17322,7 +17338,7 @@@ F:   include/linux/remoteproc.
  F:    include/linux/remoteproc/
  
  REMOTE PROCESSOR MESSAGING (RPMSG) SUBSYSTEM
 -M:    Bjorn Andersson <bjorn.andersson@linaro.org>
 +M:    Bjorn Andersson <andersson@kernel.org>
  M:    Mathieu Poirier <[email protected]>
  L:    [email protected]
  S:    Maintained
@@@ -17772,24 -17758,6 +17774,24 @@@ F: include/rv
  F:    kernel/trace/rv/
  F:    tools/verification/
  
 +RUST
 +M:    Miguel Ojeda <[email protected]>
 +M:    Alex Gaynor <[email protected]>
 +M:    Wedson Almeida Filho <[email protected]>
 +R:    Boqun Feng <[email protected]>
 +R:    Gary Guo <[email protected]>
 +R:    Björn Roy Baron <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +W:    https://github.com/Rust-for-Linux/linux
 +B:    https://github.com/Rust-for-Linux/linux/issues
 +T:    git https://github.com/Rust-for-Linux/linux.git rust-next
 +F:    Documentation/rust/
 +F:    rust/
 +F:    samples/rust/
 +F:    scripts/*rust*
 +K:    \b(?i:rust)\b
 +
  RXRPC SOCKETS (AF_RXRPC)
  M:    David Howells <[email protected]>
  M:    Marc Dionne <[email protected]>
  S:    Maintained
  F:    drivers/net/ethernet/dlink/sundance.c
  
 +SUN HAPPY MEAL ETHERNET DRIVER
 +M:    Sean Anderson <[email protected]>
 +S:    Maintained
 +F:    drivers/net/ethernet/sun/sunhme.*
 +
  SUNPLUS ETHERNET DRIVER
  M:    Wells Lu <[email protected]>
  L:    [email protected]
@@@ -19998,7 -19961,6 +20000,7 @@@ S:   Supporte
  F:    drivers/net/team/
  F:    include/linux/if_team.h
  F:    include/uapi/linux/if_team.h
 +F:    tools/testing/selftests/drivers/net/team/
  
  TECHNOLOGIC SYSTEMS TS-5500 PLATFORM SUPPORT
  M:    "Savoir-faire Linux Inc." <[email protected]>
@@@ -20649,6 -20611,13 +20651,13 @@@ Q: https://patchwork.kernel.org/project
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
  F:    drivers/char/tpm/
  
+ TPS546D24 DRIVER
+ M:    Duke Du <[email protected]>
+ L:    [email protected]
+ S:    Maintained
+ F:    Documentation/hwmon/tps546d24.rst
+ F:    drivers/hwmon/pmbus/tps546d24.c
  TRACING
  M:    Steven Rostedt <[email protected]>
  M:    Ingo Molnar <[email protected]>
@@@ -21605,7 -21574,7 +21614,7 @@@ F:   drivers/gpio/gpio-virtio.
  F:    include/uapi/linux/virtio_gpio.h
  
  VIRTIO GPU DRIVER
 -M:    David Airlie <airlied@linux.ie>
 +M:    David Airlie <airlied@redhat.com>
  M:    Gerd Hoffmann <[email protected]>
  R:    Gurchetan Singh <[email protected]>
  R:    Chia-I Wu <[email protected]>
@@@ -21852,7 -21821,7 +21861,7 @@@ F:   lib/test_scanf.
  F:    lib/vsprintf.c
  
  VT1211 HARDWARE MONITOR DRIVER
- M:    Juerg Haefliger <juergh@gmail.com>
+ M:    Juerg Haefliger <juergh@proton.me>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/hwmon/vt1211.rst
@@@ -21911,11 -21880,9 +21920,11 @@@ F: drivers/input/tablet/wacom_serial4.
  
  WANGXUN ETHERNET DRIVER
  M:    Jiawen Wu <[email protected]>
 +M:    Mengyuan Lou <[email protected]>
 +W:    https://www.net-swift.com
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/networking/device_drivers/ethernet/wangxun/txgbe.rst
 +F:    Documentation/networking/device_drivers/ethernet/wangxun/*
  F:    drivers/net/ethernet/wangxun/
  
  WATCHDOG DEVICE DRIVERS
index 44e04c75d0d33a59fae32cc82b66613753712775,6d02947409d5c3a5e90cdc8598a01c3749ac9e3a..0962c12eba5a007f1e6f001648b420e5710f807c
@@@ -598,7 -598,7 +598,7 @@@ static int read_domain_devices(struct a
                        continue;
  
                /* Create a symlink to domain objects */
 -              obj = acpi_bus_get_acpi_device(element->reference.handle);
 +              obj = acpi_get_acpi_dev(element->reference.handle);
                resource->domain_devices[i] = obj;
                if (!obj)
                        continue;
@@@ -927,8 -927,6 +927,6 @@@ static int acpi_power_meter_remove(stru
        return 0;
  }
  
- #ifdef CONFIG_PM_SLEEP
  static int acpi_power_meter_resume(struct device *dev)
  {
        struct acpi_power_meter_resource *resource;
        return 0;
  }
  
- #endif /* CONFIG_PM_SLEEP */
- static SIMPLE_DEV_PM_OPS(acpi_power_meter_pm, NULL, acpi_power_meter_resume);
+ static DEFINE_SIMPLE_DEV_PM_OPS(acpi_power_meter_pm, NULL,
+                               acpi_power_meter_resume);
  
  static struct acpi_driver acpi_power_meter_driver = {
        .name = "power_meter",
                .remove = acpi_power_meter_remove,
                .notify = acpi_power_meter_notify,
                },
-       .drv.pm = &acpi_power_meter_pm,
+       .drv.pm = pm_sleep_ptr(&acpi_power_meter_pm),
  };
  
  /* Module init/exit routines */
index 299160543b351fa80dd2839c754aa9ab37b297f7,e7b9578631ecb1e2a6d8604967c667284e44aeb2..97b330b6c165c0fa5f6cfe9e906a3804bd13c154
@@@ -384,7 -384,7 +384,7 @@@ static int adc128_detect(struct i2c_cli
        if (i2c_smbus_read_byte_data(client, ADC128_REG_BUSY_STATUS) & 0xfc)
                return -ENODEV;
  
-       strlcpy(info->type, "adc128d818", I2C_NAME_SIZE);
+       strscpy(info->type, "adc128d818", I2C_NAME_SIZE);
  
        return 0;
  }
@@@ -495,12 -495,14 +495,12 @@@ error
        return err;
  }
  
 -static int adc128_remove(struct i2c_client *client)
 +static void adc128_remove(struct i2c_client *client)
  {
        struct adc128_data *data = i2c_get_clientdata(client);
  
        if (data->regulator)
                regulator_disable(data->regulator);
 -
 -      return 0;
  }
  
  static const struct i2c_device_id adc128_id[] = {
diff --combined drivers/hwmon/asb100.c
index a9166c8555c5f9e9539caa3ff153ee83f7c1f9bf,45bedf619457b35ef5d60d5d21308c51a7a40c74..ce4da836765c1d8447e4970a9bcdc95c67031deb
@@@ -208,7 -208,7 +208,7 @@@ static void asb100_write_value(struct i
  static int asb100_probe(struct i2c_client *client);
  static int asb100_detect(struct i2c_client *client,
                         struct i2c_board_info *info);
 -static int asb100_remove(struct i2c_client *client);
 +static void asb100_remove(struct i2c_client *client);
  static struct asb100_data *asb100_update_device(struct device *dev);
  static void asb100_init_client(struct i2c_client *client);
  
@@@ -769,7 -769,7 +769,7 @@@ static int asb100_detect(struct i2c_cli
        if (val1 != 0x31 || val2 != 0x06)
                return -ENODEV;
  
-       strlcpy(info->type, "asb100", I2C_NAME_SIZE);
+       strscpy(info->type, "asb100", I2C_NAME_SIZE);
  
        return 0;
  }
@@@ -822,7 -822,7 +822,7 @@@ ERROR3
        return err;
  }
  
 -static int asb100_remove(struct i2c_client *client)
 +static void asb100_remove(struct i2c_client *client)
  {
        struct asb100_data *data = i2c_get_clientdata(client);
  
  
        i2c_unregister_device(data->lm75[1]);
        i2c_unregister_device(data->lm75[0]);
 -
 -      return 0;
  }
  
  /*
diff --combined drivers/hwmon/asc7621.c
index 4f90fdee9cc7cd6f5a316cb34eebc615851f08d8,8385dadf7e198c3f71f7ccf9f562bc2ecd8a6096..54595454537bd1162ed76ae4f7372d64afe9ef5c
@@@ -1153,7 -1153,7 +1153,7 @@@ static int asc7621_detect(struct i2c_cl
  
                if (company == asc7621_chips[chip_index].company_id &&
                    verstep == asc7621_chips[chip_index].verstep_id) {
-                       strlcpy(info->type, asc7621_chips[chip_index].name,
+                       strscpy(info->type, asc7621_chips[chip_index].name,
                                I2C_NAME_SIZE);
  
                        dev_info(&adapter->dev, "Matched %s at 0x%02x\n",
        return -ENODEV;
  }
  
 -static int asc7621_remove(struct i2c_client *client)
 +static void asc7621_remove(struct i2c_client *client)
  {
        struct asc7621_data *data = i2c_get_clientdata(client);
        int i;
                device_remove_file(&client->dev,
                                   &(asc7621_params[i].sda.dev_attr));
        }
 -
 -      return 0;
  }
  
  static const struct i2c_device_id asc7621_id[] = {
diff --combined drivers/hwmon/dme1737.c
index b1cd028c8277e6c0eed75706e9bb08dbf091e307,ae309e90477aa6636187a2ecdcf9917ff63cf9fe..66c48f70fae73b0f3a94c23c4f749711dcb68e83
@@@ -2456,7 -2456,7 +2456,7 @@@ static int dme1737_i2c_detect(struct i2
        dev_info(dev, "Found a %s chip at 0x%02x (rev 0x%02x).\n",
                 verstep == SCH5027_VERSTEP ? "SCH5027" : "DME1737",
                 client->addr, verstep);
-       strlcpy(info->type, name, I2C_NAME_SIZE);
+       strscpy(info->type, name, I2C_NAME_SIZE);
  
        return 0;
  }
@@@ -2508,12 -2508,14 +2508,12 @@@ exit_remove
        return err;
  }
  
 -static int dme1737_i2c_remove(struct i2c_client *client)
 +static void dme1737_i2c_remove(struct i2c_client *client)
  {
        struct dme1737_data *data = i2c_get_clientdata(client);
  
        hwmon_device_unregister(data->hwmon_dev);
        dme1737_remove_files(&client->dev);
 -
 -      return 0;
  }
  
  static const struct i2c_device_id dme1737_id[] = {
diff --combined drivers/hwmon/emc2305.c
index 0000000000000000000000000000000000000000,bb32172e07e3eaf742c8376451e5f8b3b1ebdbef..aa1f25add0b6b3e175e5c318583b736c9ca0a532
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,621 +1,620 @@@
 -static int emc2305_remove(struct i2c_client *client)
+ // SPDX-License-Identifier: GPL-2.0+
+ /*
+  * Hardware monitoring driver for EMC2305 fan controller
+  *
+  * Copyright (C) 2022 Nvidia Technologies Ltd.
+  */
+ #include <linux/err.h>
+ #include <linux/hwmon.h>
+ #include <linux/i2c.h>
+ #include <linux/module.h>
+ #include <linux/platform_data/emc2305.h>
+ #include <linux/thermal.h>
+ static const unsigned short
+ emc2305_normal_i2c[] = { 0x27, 0x2c, 0x2d, 0x2e, 0x2f, 0x4c, 0x4d, I2C_CLIENT_END };
+ #define EMC2305_REG_DRIVE_FAIL_STATUS 0x27
+ #define EMC2305_REG_DEVICE            0xfd
+ #define EMC2305_REG_VENDOR            0xfe
+ #define EMC2305_FAN_MAX                       0xff
+ #define EMC2305_FAN_MIN                       0x00
+ #define EMC2305_FAN_MAX_STATE         10
+ #define EMC2305_DEVICE                        0x34
+ #define EMC2305_VENDOR                        0x5d
+ #define EMC2305_REG_PRODUCT_ID                0xfd
+ #define EMC2305_TACH_REGS_UNUSE_BITS  3
+ #define EMC2305_TACH_CNT_MULTIPLIER   0x02
+ #define EMC2305_TACH_RANGE_MIN                480
+ #define EMC2305_PWM_DUTY2STATE(duty, max_state, pwm_max) \
+       DIV_ROUND_CLOSEST((duty) * (max_state), (pwm_max))
+ #define EMC2305_PWM_STATE2DUTY(state, max_state, pwm_max) \
+       DIV_ROUND_CLOSEST((state) * (pwm_max), (max_state))
+ /*
+  * Factor by equations [2] and [3] from data sheet; valid for fans where the number of edges
+  * equal (poles * 2 + 1).
+  */
+ #define EMC2305_RPM_FACTOR            3932160
+ #define EMC2305_REG_FAN_DRIVE(n)      (0x30 + 0x10 * (n))
+ #define EMC2305_REG_FAN_MIN_DRIVE(n)  (0x38 + 0x10 * (n))
+ #define EMC2305_REG_FAN_TACH(n)               (0x3e + 0x10 * (n))
+ enum emc230x_product_id {
+       EMC2305 = 0x34,
+       EMC2303 = 0x35,
+       EMC2302 = 0x36,
+       EMC2301 = 0x37,
+ };
+ static const struct i2c_device_id emc2305_ids[] = {
+       { "emc2305", 0 },
+       { "emc2303", 0 },
+       { "emc2302", 0 },
+       { "emc2301", 0 },
+       { }
+ };
+ MODULE_DEVICE_TABLE(i2c, emc2305_ids);
+ /**
+  * @cdev: cooling device;
+  * @curr_state: cooling current state;
+  * @last_hwmon_state: last cooling state updated by hwmon subsystem;
+  * @last_thermal_state: last cooling state updated by thermal subsystem;
+  *
+  * The 'last_hwmon_state' and 'last_thermal_state' fields are provided to support fan low limit
+  * speed feature. The purpose of this feature is to provides ability to limit fan speed
+  * according to some system wise considerations, like absence of some replaceable units (PSU or
+  * line cards), high system ambient temperature, unreliable transceivers temperature sensing or
+  * some other factors which indirectly impacts system's airflow
+  * Fan low limit feature is supported through 'hwmon' interface: 'hwmon' 'pwm' attribute is
+  * used for setting low limit for fan speed in case 'thermal' subsystem is configured in
+  * kernel. In this case setting fan speed through 'hwmon' will never let the 'thermal'
+  * subsystem to select a lower duty cycle than the duty cycle selected with the 'pwm'
+  * attribute.
+  * From other side, fan speed is to be updated in hardware through 'pwm' only in case the
+  * requested fan speed is above last speed set by 'thermal' subsystem, otherwise requested fan
+  * speed will be just stored with no PWM update.
+  */
+ struct emc2305_cdev_data {
+       struct thermal_cooling_device *cdev;
+       unsigned int cur_state;
+       unsigned long last_hwmon_state;
+       unsigned long last_thermal_state;
+ };
+ /**
+  * @client: i2c client;
+  * @hwmon_dev: hwmon device;
+  * @max_state: maximum cooling state of the cooling device;
+  * @pwm_num: number of PWM channels;
+  * @pwm_separate: separate PWM settings for every channel;
+  * @pwm_min: array of minimum PWM per channel;
+  * @cdev_data: array of cooling devices data;
+  */
+ struct emc2305_data {
+       struct i2c_client *client;
+       struct device *hwmon_dev;
+       u8 max_state;
+       u8 pwm_num;
+       bool pwm_separate;
+       u8 pwm_min[EMC2305_PWM_MAX];
+       struct emc2305_cdev_data cdev_data[EMC2305_PWM_MAX];
+ };
+ static char *emc2305_fan_name[] = {
+       "emc2305_fan",
+       "emc2305_fan1",
+       "emc2305_fan2",
+       "emc2305_fan3",
+       "emc2305_fan4",
+       "emc2305_fan5",
+ };
+ static void emc2305_unset_tz(struct device *dev);
+ static int emc2305_get_max_channel(const struct emc2305_data *data)
+ {
+       return data->pwm_num;
+ }
+ static int emc2305_get_cdev_idx(struct thermal_cooling_device *cdev)
+ {
+       struct emc2305_data *data = cdev->devdata;
+       size_t len = strlen(cdev->type);
+       int ret;
+       if (len <= 0)
+               return -EINVAL;
+       /*
+        * Returns index of cooling device 0..4 in case of separate PWM setting.
+        * Zero index is used in case of one common PWM setting.
+        * If the mode is not set as pwm_separate, all PWMs are to be bound
+        * to the common thermal zone and should work at the same speed
+        * to perform cooling for the same thermal junction.
+        * Otherwise, return specific channel that will be used in bound
+        * related PWM to the thermal zone.
+        */
+       if (!data->pwm_separate)
+               return 0;
+       ret = cdev->type[len - 1];
+       switch (ret) {
+       case '1' ... '5':
+               return ret - '1';
+       default:
+               break;
+       }
+       return -EINVAL;
+ }
+ static int emc2305_get_cur_state(struct thermal_cooling_device *cdev, unsigned long *state)
+ {
+       int cdev_idx;
+       struct emc2305_data *data = cdev->devdata;
+       cdev_idx = emc2305_get_cdev_idx(cdev);
+       if (cdev_idx < 0)
+               return cdev_idx;
+       *state = data->cdev_data[cdev_idx].cur_state;
+       return 0;
+ }
+ static int emc2305_get_max_state(struct thermal_cooling_device *cdev, unsigned long *state)
+ {
+       struct emc2305_data *data = cdev->devdata;
+       *state = data->max_state;
+       return 0;
+ }
+ static int emc2305_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state)
+ {
+       int cdev_idx, ret;
+       struct emc2305_data *data = cdev->devdata;
+       struct i2c_client *client = data->client;
+       u8 val, i;
+       if (state > data->max_state)
+               return -EINVAL;
+       cdev_idx =  emc2305_get_cdev_idx(cdev);
+       if (cdev_idx < 0)
+               return cdev_idx;
+       /* Save thermal state. */
+       data->cdev_data[cdev_idx].last_thermal_state = state;
+       state = max_t(unsigned long, state, data->cdev_data[cdev_idx].last_hwmon_state);
+       val = EMC2305_PWM_STATE2DUTY(state, data->max_state, EMC2305_FAN_MAX);
+       data->cdev_data[cdev_idx].cur_state = state;
+       if (data->pwm_separate) {
+               ret = i2c_smbus_write_byte_data(client, EMC2305_REG_FAN_DRIVE(cdev_idx), val);
+               if (ret < 0)
+                       return ret;
+       } else {
+               /*
+                * Set the same PWM value in all channels
+                * if common PWM channel is used.
+                */
+               for (i = 0; i < data->pwm_num; i++) {
+                       ret = i2c_smbus_write_byte_data(client, EMC2305_REG_FAN_DRIVE(i), val);
+                       if (ret < 0)
+                               return ret;
+               }
+       }
+       return 0;
+ }
+ static const struct thermal_cooling_device_ops emc2305_cooling_ops = {
+       .get_max_state = emc2305_get_max_state,
+       .get_cur_state = emc2305_get_cur_state,
+       .set_cur_state = emc2305_set_cur_state,
+ };
+ static int emc2305_show_fault(struct device *dev, int channel)
+ {
+       struct emc2305_data *data = dev_get_drvdata(dev);
+       struct i2c_client *client = data->client;
+       int status_reg;
+       status_reg = i2c_smbus_read_byte_data(client, EMC2305_REG_DRIVE_FAIL_STATUS);
+       if (status_reg < 0)
+               return status_reg;
+       return status_reg & (1 << channel) ? 1 : 0;
+ }
+ static int emc2305_show_fan(struct device *dev, int channel)
+ {
+       struct emc2305_data *data = dev_get_drvdata(dev);
+       struct i2c_client *client = data->client;
+       int ret;
+       ret = i2c_smbus_read_word_swapped(client, EMC2305_REG_FAN_TACH(channel));
+       if (ret <= 0)
+               return ret;
+       ret = ret >> EMC2305_TACH_REGS_UNUSE_BITS;
+       ret = EMC2305_RPM_FACTOR / ret;
+       if (ret <= EMC2305_TACH_RANGE_MIN)
+               return 0;
+       return ret * EMC2305_TACH_CNT_MULTIPLIER;
+ }
+ static int emc2305_show_pwm(struct device *dev, int channel)
+ {
+       struct emc2305_data *data = dev_get_drvdata(dev);
+       struct i2c_client *client = data->client;
+       return i2c_smbus_read_byte_data(client, EMC2305_REG_FAN_DRIVE(channel));
+ }
+ static int emc2305_set_pwm(struct device *dev, long val, int channel)
+ {
+       struct emc2305_data *data = dev_get_drvdata(dev);
+       struct i2c_client *client = data->client;
+       int ret;
+       if (val < data->pwm_min[channel] || val > EMC2305_FAN_MAX)
+               return -EINVAL;
+       ret = i2c_smbus_write_byte_data(client, EMC2305_REG_FAN_DRIVE(channel), val);
+       if (ret < 0)
+               return ret;
+       data->cdev_data[channel].cur_state = EMC2305_PWM_DUTY2STATE(val, data->max_state,
+                                                                   EMC2305_FAN_MAX);
+       return 0;
+ }
+ static int emc2305_set_single_tz(struct device *dev, int idx)
+ {
+       struct emc2305_data *data = dev_get_drvdata(dev);
+       long pwm;
+       int i, cdev_idx, ret;
+       cdev_idx = (idx) ? idx - 1 : 0;
+       pwm = data->pwm_min[cdev_idx];
+       data->cdev_data[cdev_idx].cdev =
+               thermal_cooling_device_register(emc2305_fan_name[idx], data,
+                                               &emc2305_cooling_ops);
+       if (IS_ERR(data->cdev_data[cdev_idx].cdev)) {
+               dev_err(dev, "Failed to register cooling device %s\n", emc2305_fan_name[idx]);
+               return PTR_ERR(data->cdev_data[cdev_idx].cdev);
+       }
+       /* Set minimal PWM speed. */
+       if (data->pwm_separate) {
+               ret = emc2305_set_pwm(dev, pwm, cdev_idx);
+               if (ret < 0)
+                       return ret;
+       } else {
+               for (i = 0; i < data->pwm_num; i++) {
+                       ret = emc2305_set_pwm(dev, pwm, i);
+                       if (ret < 0)
+                               return ret;
+               }
+       }
+       data->cdev_data[cdev_idx].cur_state =
+               EMC2305_PWM_DUTY2STATE(data->pwm_min[cdev_idx], data->max_state,
+                                      EMC2305_FAN_MAX);
+       data->cdev_data[cdev_idx].last_hwmon_state =
+               EMC2305_PWM_DUTY2STATE(data->pwm_min[cdev_idx], data->max_state,
+                                      EMC2305_FAN_MAX);
+       return 0;
+ }
+ static int emc2305_set_tz(struct device *dev)
+ {
+       struct emc2305_data *data = dev_get_drvdata(dev);
+       int i, ret;
+       if (!data->pwm_separate)
+               return emc2305_set_single_tz(dev, 0);
+       for (i = 0; i < data->pwm_num; i++) {
+               ret = emc2305_set_single_tz(dev, i + 1);
+               if (ret)
+                       goto thermal_cooling_device_register_fail;
+       }
+       return 0;
+ thermal_cooling_device_register_fail:
+       emc2305_unset_tz(dev);
+       return ret;
+ }
+ static void emc2305_unset_tz(struct device *dev)
+ {
+       struct emc2305_data *data = dev_get_drvdata(dev);
+       int i;
+       /* Unregister cooling device. */
+       for (i = 0; i < EMC2305_PWM_MAX; i++)
+               if (data->cdev_data[i].cdev)
+                       thermal_cooling_device_unregister(data->cdev_data[i].cdev);
+ }
+ static umode_t
+ emc2305_is_visible(const void *data, enum hwmon_sensor_types type, u32 attr, int channel)
+ {
+       int max_channel = emc2305_get_max_channel(data);
+       /* Don't show channels which are not physically connected. */
+       if (channel >= max_channel)
+               return 0;
+       switch (type) {
+       case hwmon_fan:
+               switch (attr) {
+               case hwmon_fan_input:
+                       return 0444;
+               case hwmon_fan_fault:
+                       return 0444;
+               default:
+                       break;
+               }
+               break;
+       case hwmon_pwm:
+               switch (attr) {
+               case hwmon_pwm_input:
+                       return 0644;
+               default:
+                       break;
+               }
+               break;
+       default:
+               break;
+       }
+       return 0;
+ };
+ static int
+ emc2305_write(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel, long val)
+ {
+       struct emc2305_data *data = dev_get_drvdata(dev);
+       int cdev_idx;
+       switch (type) {
+       case hwmon_pwm:
+               switch (attr) {
+               case hwmon_pwm_input:
+                       /* If thermal is configured - handle PWM limit setting. */
+                       if (IS_REACHABLE(CONFIG_THERMAL)) {
+                               if (data->pwm_separate)
+                                       cdev_idx = channel;
+                               else
+                                       cdev_idx = 0;
+                               data->cdev_data[cdev_idx].last_hwmon_state =
+                                       EMC2305_PWM_DUTY2STATE(val, data->max_state,
+                                                              EMC2305_FAN_MAX);
+                               /*
+                                * Update PWM only in case requested state is not less than the
+                                * last thermal state.
+                                */
+                               if (data->cdev_data[cdev_idx].last_hwmon_state >=
+                                   data->cdev_data[cdev_idx].last_thermal_state)
+                                       return emc2305_set_cur_state(data->cdev_data[cdev_idx].cdev,
+                                                       data->cdev_data[cdev_idx].last_hwmon_state);
+                               return 0;
+                       }
+                       return emc2305_set_pwm(dev, val, channel);
+               default:
+                       break;
+               }
+               break;
+       default:
+               break;
+       }
+       return -EOPNOTSUPP;
+ };
+ static int
+ emc2305_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel, long *val)
+ {
+       int ret;
+       switch (type) {
+       case hwmon_fan:
+               switch (attr) {
+               case hwmon_fan_input:
+                       ret = emc2305_show_fan(dev, channel);
+                       if (ret < 0)
+                               return ret;
+                       *val = ret;
+                       return 0;
+               case hwmon_fan_fault:
+                       ret = emc2305_show_fault(dev, channel);
+                       if (ret < 0)
+                               return ret;
+                       *val = ret;
+                       return 0;
+               default:
+                       break;
+               }
+               break;
+       case hwmon_pwm:
+               switch (attr) {
+               case hwmon_pwm_input:
+                       ret = emc2305_show_pwm(dev, channel);
+                       if (ret < 0)
+                               return ret;
+                       *val = ret;
+                       return 0;
+               default:
+                       break;
+               }
+               break;
+       default:
+               break;
+       }
+       return -EOPNOTSUPP;
+ };
+ static const struct hwmon_ops emc2305_ops = {
+       .is_visible = emc2305_is_visible,
+       .read = emc2305_read,
+       .write = emc2305_write,
+ };
+ static const struct hwmon_channel_info *emc2305_info[] = {
+       HWMON_CHANNEL_INFO(fan,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT),
+       HWMON_CHANNEL_INFO(pwm,
+                          HWMON_PWM_INPUT,
+                          HWMON_PWM_INPUT,
+                          HWMON_PWM_INPUT,
+                          HWMON_PWM_INPUT,
+                          HWMON_PWM_INPUT),
+       NULL
+ };
+ static const struct hwmon_chip_info emc2305_chip_info = {
+       .ops = &emc2305_ops,
+       .info = emc2305_info,
+ };
+ static int emc2305_identify(struct device *dev)
+ {
+       struct i2c_client *client = to_i2c_client(dev);
+       struct emc2305_data *data = i2c_get_clientdata(client);
+       int ret;
+       ret = i2c_smbus_read_byte_data(client, EMC2305_REG_PRODUCT_ID);
+       if (ret < 0)
+               return ret;
+       switch (ret) {
+       case EMC2305:
+               data->pwm_num = 5;
+               break;
+       case EMC2303:
+               data->pwm_num = 3;
+               break;
+       case EMC2302:
+               data->pwm_num = 2;
+               break;
+       case EMC2301:
+               data->pwm_num = 1;
+               break;
+       default:
+               return -ENODEV;
+       }
+       return 0;
+ }
+ static int emc2305_probe(struct i2c_client *client, const struct i2c_device_id *id)
+ {
+       struct i2c_adapter *adapter = client->adapter;
+       struct device *dev = &client->dev;
+       struct emc2305_data *data;
+       struct emc2305_platform_data *pdata;
+       int vendor, device;
+       int ret;
+       int i;
+       if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA))
+               return -ENODEV;
+       vendor = i2c_smbus_read_byte_data(client, EMC2305_REG_VENDOR);
+       if (vendor != EMC2305_VENDOR)
+               return -ENODEV;
+       device = i2c_smbus_read_byte_data(client, EMC2305_REG_DEVICE);
+       if (device != EMC2305_DEVICE)
+               return -ENODEV;
+       data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
+       if (!data)
+               return -ENOMEM;
+       i2c_set_clientdata(client, data);
+       data->client = client;
+       ret = emc2305_identify(dev);
+       if (ret)
+               return ret;
+       pdata = dev_get_platdata(&client->dev);
+       if (pdata) {
+               if (!pdata->max_state || pdata->max_state > EMC2305_FAN_MAX_STATE)
+                       return -EINVAL;
+               data->max_state = pdata->max_state;
+               /*
+                * Validate a number of active PWM channels. Note that
+                * configured number can be less than the actual maximum
+                * supported by the device.
+                */
+               if (!pdata->pwm_num || pdata->pwm_num > EMC2305_PWM_MAX)
+                       return -EINVAL;
+               data->pwm_num = pdata->pwm_num;
+               data->pwm_separate = pdata->pwm_separate;
+               for (i = 0; i < EMC2305_PWM_MAX; i++)
+                       data->pwm_min[i] = pdata->pwm_min[i];
+       } else {
+               data->max_state = EMC2305_FAN_MAX_STATE;
+               data->pwm_separate = false;
+               for (i = 0; i < EMC2305_PWM_MAX; i++)
+                       data->pwm_min[i] = EMC2305_FAN_MIN;
+       }
+       data->hwmon_dev = devm_hwmon_device_register_with_info(dev, "emc2305", data,
+                                                              &emc2305_chip_info, NULL);
+       if (IS_ERR(data->hwmon_dev))
+               return PTR_ERR(data->hwmon_dev);
+       if (IS_REACHABLE(CONFIG_THERMAL)) {
+               ret = emc2305_set_tz(dev);
+               if (ret != 0)
+                       return ret;
+       }
+       for (i = 0; i < data->pwm_num; i++) {
+               ret = i2c_smbus_write_byte_data(client, EMC2305_REG_FAN_MIN_DRIVE(i),
+                                               data->pwm_min[i]);
+               if (ret < 0)
+                       return ret;
+       }
+       return 0;
+ }
 -      return 0;
++static void emc2305_remove(struct i2c_client *client)
+ {
+       struct device *dev = &client->dev;
+       if (IS_REACHABLE(CONFIG_THERMAL))
+               emc2305_unset_tz(dev);
+ }
+ static struct i2c_driver emc2305_driver = {
+       .class  = I2C_CLASS_HWMON,
+       .driver = {
+               .name = "emc2305",
+       },
+       .probe    = emc2305_probe,
+       .remove   = emc2305_remove,
+       .id_table = emc2305_ids,
+       .address_list = emc2305_normal_i2c,
+ };
+ module_i2c_driver(emc2305_driver);
+ MODULE_AUTHOR("Nvidia");
+ MODULE_DESCRIPTION("Microchip EMC2305 fan controller driver");
+ MODULE_LICENSE("GPL");
diff --combined drivers/hwmon/f75375s.c
index ffeed6c1e20b18aa10f4218fdf0a8f0e656dd80b,8a469b2df5e11534fca71aa42820e10aec765121..64fbb8cf687c078cc9cafc9e7b0cda936eb4e9ed
@@@ -114,7 -114,7 +114,7 @@@ struct f75375_data 
  static int f75375_detect(struct i2c_client *client,
                         struct i2c_board_info *info);
  static int f75375_probe(struct i2c_client *client);
 -static int f75375_remove(struct i2c_client *client);
 +static void f75375_remove(struct i2c_client *client);
  
  static const struct i2c_device_id f75375_id[] = {
        { "f75373", f75373 },
@@@ -864,11 -864,12 +864,11 @@@ exit_remove
        return err;
  }
  
 -static int f75375_remove(struct i2c_client *client)
 +static void f75375_remove(struct i2c_client *client)
  {
        struct f75375_data *data = i2c_get_clientdata(client);
        hwmon_device_unregister(data->hwmon_dev);
        sysfs_remove_group(&client->dev.kobj, &f75375_group);
 -      return 0;
  }
  
  /* Return 0 if detection is successful, -ENODEV otherwise */
@@@ -896,7 -897,7 +896,7 @@@ static int f75375_detect(struct i2c_cli
  
        version = f75375_read8(client, F75375_REG_VERSION);
        dev_info(&adapter->dev, "found %s version: %02X\n", name, version);
-       strlcpy(info->type, name, I2C_NAME_SIZE);
+       strscpy(info->type, name, I2C_NAME_SIZE);
  
        return 0;
  }
diff --combined drivers/hwmon/fschmd.c
index 343e227ca38ad3fb701da6fac5d1a482f80c6c64,82652990063aee0fc5122b346d6c834fe83f8ec0..0a77d61619288e7d444fe3118ed7a04268babf7d
@@@ -217,7 -217,7 +217,7 @@@ static const int FSCHMD_NO_TEMP_SENSORS
  static int fschmd_probe(struct i2c_client *client);
  static int fschmd_detect(struct i2c_client *client,
                         struct i2c_board_info *info);
 -static int fschmd_remove(struct i2c_client *client);
 +static void fschmd_remove(struct i2c_client *client);
  static struct fschmd_data *fschmd_update_device(struct device *dev);
  
  /*
@@@ -1075,7 -1075,7 +1075,7 @@@ static int fschmd_detect(struct i2c_cli
        else
                return -ENODEV;
  
-       strlcpy(info->type, fschmd_id[kind].name, I2C_NAME_SIZE);
+       strscpy(info->type, fschmd_id[kind].name, I2C_NAME_SIZE);
  
        return 0;
  }
@@@ -1248,7 -1248,7 +1248,7 @@@ exit_detach
        return err;
  }
  
 -static int fschmd_remove(struct i2c_client *client)
 +static void fschmd_remove(struct i2c_client *client)
  {
        struct fschmd_data *data = i2c_get_clientdata(client);
        int i;
        mutex_lock(&watchdog_data_mutex);
        kref_put(&data->kref, fschmd_release_resources);
        mutex_unlock(&watchdog_data_mutex);
 -
 -      return 0;
  }
  
  static struct fschmd_data *fschmd_update_device(struct device *dev)
index 9187638324329ad88edfda95cef428f68674018e,bb26ca97abbd868563693181c6a36f0a1104cb91..f5b8e724a8ca1964bcb3341653e035e15c283163
@@@ -739,16 -739,17 +739,16 @@@ static int fts_detect(struct i2c_clien
        if (val != 0x11)
                return -ENODEV;
  
-       strlcpy(info->type, fts_id[0].name, I2C_NAME_SIZE);
+       strscpy(info->type, fts_id[0].name, I2C_NAME_SIZE);
        info->flags = 0;
        return 0;
  }
  
 -static int fts_remove(struct i2c_client *client)
 +static void fts_remove(struct i2c_client *client)
  {
        struct fts_data *data = dev_get_drvdata(&client->dev);
  
        watchdog_unregister_device(&data->wdd);
 -      return 0;
  }
  
  static int fts_probe(struct i2c_client *client)
diff --combined drivers/hwmon/ina3221.c
index f89bac19bd7349d1a3483fb3ff7b5e441dbff8ff,8ef2631fc31222e1cbbfe8478a14526b3c31605b..2a57f4b60c29d5042dcc2adc7fbcc240204a5c78
@@@ -913,7 -913,7 +913,7 @@@ fail
        return ret;
  }
  
 -static int ina3221_remove(struct i2c_client *client)
 +static void ina3221_remove(struct i2c_client *client)
  {
        struct ina3221_data *ina = dev_get_drvdata(&client->dev);
        int i;
                pm_runtime_put_noidle(ina->pm_dev);
  
        mutex_destroy(&ina->lock);
 -
 -      return 0;
  }
  
- static int __maybe_unused ina3221_suspend(struct device *dev)
+ static int ina3221_suspend(struct device *dev)
  {
        struct ina3221_data *ina = dev_get_drvdata(dev);
        int ret;
        return 0;
  }
  
- static int __maybe_unused ina3221_resume(struct device *dev)
+ static int ina3221_resume(struct device *dev)
  {
        struct ina3221_data *ina = dev_get_drvdata(dev);
        int ret;
        return 0;
  }
  
- static const struct dev_pm_ops ina3221_pm = {
-       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
-                               pm_runtime_force_resume)
-       SET_RUNTIME_PM_OPS(ina3221_suspend, ina3221_resume, NULL)
- };
+ static DEFINE_RUNTIME_DEV_PM_OPS(ina3221_pm, ina3221_suspend, ina3221_resume,
+                                NULL);
  
  static const struct of_device_id ina3221_of_match_table[] = {
        { .compatible = "ti,ina3221", },
@@@ -1018,7 -1017,7 +1015,7 @@@ static struct i2c_driver ina3221_i2c_dr
        .driver = {
                .name = INA3221_DRIVER_NAME,
                .of_match_table = ina3221_of_match_table,
-               .pm = &ina3221_pm,
+               .pm = pm_ptr(&ina3221_pm),
        },
        .id_table = ina3221_ids,
  };
diff --combined drivers/hwmon/jc42.c
index 7b3c190959d34c31990d171523800aafb00f9591,8379a5da46b82de6826419215dec418c52862f5d..30888feaf589bf1f5c63523e13b821f2be0426b4
@@@ -441,7 -441,7 +441,7 @@@ static int jc42_detect(struct i2c_clien
                struct jc42_chips *chip = &jc42_chips[i];
                if (manid == chip->manid &&
                    (devid & chip->devid_mask) == chip->devid) {
-                       strlcpy(info->type, "jc42", I2C_NAME_SIZE);
+                       strscpy(info->type, "jc42", I2C_NAME_SIZE);
                        return 0;
                }
        }
@@@ -524,7 -524,7 +524,7 @@@ static int jc42_probe(struct i2c_clien
        return PTR_ERR_OR_ZERO(hwmon_dev);
  }
  
 -static int jc42_remove(struct i2c_client *client)
 +static void jc42_remove(struct i2c_client *client)
  {
        struct jc42_data *data = i2c_get_clientdata(client);
  
                  | (data->config & JC42_CFG_HYST_MASK);
                i2c_smbus_write_word_swapped(client, JC42_REG_CONFIG, config);
        }
 -      return 0;
  }
  
  #ifdef CONFIG_PM
diff --combined drivers/hwmon/tps23861.c
index 5e3fc225151086de43403e62772b5fba983401ff,a3d7d6b75a26e12a643905ae05634d771946ada3..68c77c493270023881177196b498460a1bafcdc1
@@@ -372,29 -372,12 +372,12 @@@ static const struct hwmon_chip_info tps
        .info = tps23861_info,
  };
  
- static char *tps23861_port_operating_mode(struct tps23861_data *data, int port)
+ static char *port_operating_mode_string(uint8_t mode_reg, unsigned int port)
  {
-       unsigned int regval;
-       int mode;
-       regmap_read(data->regmap, OPERATING_MODE, &regval);
+       unsigned int mode = ~0;
  
-       switch (port) {
-       case 1:
-               mode = FIELD_GET(OPERATING_MODE_PORT_1_MASK, regval);
-               break;
-       case 2:
-               mode = FIELD_GET(OPERATING_MODE_PORT_2_MASK, regval);
-               break;
-       case 3:
-               mode = FIELD_GET(OPERATING_MODE_PORT_3_MASK, regval);
-               break;
-       case 4:
-               mode = FIELD_GET(OPERATING_MODE_PORT_4_MASK, regval);
-               break;
-       default:
-               mode = -EINVAL;
-       }
+       if (port < TPS23861_NUM_PORTS)
+               mode = (mode_reg >> (2 * port)) & OPERATING_MODE_PORT_1_MASK;
  
        switch (mode) {
        case OPERATING_MODE_OFF:
        }
  }
  
- static char *tps23861_port_detect_status(struct tps23861_data *data, int port)
+ static char *port_detect_status_string(uint8_t status_reg)
  {
-       unsigned int regval;
-       regmap_read(data->regmap,
-                   PORT_1_STATUS + (port - 1),
-                   &regval);
-       switch (FIELD_GET(PORT_STATUS_DETECT_MASK, regval)) {
+       switch (FIELD_GET(PORT_STATUS_DETECT_MASK, status_reg)) {
        case PORT_DETECT_UNKNOWN:
                return "Unknown device";
        case PORT_DETECT_SHORT:
        }
  }
  
- static char *tps23861_port_class_status(struct tps23861_data *data, int port)
+ static char *port_class_status_string(uint8_t status_reg)
  {
-       unsigned int regval;
-       regmap_read(data->regmap,
-                   PORT_1_STATUS + (port - 1),
-                   &regval);
-       switch (FIELD_GET(PORT_STATUS_CLASS_MASK, regval)) {
+       switch (FIELD_GET(PORT_STATUS_CLASS_MASK, status_reg)) {
        case PORT_CLASS_UNKNOWN:
                return "Unknown";
        case PORT_CLASS_RESERVED:
        }
  }
  
- static char *tps23861_port_poe_plus_status(struct tps23861_data *data, int port)
+ static char *port_poe_plus_status_string(uint8_t poe_plus, unsigned int port)
  {
-       unsigned int regval;
-       regmap_read(data->regmap, POE_PLUS, &regval);
-       if (BIT(port + 3) & regval)
-               return "Yes";
-       else
-               return "No";
+       return (BIT(port + 4) & poe_plus) ? "Yes" : "No";
  }
  
  static int tps23861_port_resistance(struct tps23861_data *data, int port)
        __le16 regval;
  
        regmap_bulk_read(data->regmap,
-                        PORT_1_RESISTANCE_LSB + PORT_N_RESISTANCE_LSB_OFFSET * (port - 1),
+                        PORT_1_RESISTANCE_LSB + PORT_N_RESISTANCE_LSB_OFFSET * port,
                         &regval,
                         2);
  
  static int tps23861_port_status_show(struct seq_file *s, void *data)
  {
        struct tps23861_data *priv = s->private;
-       int i;
-       for (i = 1; i < TPS23861_NUM_PORTS + 1; i++) {
-               seq_printf(s, "Port: \t\t%d\n", i);
-               seq_printf(s, "Operating mode: %s\n", tps23861_port_operating_mode(priv, i));
-               seq_printf(s, "Detected: \t%s\n", tps23861_port_detect_status(priv, i));
-               seq_printf(s, "Class: \t\t%s\n", tps23861_port_class_status(priv, i));
-               seq_printf(s, "PoE Plus: \t%s\n", tps23861_port_poe_plus_status(priv, i));
+       unsigned int i, mode, poe_plus, status;
+       regmap_read(priv->regmap, OPERATING_MODE, &mode);
+       regmap_read(priv->regmap, POE_PLUS, &poe_plus);
+       for (i = 0; i < TPS23861_NUM_PORTS; i++) {
+               regmap_read(priv->regmap, PORT_1_STATUS + i, &status);
+               seq_printf(s, "Port: \t\t%d\n", i + 1);
+               seq_printf(s, "Operating mode: %s\n", port_operating_mode_string(mode, i));
+               seq_printf(s, "Detected: \t%s\n", port_detect_status_string(status));
+               seq_printf(s, "Class: \t\t%s\n", port_class_status_string(status));
+               seq_printf(s, "PoE Plus: \t%s\n", port_poe_plus_status_string(poe_plus, i));
                seq_printf(s, "Resistance: \t%d\n", tps23861_port_resistance(priv, i));
                seq_putc(s, '\n');
        }
  
  DEFINE_SHOW_ATTRIBUTE(tps23861_port_status);
  
- static void tps23861_init_debugfs(struct tps23861_data *data)
+ static void tps23861_init_debugfs(struct tps23861_data *data,
+                                 struct device *hwmon_dev)
  {
-       data->debugfs_dir = debugfs_create_dir(data->client->name, NULL);
+       const char *debugfs_name;
+       debugfs_name = devm_kasprintf(&data->client->dev, GFP_KERNEL, "%s-%s",
+                                     data->client->name, dev_name(hwmon_dev));
+       if (!debugfs_name)
+               return;
+       data->debugfs_dir = debugfs_create_dir(debugfs_name, NULL);
  
        debugfs_create_file("port_status",
                            0400,
@@@ -585,16 -562,18 +562,16 @@@ static int tps23861_probe(struct i2c_cl
        if (IS_ERR(hwmon_dev))
                return PTR_ERR(hwmon_dev);
  
-       tps23861_init_debugfs(data);
+       tps23861_init_debugfs(data, hwmon_dev);
  
        return 0;
  }
  
 -static int tps23861_remove(struct i2c_client *client)
 +static void tps23861_remove(struct i2c_client *client)
  {
        struct tps23861_data *data = i2c_get_clientdata(client);
  
        debugfs_remove_recursive(data->debugfs_dir);
 -
 -      return 0;
  }
  
  static const struct of_device_id __maybe_unused tps23861_of_match[] = {
diff --combined drivers/hwmon/w83781d.c
index 55c78e12bbbe6e847ac3444c25494c3daaf8f003,35a847dfce68356888c50e5a5e28eeddba2e97da..dacabf25e83ff6e7df9e2b35211f15ecd4f53ead
@@@ -1171,7 -1171,7 +1171,7 @@@ w83781d_detect(struct i2c_client *clien
        if (isa)
                mutex_unlock(&isa->update_lock);
  
-       strlcpy(info->type, client_name, I2C_NAME_SIZE);
+       strscpy(info->type, client_name, I2C_NAME_SIZE);
  
        return 0;
  
@@@ -1239,7 -1239,7 +1239,7 @@@ static int w83781d_probe(struct i2c_cli
        return err;
  }
  
 -static int
 +static void
  w83781d_remove(struct i2c_client *client)
  {
        struct w83781d_data *data = i2c_get_clientdata(client);
  
        i2c_unregister_device(data->lm75[0]);
        i2c_unregister_device(data->lm75[1]);
 -
 -      return 0;
  }
  
  static int
diff --combined drivers/hwmon/w83791d.c
index 5fe5c93856afe95ecb75a869d8bc601dc52b6c0f,85ea408e28d1267763d6af6ae9581f726ae59e7a..eaf6913650231c4f078ccef4f9e7fe4aac3ca324
@@@ -315,7 -315,7 +315,7 @@@ struct w83791d_data 
  static int w83791d_probe(struct i2c_client *client);
  static int w83791d_detect(struct i2c_client *client,
                          struct i2c_board_info *info);
 -static int w83791d_remove(struct i2c_client *client);
 +static void w83791d_remove(struct i2c_client *client);
  
  static int w83791d_read(struct i2c_client *client, u8 reg);
  static int w83791d_write(struct i2c_client *client, u8 reg, u8 value);
@@@ -1333,7 -1333,7 +1333,7 @@@ static int w83791d_detect(struct i2c_cl
        if (val1 != 0x71 || val2 != 0x5c)
                return -ENODEV;
  
-       strlcpy(info->type, "w83791d", I2C_NAME_SIZE);
+       strscpy(info->type, "w83791d", I2C_NAME_SIZE);
  
        return 0;
  }
@@@ -1405,12 -1405,14 +1405,12 @@@ error4
        return err;
  }
  
 -static int w83791d_remove(struct i2c_client *client)
 +static void w83791d_remove(struct i2c_client *client)
  {
        struct w83791d_data *data = i2c_get_clientdata(client);
  
        hwmon_device_unregister(data->hwmon_dev);
        sysfs_remove_group(&client->dev.kobj, &w83791d_group);
 -
 -      return 0;
  }
  
  static void w83791d_init_client(struct i2c_client *client)
diff --combined drivers/hwmon/w83792d.c
index 2ee8ee4f0f1c4558e1a160483c9489dbc848f13a,2c766a9209dae8e8139dff272b3b751c18acde15..6d160eee1446077ea07b47433df477e4afba3985
@@@ -286,7 -286,7 +286,7 @@@ struct w83792d_data 
  static int w83792d_probe(struct i2c_client *client);
  static int w83792d_detect(struct i2c_client *client,
                          struct i2c_board_info *info);
 -static int w83792d_remove(struct i2c_client *client);
 +static void w83792d_remove(struct i2c_client *client);
  static struct w83792d_data *w83792d_update_device(struct device *dev);
  
  #ifdef DEBUG
@@@ -1346,7 -1346,7 +1346,7 @@@ w83792d_detect(struct i2c_client *clien
        if (val1 != 0x7a || val2 != 0x5c)
                return -ENODEV;
  
-       strlcpy(info->type, "w83792d", I2C_NAME_SIZE);
+       strscpy(info->type, "w83792d", I2C_NAME_SIZE);
  
        return 0;
  }
@@@ -1429,7 -1429,7 +1429,7 @@@ exit_remove_files
        return err;
  }
  
 -static int
 +static void
  w83792d_remove(struct i2c_client *client)
  {
        struct w83792d_data *data = i2c_get_clientdata(client);
        for (i = 0; i < ARRAY_SIZE(w83792d_group_fan); i++)
                sysfs_remove_group(&client->dev.kobj,
                                   &w83792d_group_fan[i]);
 -
 -      return 0;
  }
  
  static void
diff --combined drivers/hwmon/w83793.c
index daeaaded6b76c1783aa1b541f51324371335543e,0c59162a7bf510f6945a9adaeb52517e26329eee..a4926d907198c2cbc234531344e8507efedb4246
@@@ -285,7 -285,7 +285,7 @@@ static int w83793_write_value(struct i2
  static int w83793_probe(struct i2c_client *client);
  static int w83793_detect(struct i2c_client *client,
                         struct i2c_board_info *info);
 -static int w83793_remove(struct i2c_client *client);
 +static void w83793_remove(struct i2c_client *client);
  static void w83793_init_client(struct i2c_client *client);
  static void w83793_update_nonvolatile(struct device *dev);
  static struct w83793_data *w83793_update_device(struct device *dev);
@@@ -1495,7 -1495,7 +1495,7 @@@ static struct notifier_block watchdog_n
   * Init / remove routines
   */
  
 -static int w83793_remove(struct i2c_client *client)
 +static void w83793_remove(struct i2c_client *client)
  {
        struct w83793_data *data = i2c_get_clientdata(client);
        struct device *dev = &client->dev;
        mutex_lock(&watchdog_data_mutex);
        kref_put(&data->kref, w83793_release_resources);
        mutex_unlock(&watchdog_data_mutex);
 -
 -      return 0;
  }
  
  static int
@@@ -1634,7 -1636,7 +1634,7 @@@ static int w83793_detect(struct i2c_cli
        if (chip_id != 0x7b)
                return -ENODEV;
  
-       strlcpy(info->type, "w83793", I2C_NAME_SIZE);
+       strscpy(info->type, "w83793", I2C_NAME_SIZE);
  
        return 0;
  }
diff --combined drivers/hwmon/w83795.c
index b170cdf3c2bee58d7be0f9d519353ae6504a12a1,be5bb19e9afe8bf9a62363850e1c6372560e9d09..84ff5c57e98c28eab2cbeebc37756057d9d6ebd7
@@@ -1967,7 -1967,7 +1967,7 @@@ static int w83795_detect(struct i2c_cli
        else
                chip_name = "w83795g";
  
-       strlcpy(info->type, chip_name, I2C_NAME_SIZE);
+       strscpy(info->type, chip_name, I2C_NAME_SIZE);
        dev_info(&adapter->dev, "Found %s rev. %c at 0x%02hx\n", chip_name,
                 'A' + (device_id & 0xf), address);
  
@@@ -2235,12 -2235,14 +2235,12 @@@ exit_remove
        return err;
  }
  
 -static int w83795_remove(struct i2c_client *client)
 +static void w83795_remove(struct i2c_client *client)
  {
        struct w83795_data *data = i2c_get_clientdata(client);
  
        hwmon_device_unregister(data->hwmon_dev);
        w83795_handle_files(&client->dev, device_remove_file_wrapper);
 -
 -      return 0;
  }
  
  
index 99f68358378b2f9e38849d1159943dbb1b5d0366,56359350fd7fa91845a532eb3a6d4f4c48a4acf1..f3622de0d96fe224bf5c7376efd9dc31cfb0a4a7
@@@ -65,7 -65,7 +65,7 @@@ static const unsigned short normal_i2c[
  static int w83l785ts_probe(struct i2c_client *client);
  static int w83l785ts_detect(struct i2c_client *client,
                            struct i2c_board_info *info);
 -static int w83l785ts_remove(struct i2c_client *client);
 +static void w83l785ts_remove(struct i2c_client *client);
  static u8 w83l785ts_read_value(struct i2c_client *client, u8 reg, u8 defval);
  static struct w83l785ts_data *w83l785ts_update_device(struct device *dev);
  
@@@ -157,7 -157,7 +157,7 @@@ static int w83l785ts_detect(struct i2c_
                return -ENODEV;
        }
  
-       strlcpy(info->type, "w83l785ts", I2C_NAME_SIZE);
+       strscpy(info->type, "w83l785ts", I2C_NAME_SIZE);
  
        return 0;
  }
@@@ -203,7 -203,7 +203,7 @@@ exit_remove
        return err;
  }
  
 -static int w83l785ts_remove(struct i2c_client *client)
 +static void w83l785ts_remove(struct i2c_client *client)
  {
        struct w83l785ts_data *data = i2c_get_clientdata(client);
  
                           &sensor_dev_attr_temp1_input.dev_attr);
        device_remove_file(&client->dev,
                           &sensor_dev_attr_temp1_max.dev_attr);
 -
 -      return 0;
  }
  
  static u8 w83l785ts_read_value(struct i2c_client *client, u8 reg, u8 defval)
This page took 0.193257 seconds and 4 git commands to generate.