08 Oct, 2020

1 commit

  • * tag 'v5.4.70': (3051 commits)
    Linux 5.4.70
    netfilter: ctnetlink: add a range check for l3/l4 protonum
    ep_create_wakeup_source(): dentry name can change under you...
    ...

    Conflicts:
    arch/arm/mach-imx/pm-imx6.c
    arch/arm64/boot/dts/freescale/imx8mm-evk.dts
    arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts
    drivers/crypto/caam/caamalg.c
    drivers/gpu/drm/imx/dw_hdmi-imx.c
    drivers/gpu/drm/imx/imx-ldb.c
    drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
    drivers/mmc/host/sdhci-esdhc-imx.c
    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    drivers/net/ethernet/freescale/enetc/enetc.c
    drivers/net/ethernet/freescale/enetc/enetc_pf.c
    drivers/thermal/imx_thermal.c
    drivers/usb/cdns3/ep0.c
    drivers/xen/swiotlb-xen.c
    sound/soc/fsl/fsl_esai.c
    sound/soc/fsl/fsl_sai.c

    Signed-off-by: Jason Liu

    Jason Liu
     

10 Sep, 2020

1 commit

  • [ Upstream commit cecf7560f00a8419396a2ed0f6e5d245ccb4feac ]

    clang static analysis reports this representative problem

    applesmc.c:758:10: warning: 1st function call argument is an
    uninitialized value
    left = be16_to_cpu(*(__be16 *)(buffer + 6)) >> 2;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    buffer is filled by the earlier call

    ret = applesmc_read_key(LIGHT_SENSOR_LEFT_KEY, ...

    This problem is reported because a goto skips the status check.
    Other similar problems use data from applesmc_read_key before checking
    the status. So move the checks to before the use.

    Signed-off-by: Tom Rix
    Reviewed-by: Henrik Rydberg
    Link: https://lore.kernel.org/r/20200820131932.10590-1-trix@redhat.com
    Signed-off-by: Guenter Roeck
    Signed-off-by: Sasha Levin

    Tom Rix
     

03 Sep, 2020

1 commit

  • [ Upstream commit 8aebbbb2d573d0b4afc08b90ac7d73dba2d9da97 ]

    We hit a kernel panic due to a divide by 0 in nct7904_read_fan() for
    the hwmon_fan_min case. Extend the check to hwmon_fan_input case as well
    for safety.

    [ 1656.545650] divide error: 0000 [#1] SMP PTI
    [ 1656.545779] CPU: 12 PID: 18010 Comm: sensors Not tainted 5.4.47 #1
    [ 1656.546065] RIP: 0010:nct7904_read+0x1e9/0x510 [nct7904]
    ...
    [ 1656.546549] RAX: 0000000000149970 RBX: ffffbd6b86bcbe08 RCX: 0000000000000000
    ...
    [ 1656.547548] Call Trace:
    [ 1656.547665] hwmon_attr_show+0x32/0xd0 [hwmon]
    [ 1656.547783] dev_attr_show+0x18/0x50
    [ 1656.547898] sysfs_kf_seq_show+0x99/0x120
    [ 1656.548013] seq_read+0xd8/0x3e0
    [ 1656.548127] vfs_read+0x89/0x130
    [ 1656.548234] ksys_read+0x7d/0xb0
    [ 1656.548342] do_syscall_64+0x48/0x110
    [ 1656.548451] entry_SYSCALL_64_after_hwframe+0x44/0xa9

    Fixes: d65a5102a99f5 ("hwmon: (nct7904) Convert to use new hwmon registration API")
    Signed-off-by: Jason Baron
    Link: https://lore.kernel.org/r/1598026814-2604-1-git-send-email-jbaron@akamai.com
    Signed-off-by: Guenter Roeck
    Signed-off-by: Sasha Levin

    Jason Baron
     

29 Jul, 2020

4 commits

  • [ Upstream commit 3ce17cd2b94907f6d91b81b32848044b84c97606 ]

    SMATCH detected a potential buffer overflow in the manipulation of
    hwmon_attributes array inside the scmi_hwmon_probe function:

    drivers/hwmon/scmi-hwmon.c:226
    scmi_hwmon_probe() error: buffer overflow 'hwmon_attributes' 6
    Reviewed-by: Sudeep Holla
    Link: https://lore.kernel.org/r/20200715121338.GA18761@e119603-lin.cambridge.arm.com
    Signed-off-by: Guenter Roeck
    Signed-off-by: Sasha Levin

    Cristian Marussi
     
  • [ Upstream commit 8a03746c8baf82e1616f05a1a716d34378dcf780 ]

    Stefan Dietrich reports invalid temperature source messages on Asus Formula
    XII Z490.

    nct6775 nct6775.656: Invalid temperature source 28 at index 0,
    source register 0x100, temp register 0x73

    Debugging suggests that temperature source 28 reports the CPU temperature.
    Let's assume that temperature sources 28 and 29 reflect "PECI Agent {0,1}
    Calibration", similar to other chips of the series.

    Reported-by: Stefan Dietrich
    Cc: Stefan Dietrich
    Signed-off-by: Guenter Roeck
    Signed-off-by: Sasha Levin

    Guenter Roeck
     
  • [ Upstream commit 6d1d41c075a1a54ba03370e268171fec20e06563 ]

    Issue:
    When PEC is enabled, binding adm1272 to the adm1275 would
    fail due to PEC error. See below:
    adm1275: probe of xxxx failed with error -74

    Diagnosis:
    Per the datasheet of adm1272, adm1278, adm1293 and amd1294,
    PMON_CONFIG (0xd4) is 16bits wide. On the other hand,
    PMON_CONFIG (0xd4) for adm1275 is 8bits wide. The driver should not
    assume everything is 8bits wide and read only 8bits from it.

    Solution:
    If it is adm1272, adm1278, adm1293 and adm1294, use i2c_read_word.
    Else, use i2c_read_byte

    Testing:
    Binding adm1272 to the driver.
    The change is only tested on adm1272.

    Signed-off-by: Chu Lin
    Link: https://lore.kernel.org/r/20200709040612.3977094-1-linchuyuan@google.com
    Signed-off-by: Guenter Roeck
    Signed-off-by: Sasha Levin

    Chu Lin
     
  • [ Upstream commit bc4071aafcf4d0535ee423b69167696d6c03207d ]

    aspeed_create_fan() reads a pwm_port value using of_property_read_u32().
    If pwm_port will be more than ARRAY_SIZE(pwm_port_params), there will be
    a buffer overflow in
    aspeed_create_pwm_port()->aspeed_set_pwm_port_enable(). The patch fixes
    the potential buffer overflow.

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Evgeny Novikov
    Link: https://lore.kernel.org/r/20200703111518.9644-1-novikov@ispras.ru
    Signed-off-by: Guenter Roeck
    Signed-off-by: Sasha Levin

    Evgeny Novikov
     

22 Jul, 2020

1 commit

  • commit 14b0e83dc4f1e52b94acaeb85a18fd7fdd46d2dc upstream.

    This patch fixes a bug which does not let FAN mode to be changed from
    sysfs(pwm1_enable). i.e pwm1_enable can not be set to 3, it will always
    remain at 0.

    This is caused because the device driver handles the result of
    "read_u8_from_i2c(client, REG_FAN_CONF1, &conf_reg)" incorrectly. The
    driver thinks an error has occurred if the (result != 0). This has been
    fixed by changing the condition to (result < 0).

    Signed-off-by: Vishwas M
    Link: https://lore.kernel.org/r/20200707142747.118414-1-vishwas.reddy.vr@gmail.com
    Fixes: 9df7305b5a86 ("hwmon: Add driver for SMSC EMC2103 temperature monitor and fan controller")
    Cc: stable@vger.kernel.org
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Vishwas M
     

09 Jul, 2020

2 commits

  • [ Upstream commit 8b97f9922211c44a739c5cbd9502ecbb9f17f6d1 ]

    Although it rarely happens, we should call free_capabilities()
    if error happens after read_capabilities() to free allocated strings.

    Fixes: de584afa5e188 ("hwmon driver for ACPI 4.0 power meters")
    Signed-off-by: Misono Tomohiro
    Link: https://lore.kernel.org/r/20200625043242.31175-1-misono.tomohiro@jp.fujitsu.com
    Signed-off-by: Guenter Roeck
    Signed-off-by: Sasha Levin

    Misono Tomohiro
     
  • [ Upstream commit 016983d138cbe99a5c0aaae0103ee88f5300beb3 ]

    Per the datasheet for max6697, OVERT mask and ALERT mask are different.
    For example, the 7th bit of OVERT is the local channel but for alert
    mask, the 6th bit is the local channel. Therefore, we can't apply the
    same mask for both registers. In addition to that, the max6697 driver
    is supposed to be compatibale with different models. I manually went over
    all the listed chips and made sure all chip types have the same layout.

    Testing;
    mask value of 0x9 should map to 0x44 for ALERT and 0x84 for OVERT.
    I used iotool to read the reg value back to verify. I only tested this
    change on max6581.

    Reference:
    https://datasheets.maximintegrated.com/en/ds/MAX6581.pdf
    https://datasheets.maximintegrated.com/en/ds/MAX6697.pdf
    https://datasheets.maximintegrated.com/en/ds/MAX6699.pdf

    Signed-off-by: Chu Lin
    Fixes: 5372d2d71c46e ("hwmon: Driver for Maxim MAX6697 and compatibles")
    Signed-off-by: Guenter Roeck
    Signed-off-by: Sasha Levin

    Chu Lin
     

22 Jun, 2020

1 commit

  • commit 279f0b3a4b80660fba6faadc2ca2fa426bf3f7e9 upstream.

    Add support for retrieving Tdie and Tctl on AMD Renoir (4000-series
    Ryzen CPUs).

    It appears SMU offsets for reading current/voltage and CCD temperature
    have changed for this generation (reads from currently used offsets
    yield zeros), so those features cannot be enabled so trivially.

    Signed-off-by: Alexander Monakov
    Signed-off-by: Borislav Petkov
    Acked-by: Guenter Roeck
    Link: https://lkml.kernel.org/r/20200510204842.2603-3-amonakov@ispras.ru
    Signed-off-by: Greg Kroah-Hartman

    Alexander Monakov
     

19 Jun, 2020

1 commit

  • * tag 'v5.4.47': (2193 commits)
    Linux 5.4.47
    KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
    KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception
    ...

    Conflicts:
    arch/arm/boot/dts/imx6qdl.dtsi
    arch/arm/mach-imx/Kconfig
    arch/arm/mach-imx/common.h
    arch/arm/mach-imx/suspend-imx6.S
    arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
    arch/powerpc/include/asm/cacheflush.h
    drivers/cpufreq/imx6q-cpufreq.c
    drivers/dma/imx-sdma.c
    drivers/edac/synopsys_edac.c
    drivers/firmware/imx/imx-scu.c
    drivers/net/ethernet/freescale/fec.h
    drivers/net/ethernet/freescale/fec_main.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
    drivers/net/phy/phy_device.c
    drivers/perf/fsl_imx8_ddr_perf.c
    drivers/usb/cdns3/gadget.c
    drivers/usb/dwc3/gadget.c
    include/uapi/linux/dma-buf.h

    Signed-off-by: Jason Liu

    Jason Liu
     

03 Jun, 2020

1 commit

  • [ Upstream commit 7b2fd270af27edaf02acb41a7babe805a9441914 ]

    The format of temperature limitation registers are 8-bit 2's complement
    and the range is -128~127.
    Converts the reading value to signed char to fix the incorrect range
    of temperature limitation registers.

    Signed-off-by: Amy Shih
    Signed-off-by: Guenter Roeck
    Signed-off-by: Sasha Levin

    Amy Shih
     

20 May, 2020

1 commit

  • [ Upstream commit 333e22db228f0bd0c839553015a6a8d3db4ba569 ]

    When tsi-as-adc is configured it is possible for in7[0123]_input read to
    return an incorrect value if a concurrent read to in[456]_input is
    performed. This is caused by a concurrent manipulation of the mux
    channel without proper locking as hwmon and mfd use different locks for
    synchronization.

    Switch hwmon to use the same lock as mfd when accessing the TSI channel.

    Fixes: 4f16cab19a3d5 ("hwmon: da9052: Add support for TSI channel")
    Signed-off-by: Samu Nuutamo
    [rebase to current master, reword commit message slightly]
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Guenter Roeck
    Signed-off-by: Sasha Levin

    Samu Nuutamo
     

02 May, 2020

1 commit

  • [ Upstream commit c843b382e61b5f28a3d917712c69a344f632387c ]

    The jc42 driver passes I2C client's name as hwmon device name. In case
    of device tree probed devices this ends up being part of the compatible
    string, "jc-42.4-temp". This name contains hyphens and the hwmon core
    doesn't like this:

    jc42 2-0018: hwmon: 'jc-42.4-temp' is not a valid name attribute, please fix

    This changes the name to "jc42" which doesn't have any illegal
    characters.

    Signed-off-by: Sascha Hauer
    Link: https://lore.kernel.org/r/20200417092853.31206-1-s.hauer@pengutronix.de
    Signed-off-by: Guenter Roeck
    Signed-off-by: Sasha Levin

    Sascha Hauer
     

12 Mar, 2020

1 commit

  • commit 44f2f882909fedfc3a56e4b90026910456019743 upstream.

    This is only called from adt7462_update_device(). The caller expects it
    to return zero on error. I fixed a similar issue earlier in commit
    a4bf06d58f21 ("hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0")
    but I missed this one.

    Fixes: c0b4e3ab0c76 ("adt7462: new hwmon driver")
    Signed-off-by: Dan Carpenter
    Reviewed-by: Darrick J. Wong
    Link: https://lore.kernel.org/r/20200303101608.kqjwfcazu2ylhi2a@kili.mountain
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     

08 Mar, 2020

1 commit

  • Merge Linux stable release v5.4.24 into imx_5.4.y

    * tag 'v5.4.24': (3306 commits)
    Linux 5.4.24
    blktrace: Protect q->blk_trace with RCU
    kvm: nVMX: VMWRITE checks unsupported field before read-only field
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm/boot/dts/imx6sll-evk.dts
    arch/arm/boot/dts/imx7ulp.dtsi
    arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
    drivers/clk/imx/clk-composite-8m.c
    drivers/gpio/gpio-mxc.c
    drivers/irqchip/Kconfig
    drivers/mmc/host/sdhci-of-esdhc.c
    drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
    drivers/net/can/flexcan.c
    drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
    drivers/net/ethernet/mscc/ocelot.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
    drivers/net/phy/realtek.c
    drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
    drivers/perf/fsl_imx8_ddr_perf.c
    drivers/tee/optee/shm_pool.c
    drivers/usb/cdns3/gadget.c
    kernel/sched/cpufreq.c
    net/core/xdp.c
    sound/soc/fsl/fsl_esai.c
    sound/soc/fsl/fsl_sai.c
    sound/soc/sof/core.c
    sound/soc/sof/imx/Kconfig
    sound/soc/sof/loader.c

    Jason Liu
     

20 Feb, 2020

1 commit

  • commit cf2b012c90e74e85d8aea7d67e48868069cfee0c upstream.

    Change 21537dc driver PMBus polling of MFR_COMMON from bits 5/4 to
    bits 6/5. This fixs a LTC297X family bug where polling always returns
    not busy even when the part is busy. This fixes a LTC388X and
    LTM467X bug where polling used PEND and NOT_IN_TRANS, and BUSY was
    not polled, which can lead to NACKing of commands. LTC388X and
    LTM467X modules now poll BUSY and PEND, increasing reliability by
    eliminating NACKing of commands.

    Signed-off-by: Mike Jones
    Link: https://lore.kernel.org/r/1580234400-2829-2-git-send-email-michael-a1.jones@analog.com
    Fixes: e04d1ce9bbb49 ("hwmon: (ltc2978) Add polling for chips requiring it")
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Mike Jones
     

29 Jan, 2020

4 commits

  • commit e51a7dda299815e92f43960d620cdfc8dfc144f2 upstream.

    No alarm is reported by /sys/.../inX_alarm

    In detail:

    The SMI Voltage status register is the only register giving a status
    for voltages, but it does not work like the non-SMI status registers
    used for temperatures and fans.
    A bit is set for each input crossing a threshold, in both direction,
    but the "inside" or "outside" limits info is not available.
    Also this register is cleared on read.
    Note : this is not explicitly spelled out in the datasheet, but from
    experiment.
    As a result if an input is crossing a threshold (min or max in any
    direction), the alarm is reported only once even if the input is
    still outside limits. Also if the alarm for another input is read
    before the one of this input, no alarm is reported at all.

    Signed-off-by: Gilles Buloz
    Link: https://lore.kernel.org/r/5de0f566.tBga5POKAgHlmd0p%gilles.buloz@kontron.com
    Fixes: 3434f3783580 ("hwmon: Driver for Nuvoton NCT7802Y")
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Gilles Buloz
     
  • commit 7713e62c8623c54dac88d1fa724aa487a38c3efb upstream.

    in0 thresholds are written to the in2 thresholds registers
    in2 thresholds to in3 thresholds
    in3 thresholds to in4 thresholds
    in4 thresholds to in0 thresholds

    Signed-off-by: Gilles Buloz
    Link: https://lore.kernel.org/r/5de0f509.rc0oEvPOMjbfPW1w%gilles.buloz@kontron.com
    Fixes: 3434f3783580 ("hwmon: Driver for Nuvoton NCT7802Y")
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Gilles Buloz
     
  • commit 3bf8bdcf3bada771eb12b57f2a30caee69e8ab8d upstream.

    The hwmon core uses device managed functions, tied to the hwmon parent
    device, for various internal memory allocations. This is problematic
    since hwmon device lifetime does not necessarily match its parent's
    device lifetime. If there is a mismatch, memory leaks will accumulate
    until the parent device is released.

    Fix the problem by managing all memory allocations internally. The only
    exception is memory allocation for thermal device registration, which
    can be tied to the hwmon device, along with thermal device registration
    itself.

    Fixes: d560168b5d0f ("hwmon: (core) New hwmon registration API")
    Cc: stable@vger.kernel.org # v4.14.x: 47c332deb8e8: hwmon: Deal with errors from the thermal subsystem
    Cc: stable@vger.kernel.org # v4.14.x: 74e3512731bd: hwmon: (core) Fix double-free in __hwmon_device_register()
    Cc: stable@vger.kernel.org # v4.9.x: 3a412d5e4a1c: hwmon: (core) Simplify sysfs attribute name allocation
    Cc: stable@vger.kernel.org # v4.9.x: 47c332deb8e8: hwmon: Deal with errors from the thermal subsystem
    Cc: stable@vger.kernel.org # v4.9.x: 74e3512731bd: hwmon: (core) Fix double-free in __hwmon_device_register()
    Cc: stable@vger.kernel.org # v4.9+
    Cc: Martin K. Petersen
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Guenter Roeck
     
  • commit cf3ca1877574a306c0207cbf7fdf25419d9229df upstream.

    reg2volt returns the voltage that matches a given register value.
    Converting this back the other way with volt2reg didn't return the same
    register value because it used truncation instead of rounding.

    This meant that values read from sysfs could not be written back to sysfs
    to set back the same register value.

    With this change, volt2reg will return the same value for every voltage
    previously returned by reg2volt (for the set of possible input values)

    Signed-off-by: Luuk Paulussen
    Link: https://lore.kernel.org/r/20191205231659.1301-1-luuk.paulussen@alliedtelesis.co.nz
    cc: stable@vger.kernel.org
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Luuk Paulussen
     

23 Jan, 2020

2 commits

  • commit 92b39ad440968bab38eb6577d63c12994601ed94 upstream.

    The LED blink_set function incorrectly did not tell the PSU LED to blink
    if brightness was LED_OFF. Fix this, and also correct the LED_OFF
    command data, which should give control of the LED back to the PSU
    firmware. Also prevent I2C failures from getting the driver LED state
    out of sync and add some dev_dbg statements.

    Signed-off-by: Eddie James
    Link: https://lore.kernel.org/r/20191106200106.29519-3-eajames@linux.ibm.com
    Fixes: ef9e1cdf419a3 ("hwmon: (pmbus/cffps) Add led class device for power supply fault led")
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Eddie James
     
  • commit 9861ff954c7e83e2f738ce16fbe15f8a1e121771 upstream.

    Since i2c_smbus functions can sleep, the brightness setting function
    for this driver must be the blocking version to avoid scheduling while
    atomic.

    Signed-off-by: Eddie James
    Link: https://lore.kernel.org/r/20191106200106.29519-2-eajames@linux.ibm.com
    Fixes: ef9e1cdf419a3 ("hwmon: (pmbus/cffps) Add led class device for power supply fault led")
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Eddie James
     

02 Dec, 2019

1 commit

  • * sensor/next: (29 commits)
    LF-99 hwmon: mag3110: correct processing order after probe error
    MLK-22296-4 misc: mpl3115: Fix build warning when CONFIG_PM_SLEEP=n
    MLK-17061-1 sensor: set sensor interrupt pins as open-drain
    hwmon: mma8451: Add regulator_disable to avoid WARN_ON
    hwmon: mag3110: Add regulator_disable to avoid WARN_ON
    ...

    Dong Aisheng
     

25 Nov, 2019

10 commits


29 Oct, 2019

1 commit

  • After introducing "samples" to the calculation of wait time, the
    driver might timeout at the regmap_field_read_poll_timeout call,
    because the wait time could be longer than the 100000 usec limit
    due to a large "samples" number.

    So this patch sets the timeout limit to 2 times of the wait time
    in order to fix this issue.

    Fixes: 5c090abf945b ("hwmon: (ina3221) Add averaging mode support")
    Signed-off-by: Nicolin Chen
    Link: https://lore.kernel.org/r/20191022005922.30239-1-nicoleotsuka@gmail.com
    Signed-off-by: Guenter Roeck

    Nicolin Chen
     

21 Oct, 2019

1 commit

  • … nct7904_data struct.

    Voltage sensors overlap with external temperature sensors. Detect
    the multi-function of voltage, thermal diode, thermistor and
    reserved from register VT_ADC_MD_REG to set value of vsen_mask &
    tcpu_mask & temp_mode in nct7904_data struct. If the value is
    reserved, needs to disable the vsen_mask & tcpu_mask.

    Signed-off-by: amy.shih <amy.shih@advantech.com.tw>
    Link: https://lore.kernel.org/r/20191014082451.2895-1-Amy.Shih@advantech.com.tw
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>

    amy.shih
     

02 Oct, 2019

2 commits

  • SMI# interrupt for fan and voltage is Two-Times Interrupt Mode.
    Fan or voltage exceeds high limit or going below low limit,
    it will causes an interrupt if the previous interrupt has been
    reset by reading all the interrupt Status Register. Thus, add the
    array fan_alarm and vsen_alarm to store the alarms for all of the
    fan and voltage sensors.

    Signed-off-by: amy.shih
    Link: https://lore.kernel.org/r/20190919030205.11440-1-Amy.Shih@advantech.com.tw
    Fixes: 486842db3b79 ("hwmon: (nct7904) Add extra sysfs support for fan, voltage and temperature.")
    Signed-off-by: Guenter Roeck

    amy.shih
     
  • Voltage sensors overlap with external temperature sensors. Detect
    the multi-function of voltage, thermal diode and thermistor from
    register VT_ADC_MD_REG to set value of vsen_mask in nct7904_data
    struct.

    Signed-off-by: amy.shih
    Link: https://lore.kernel.org/r/20190918084801.9859-1-Amy.Shih@advantech.com.tw
    Signed-off-by: Guenter Roeck

    amy.shih
     

23 Sep, 2019

1 commit

  • Pull MIPS updates from Paul Burton:
    "Main MIPS changes:

    - boot_mem_map is removed, providing a nice cleanup made possible by
    the recent removal of bootmem.

    - Some fixes to atomics, in general providing compiler barriers for
    smp_mb__{before,after}_atomic plus fixes specific to Loongson CPUs
    or MIPS32 systems using cmpxchg64().

    - Conversion to the new generic VDSO infrastructure courtesy of
    Vincenzo Frascino.

    - Removal of undefined behavior in set_io_port_base(), fixing the
    behavior of some MIPS kernel configurations when built with recent
    clang versions.

    - Initial MIPS32 huge page support, functional on at least Ingenic
    SoCs.

    - pte_special() is now supported for some configurations, allowing
    among other things generic fast GUP to be used.

    - Miscellaneous fixes & cleanups.

    And platform specific changes:

    - Major improvements to Ingenic SoC support from Paul Cercueil,
    mostly enabled by the inclusion of the new TCU (timer-counter unit)
    drivers he's spent a very patient year or so working on. Plus some
    fixes for X1000 SoCs from Zhou Yanjie.

    - Netgear R6200 v1 systems are now supported by the bcm47xx platform.

    - DT updates for BMIPS, Lantiq & Microsemi Ocelot systems"

    * tag 'mips_5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (89 commits)
    MIPS: Detect bad _PFN_SHIFT values
    MIPS: Disable pte_special() for MIPS32 with RiXi
    MIPS: ralink: deactivate PCI support for SOC_MT7621
    mips: compat: vdso: Use legacy syscalls as fallback
    MIPS: Drop Loongson _CACHE_* definitions
    MIPS: tlbex: Remove cpu_has_local_ebase
    MIPS: tlbex: Simplify r3k check
    MIPS: Select R3k-style TLB in Kconfig
    MIPS: PCI: refactor ioc3 special handling
    mips: remove ioremap_cachable
    mips/atomic: Fix smp_mb__{before,after}_atomic()
    mips/atomic: Fix loongson_llsc_mb() wreckage
    mips/atomic: Fix cmpxchg64 barriers
    MIPS: Octeon: remove duplicated include from dma-octeon.c
    firmware: bcm47xx_nvram: Allow COMPILE_TEST
    firmware: bcm47xx_nvram: Correct size_t printf format
    MIPS: Treat Loongson Extensions as ASEs
    MIPS: Remove dev_err() usage after platform_get_irq()
    MIPS: dts: mscc: describe the PTP ready interrupt
    MIPS: dts: mscc: describe the PTP register range
    ...

    Linus Torvalds