14 Aug, 2014

1 commit

  • Pull hwmon fixes from Guenter Roeck:
    "Several bug fixes in various drivers, plus a minor cleanup in the
    tmp103 driver"

    * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
    hwmon: (tmp103) Remove duplicate test for I2C_FUNC_SMBUS_BYTE_DATA functionality
    hwmon: (w83793) Fix vrm write operation
    hwmon: (w83791d) Fix vrm write operation
    hwmon: (w83627hf) Fix vrm write operation
    hwmon: (vt1211) Fix vrm write operation
    hwmon: (pc87360) Fix vrm write operation
    hwmon: (lm87) Fix vrm write operation
    hwmon: (asb100) Fix vrm write operation
    hwmon: (adm1026) Fix vrm write operation
    hwmon: (adm1025) Fix vrm write operation
    hwmon: (hih6130) Fix missing hih6130->write_length setting
    hwmon: (dme1737) Prevent overflow problem when writing large limits
    hwmon: (emc6w201) Fix temperature limit range
    hwmon: (ads1015) Fix out-of-bounds array access
    hwmon: (lm92) Prevent overflow problem when writing large limits

    Linus Torvalds
     

10 Aug, 2014

1 commit

  • Since commit b42261078a91 ("regmap: i2c: fallback to SMBus if the adapter
    does not support standard I2C"), regmap-i2c will check the
    I2C_FUNC_SMBUS_[BYTE|WORD]_DATA functionality based on the regmap_config
    setting if the adapter does not support standard I2C.

    So remove the I2C_FUNC_SMBUS_BYTE_DATA functionality check in the driver code.

    Signed-off-by: Axel Lin
    Signed-off-by: Guenter Roeck

    Axel Lin
     

07 Aug, 2014

1 commit


06 Aug, 2014

15 commits

  • vrm is an u8, so the written value needs to be limited to [0, 255].

    Signed-off-by: Axel Lin
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • vrm is an u8, so the written value needs to be limited to [0, 255].

    Signed-off-by: Axel Lin
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • vrm is an u8, so the written value needs to be limited to [0, 255].

    Signed-off-by: Axel Lin
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • vrm is an u8, so the written value needs to be limited to [0, 255].

    Signed-off-by: Axel Lin
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • vrm is an u8, so the written value needs to be limited to [0, 255].

    Signed-off-by: Axel Lin
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • vrm is an u8, so the written value needs to be limited to [0, 255].

    Signed-off-by: Axel Lin
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • vrm is an u8, so the written value needs to be limited to [0, 255].

    Signed-off-by: Axel Lin
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • vrm is an u8, so the written value needs to be limited to [0, 255].

    Signed-off-by: Axel Lin
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • vrm is an u8, so the written value needs to be limited to [0, 255].

    Signed-off-by: Axel Lin
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • The hih6130->write_length setting was accidently removed by commit
    ebc6b9383f3e "hwmon: (hih6130) Convert to devm_hwmon_device_register_with_groups",
    fix it.

    Signed-off-by: Axel Lin
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • On platforms with sizeof(int) < sizeof(long), writing a temperature
    limit larger than MAXINT will result in unpredictable limit values
    written to the chip. Avoid auto-conversion from long to int to fix
    the problem.

    Voltage limits, fan minimum speed, pwm frequency, pwm ramp rate, and
    other attributes have the same problem, fix them as well.

    Zone temperature limits are signed, but were cached as u8, causing
    unepected values to be reported for negative temperatures. Cache as
    s8 to fix the problem.

    vrm is an u8, so the written value needs to be limited to [0, 255].

    Signed-off-by: Axel Lin
    [Guenter Roeck: Fix zone temperature cache]
    Cc: stable@vger.kernel.org
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • Temperature limit range is [-127, 127], not [-127, 128].
    The wrong range caused a bad limit to be written into the chip
    if the limit was set to a value of 128 degrees C or above.

    Also use DIV_ROUND_CLOSEST instead of a plain divide operation
    to reduce the rounding error when writing temperature limits.

    Signed-off-by: Guenter Roeck
    Reviewed-by: Jean Delvare

    Guenter Roeck
     
  • Current code uses data_rate as array index in ads1015_read_adc() and uses pga
    as array index in ads1015_reg_to_mv, so we must make sure both data_rate and
    pga settings are in valid value range.
    Return -EINVAL if the setting is out-of-range.

    Signed-off-by: Axel Lin
    Cc: stable@vger.kernel.org
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • On platforms with sizeof(int) < sizeof(long), writing a temperature
    limit larger than MAXINT will result in unpredictable limit values
    written to the chip. Avoid auto-conversion from long to int to fix
    the problem.

    The hysteresis temperature range depends on the value of
    data->temp[attr->index], since val is subtracted from it.
    Use a wider clamp, [-120000, 220000] should do to cover the
    possible range. Also add missing TEMP_TO_REG() on writes into
    cached hysteresis value.

    Also uses clamp_val to simplify the code a bit.

    Signed-off-by: Axel Lin
    [Guenter Roeck: Fixed double TEMP_TO_REG on hysteresis updates]
    Cc: stable@vger.kernel.org
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • Pull timer and time updates from Thomas Gleixner:
    "A rather large update of timers, timekeeping & co

    - Core timekeeping code is year-2038 safe now for 32bit machines.
    Now we just need to fix all in kernel users and the gazillion of
    user space interfaces which rely on timespec/timeval :)

    - Better cache layout for the timekeeping internal data structures.

    - Proper nanosecond based interfaces for in kernel users.

    - Tree wide cleanup of code which wants nanoseconds but does hoops
    and loops to convert back and forth from timespecs. Some of it
    definitely belongs into the ugly code museum.

    - Consolidation of the timekeeping interface zoo.

    - A fast NMI safe accessor to clock monotonic for tracing. This is a
    long standing request to support correlated user/kernel space
    traces. With proper NTP frequency correction it's also suitable
    for correlation of traces accross separate machines.

    - Checkpoint/restart support for timerfd.

    - A few NOHZ[_FULL] improvements in the [hr]timer code.

    - Code move from kernel to kernel/time of all time* related code.

    - New clocksource/event drivers from the ARM universe. I'm really
    impressed that despite an architected timer in the newer chips SoC
    manufacturers insist on inventing new and differently broken SoC
    specific timers.

    [ Ed. "Impressed"? I don't think that word means what you think it means ]

    - Another round of code move from arch to drivers. Looks like most
    of the legacy mess in ARM regarding timers is sorted out except for
    a few obnoxious strongholds.

    - The usual updates and fixlets all over the place"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (114 commits)
    timekeeping: Fixup typo in update_vsyscall_old definition
    clocksource: document some basic timekeeping concepts
    timekeeping: Use cached ntp_tick_length when accumulating error
    timekeeping: Rework frequency adjustments to work better w/ nohz
    timekeeping: Minor fixup for timespec64->timespec assignment
    ftrace: Provide trace clocks monotonic
    timekeeping: Provide fast and NMI safe access to CLOCK_MONOTONIC
    seqcount: Add raw_write_seqcount_latch()
    seqcount: Provide raw_read_seqcount()
    timekeeping: Use tk_read_base as argument for timekeeping_get_ns()
    timekeeping: Create struct tk_read_base and use it in struct timekeeper
    timekeeping: Restructure the timekeeper some more
    clocksource: Get rid of cycle_last
    clocksource: Move cycle_last validation to core code
    clocksource: Make delta calculation a function
    wireless: ath9k: Get rid of timespec conversions
    drm: vmwgfx: Use nsec based interfaces
    drm: i915: Use nsec based interfaces
    timekeeping: Provide ktime_get_raw()
    hangcheck-timer: Use ktime_get_ns()
    ...

    Linus Torvalds
     

05 Aug, 2014

2 commits


04 Aug, 2014

20 commits