28 Mar, 2016

1 commit

  • arm:pxa_defconfig can result in the following crash if the max1111 driver
    is not instantiated.

    Unhandled fault: page domain fault (0x01b) at 0x00000000
    pgd = c0004000
    [00000000] *pgd=00000000
    Internal error: : 1b [#1] PREEMPT ARM
    Modules linked in:
    CPU: 0 PID: 300 Comm: kworker/0:1 Not tainted 4.5.0-01301-g1701f680407c #10
    Hardware name: SHARP Akita
    Workqueue: events sharpsl_charge_toggle
    task: c390a000 ti: c391e000 task.ti: c391e000
    PC is at max1111_read_channel+0x20/0x30
    LR is at sharpsl_pm_pxa_read_max1111+0x2c/0x3c
    pc : [] lr : [] psr: 20000013
    ...
    [] (max1111_read_channel) from []
    (sharpsl_pm_pxa_read_max1111+0x2c/0x3c)
    [] (sharpsl_pm_pxa_read_max1111) from []
    (spitzpm_read_devdata+0x5c/0xc4)
    [] (spitzpm_read_devdata) from []
    (sharpsl_check_battery_temp+0x78/0x110)
    [] (sharpsl_check_battery_temp) from []
    (sharpsl_charge_toggle+0x48/0x110)
    [] (sharpsl_charge_toggle) from []
    (process_one_work+0x14c/0x48c)
    [] (process_one_work) from [] (worker_thread+0x3c/0x5d4)
    [] (worker_thread) from [] (kthread+0xd0/0xec)
    [] (kthread) from [] (ret_from_fork+0x14/0x24)

    This can occur because the SPI controller driver (SPI_PXA2XX) is built as
    module and thus not necessarily loaded. While building SPI_PXA2XX into the
    kernel would make the problem disappear, it appears prudent to ensure that
    the driver is instantiated before accessing its data structures.

    Cc: Arnd Bergmann
    Cc: stable@vger.kernel.org
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

21 Mar, 2016

1 commit

  • Pull ARM SoC driver updates from Arnd Bergmann:
    "Driver updates for ARM SoCs, these contain various things that touch
    the drivers/ directory but got merged through arm-soc for practical
    reasons:

    - Rockchip rk3368 gains power domain support
    - Small updates for the ARM spmi driver
    - The Atmel PMC driver saw a larger rework, touching both
    arch/arm/mach-at91 and drivers/clk/at91
    - All reset controller driver changes alway get merged through
    arm-soc, though this time the largest change is the addition of a
    MIPS pistachio reset driver
    - One bugfix for the NXP (formerly Freescale) i.MX weim bus driver"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (43 commits)
    bus: imx-weim: Take the 'status' property value into account
    clk: at91: remove useless includes
    clk: at91: pmc: remove useless capacities handling
    clk: at91: pmc: drop at91_pmc_base
    usb: gadget: atmel: access the PMC using regmap
    ARM: at91: remove useless includes and function prototypes
    ARM: at91: pm: move idle functions to pm.c
    ARM: at91: pm: find and remap the pmc
    ARM: at91: pm: simply call at91_pm_init
    clk: at91: pmc: move pmc structures to C file
    clk: at91: pmc: merge at91_pmc_init in atmel_pmc_probe
    clk: at91: remove IRQ handling and use polling
    clk: at91: make use of syscon/regmap internally
    clk: at91: make use of syscon to share PMC registers in several drivers
    hwmon: (scpi) add energy meter support
    firmware: arm_scpi: add support for 64-bit sensor values
    firmware: arm_scpi: decrease Tx timeout to 20ms
    firmware: arm_scpi: fix send_message and sensor_get_value for big-endian
    reset: sti: Make reset_control_ops const
    reset: zynq: Make reset_control_ops const
    ...

    Linus Torvalds
     

09 Mar, 2016

1 commit

  • Create a driver to support the hardware monitoring chip present in
    the Zyxel NSA320 and some of the other Zyxel NAS devices.

    The driver reads fan speed and temperature from a suitably
    pre-programmed MCU on the device.

    Signed-off-by: Adam Baker
    [groeck: Dropped .owner field initialization]
    Signed-off-by: Guenter Roeck

    Adam Baker
     

05 Mar, 2016

5 commits

  • ADM1278 is mostly compatible to other chips of the same series.
    Besides the usual difference in coefficients, it supports
    a temperature sensor, and it can measure both input and output
    voltage at the same time.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • This patch adds support for the Murata NCP15XH103 thermistor series.

    Signed-off-by: Joseph McNally
    Signed-off-by: Guenter Roeck

    Joseph McNally
     
  • Currently the driver calls hwmon_device_register_with_groups which
    does not accept hypen in node name and returns EINVAL. Use of hypen
    in device tree node name results in probe failure., however use of
    hypen in device tree node name is perfectly acceptable.

    Change this by allocating a duplicate managed string, replacing
    hypen with underscore and then calling hwmon_device_register_with_groups.
    This allows the use of hypen in device tree node name while maintaining
    backwards compatibility and preventing any possible regressions with
    user space.

    Signed-off-by: Sanchayan Maity
    Signed-off-by: Guenter Roeck

    Sanchayan Maity
     
  • This adds support for the Linear Technology LTC2990 I2C System Monitor.
    The LTC2990 supports a combination of voltage, current and temperature
    monitoring. This driver currently only supports reading two currents
    by measuring two differential voltages across series resistors, in
    addition to the Vcc supply voltage and internal temperature.

    This is sufficient to support the Topic Miami SOM which uses this chip
    to monitor the currents flowing into the FPGA and the CPU parts.

    Signed-off-by: Mike Looijmans
    Signed-off-by: Guenter Roeck

    Mike Looijmans
     
  • The vexpress hwmon implementation is currently just called vexpress.
    This is a problem because it clashes with another module with the same
    name in regulators.

    This patch renames the vexpress hwmon implementation to vexpress-hwmon
    so that there will be no clash in the module namespace.

    Cc: Liviu Dudau
    Cc: Lorenzo Pieralisi
    Cc: Jean Delvare
    Cc: Guenter Roeck
    Cc: lm-sensors@lm-sensors.org
    Reported-by: Rusty Russell
    Signed-off-by: Sudeep Holla
    Signed-off-by: Guenter Roeck

    Sudeep Holla
     

25 Feb, 2016

1 commit

  • …it/sudeep.holla/linux into next/drivers

    SCPI updates and fixes for v4.6

    1. Minor fix to restore functionality in big-endian mode

    2. Fix race by decreasing Tx timeout to 20ms

    3. Adds support for 64-bit sensor values and energy meter

    * tag 'scpi-for-v4.6/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
    hwmon: (scpi) add energy meter support
    firmware: arm_scpi: add support for 64-bit sensor values
    firmware: arm_scpi: decrease Tx timeout to 20ms
    firmware: arm_scpi: fix send_message and sensor_get_value for big-endian

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     

20 Feb, 2016

1 commit

  • Thermal hook gpio_fan_get_cur_state is only interested in knowing
    the current speed index that was setup in the system, this is
    already available as part of fan_data->speed_index which is always
    set by set_fan_speed. Using get_fan_speed_index is useful when we
    have no idea about the fan speed configuration (for example during
    fan_ctrl_init).

    When thermal framework invokes
    gpio_fan_get_cur_state=>get_fan_speed_index via gpio_fan_get_cur_state
    especially in a polled configuration for thermal governor, we
    basically hog the i2c interface to the extent that other functions
    fail to get any traffic out :(.

    Instead, just provide the last state set in the driver - since the gpio
    fan driver is responsible for the fan state immaterial of override, the
    fan_data->speed_index should accurately reflect the state.

    Fixes: b5cf88e46bad ("(gpio-fan): Add thermal control hooks")
    Reported-by: Tony Lindgren
    Cc: Guenter Roeck
    Cc: Eduardo Valentin
    Signed-off-by: Nishanth Menon
    Cc: stable@vger.kernel.org
    Signed-off-by: Guenter Roeck

    Nishanth Menon
     

19 Feb, 2016

1 commit


16 Feb, 2016

2 commits

  • SCPI specification v1.1 adds support for energy sensors. This patch
    adds support for the same.

    Acked-by: Guenter Roeck
    Reviewed-by: Punit Agrawal
    Signed-off-by: Sudeep Holla

    Sudeep Holla
     
  • SCPI specification version 1.1 extended the sensor from 32-bit to 64-bit
    values in order to accommodate new sensor class with 64-bit requirements

    Since the SCPI driver sets the higher 32-bit for older protocol version
    to zeros, there's no need to explicitly check the SCPI protocol version
    and the backward compatibility is maintainted.

    Acked-by: Guenter Roeck
    Reviewed-by: Punit Agrawal
    Signed-off-by: Sudeep Holla

    Sudeep Holla
     

28 Jan, 2016

1 commit


25 Jan, 2016

1 commit

  • Since Linux 4.0 the CPU fan speed is going up and down on Dell Studio
    XPS 8000 and 8100 for unknown reasons. The 8100 was already
    blacklisted in commit a4b45b25f18d ("hwmon: (dell-smm) Blacklist
    Dell Studio XPS 8100"). This patch blacklists the XPS 8000.

    Without further debugging on the affected machine, it is not possible
    to find the problem. For more details see
    https://bugzilla.kernel.org/show_bug.cgi?id=100121

    Signed-off-by: Thorsten Leemhuis
    Acked-by: Pali Rohár
    Cc: stable@vger.kernel.org # v4.0+, will need backport
    Signed-off-by: Guenter Roeck

    Thorsten Leemhuis
     

18 Jan, 2016

1 commit

  • Pull watchdog updates from Wim Van Sebroeck:
    "This adds following items:

    - watchdog restart handler support
    - watchdog reboot notifier support
    - watchdog sysfs attributes
    - support for the following new devices: AMD Mullins platform, AMD
    Carrizo platform, meson8b SoC, CSRatlas7, TS-4800, Alphascale
    asm9260-wdt, Zodiac, Sigma Designs SMP86xx/SMP87xx
    - Changes in refcounting for the watchdog core
    - watchdog core improvements
    - and small fixes"

    * git://www.linux-watchdog.org/linux-watchdog: (60 commits)
    watchdog: asm9260: remove __init and __exit annotations
    watchdog: Drop pointer to watchdog device from struct watchdog_device
    watchdog: ziirave: Use watchdog infrastructure to create sysfs attributes
    watchdog: Add support for creating driver specific sysfs attributes
    watchdog: kill unref/ref ops
    watchdog: stmp3xxx: Remove unused variables
    watchdog: add MT7621 watchdog support
    hwmon: (sch56xx) Drop watchdog driver data reference count callbacks
    watchdog: da9055_wdt: Drop reference counting
    watchdog: da9052_wdt: Drop reference counting
    watchdog: Separate and maintain variables based on variable lifetime
    watchdog: diag288: Stop re-using watchdog core internal flags
    watchdog: Create watchdog device in watchdog_dev.c
    watchdog: qcom-wdt: Do not set 'dev' in struct watchdog_device
    watchdog: mena21: Do not use device pointer from struct watchdog_device
    watchdog: gpio: Do not use device pointer from struct watchdog_device
    watchdog: tangox: Print info message using pointer to platform device
    watchdog: bcm2835_wdt: Drop log message if watchdog is stopped
    devicetree: watchdog: add binding for Sigma Designs SMP8642 watchdog
    watchdog: add support for Sigma Designs SMP86xx/SMP87xx
    ...

    Linus Torvalds
     

09 Jan, 2016

1 commit


05 Jan, 2016

1 commit


30 Dec, 2015

1 commit


19 Dec, 2015

5 commits


11 Dec, 2015

1 commit

  • TMP102 works based on conversions done periodically. However, as per
    the TMP102 data sheet[1] the first conversion is triggered immediately
    after we program the configuration register. The temperature data
    registers do not reflect proper data until the first conversion is
    complete (in our case HZ/4).

    The driver currently sets the last_update to be jiffies - HZ, just
    after the configuration is complete. When TMP102 driver registers
    with the thermal framework, it immediately tries to read the sensor
    temperature data. This takes place even before the conversion on the
    TMP102 is complete and results in an invalid temperature read.

    Depending on the value read, this may cause thermal framework to
    assume that a critical temperature event has occurred and attempts to
    shutdown the system.

    Instead of causing an invalid mid-conversion value to be read
    erroneously, we mark the last_update to be in-line with the current
    jiffies. This allows the tmp102_update_device function to skip update
    until the required conversion time is complete. Further, we ensure to
    return -EAGAIN result instead of returning spurious temperature (such
    as 0C) values to the caller to prevent any wrong decisions made with
    such values. NOTE: this allows the read functions not to be blocking
    and allows the callers to make the decision if they would like to
    block or try again later. At least the current user(thermal) seems to
    handle this by retrying later.

    A simpler alternative approach could be to sleep in the probe for the
    duration required, but that will result in latency that is undesirable
    and delay boot sequence un-necessarily.

    [1] http://www.ti.com/lit/ds/symlink/tmp102.pdf

    Cc: Eduardo Valentin
    Reported-by: Aparna Balasubramanian
    Reported-by: Elvita Lobo
    Reported-by: Yan Liu
    Signed-off-by: Nishanth Menon
    Signed-off-by: Guenter Roeck

    Nishanth Menon
     

17 Nov, 2015

2 commits

  • Currently it's assumed that firmware exports only the class of sensors
    supported by the driver. However with newer firmware or SCPI protocol
    revision, support for newer classes of sensors can be present.

    The driver fails to probe with the following warning if an unsupported
    class of sensor is encountered in the firmware.

    sysfs: cannot create duplicate filename
    '/devices/platform/scpi/scpi:sensors/hwmon/hwmon0/'
    ------------[ cut here ]------------
    WARNING: at fs/sysfs/dir.c:31
    Modules linked in:

    CPU: 0 PID: 6 Comm: kworker/u12:0 Not tainted 4.3.0-rc7 #137
    Hardware name: ARM Juno development board (r0) (DT)
    Workqueue: deferwq deferred_probe_work_func
    PC is at sysfs_warn_dup+0x54/0x78
    LR is at sysfs_warn_dup+0x54/0x78

    This patch fixes the above issue by skipping through the unsupported
    class of SCPI sensors.

    Fixes: 68acc77a2d51 ("hwmon: Support thermal zones registration for SCP temperature sensors")
    Fixes: ea98b29a05e9 ("hwmon: Support sensors exported via ARM SCP interface")
    Cc: Guenter Roeck
    Reviewed-by: Punit Agrawal
    Signed-off-by: Sudeep Holla
    Signed-off-by: Guenter Roeck

    Sudeep Holla
     
  • The newly added scpi thermal support is broken when the scpi driver
    is built-in but the thermal driver is a loadable module:

    drivers/built-in.o: In function `scpi_hwmon_probe':
    (.text+0x444d70): undefined reference to `thermal_zone_of_sensor_unregister'
    (.text+0x444d94): undefined reference to `thermal_zone_of_sensor_register'
    drivers/built-in.o: In function `scpi_hwmon_remove':
    (text+0x444e6c): undefined reference to `thermal_zone_of_sensor_unregister'

    This uses the same Kconfig trick that we have in a couple of other
    drivers already to ensure we can only select the driver in valid
    configurations when either THERMAL_OF is disabled, or when with a
    dependency on CONFIG_THERMAL that can force SCPI to be a loadable
    module in the case I was hitting.

    Signed-off-by: Arnd Bergmann
    Fixes: 68acc77a2d51 ("hwmon: Support thermal zones registration for SCP temperature sensors")
    Signed-off-by: Guenter Roeck

    Arnd Bergmann
     

16 Nov, 2015

2 commits

  • Fix the following "maybe used uninitialized" warnings by
    initializing the variables to keep the compiler quiet.
    There is no "used uninitialized" in this case.

    CC [M] drivers/hwmon/applesmc.o
    drivers/hwmon/applesmc.c: In function ‘applesmc_init_smcreg’:
    drivers/hwmon/applesmc.c:595:43: warning: ‘right_light_sensor’
    may be used uninitialized in this function [-Wmaybe-uninitialized]
    s->num_light_sensors = left_light_sensor + right_light_sensor;
    ^
    drivers/hwmon/applesmc.c:540:26: note: ‘right_light_sensor’ was
    declared here
    bool left_light_sensor, right_light_sensor;
    ^
    drivers/hwmon/applesmc.c:595:43: warning: ‘left_light_sensor’ may
    be used uninitialized in this function [-Wmaybe-uninitialized]
    s->num_light_sensors = left_light_sensor + right_light_sensor;
    ^
    drivers/hwmon/applesmc.c:540:7: note: ‘left_light_sensor’ was
    declared here
    bool left_light_sensor, right_light_sensor;
    ^

    Signed-off-by: Shuah Khan
    Signed-off-by: Guenter Roeck

    Shuah Khan
     
  • Since a0de56c81fcf ("hwmon: (ina2xx) convert driver to using regmap")
    the driver requires REGMAP_I2C to build. Select it by default
    in Kconfig.

    Reported-by: Guo Chunrong
    Cc: Marc Titinger
    Signed-off-by: Li Yang
    Fixes: a0de56c81fcf ("hwmon: (ina2xx) convert driver to using regmap")
    Signed-off-by: Guenter Roeck

    Li Yang
     

11 Nov, 2015

2 commits

  • Pull ARM SoC driver updates from Olof Johansson:
    "As we've enabled multiplatform kernels on ARM, and greatly done away
    with the contents under arch/arm/mach-*, there's still need for
    SoC-related drivers to go somewhere.

    Many of them go in through other driver trees, but we still have
    drivers/soc to hold some of the "doesn't fit anywhere" lowlevel code
    that might be shared between ARM and ARM64 (or just in general makes
    sense to not have under the architecture directory).

    This branch contains mostly such code:

    - Drivers for qualcomm SoCs for SMEM, SMD and SMD-RPM, used to
    communicate with power management blocks on these SoCs for use by
    clock, regulator and bus frequency drivers.

    - Allwinner Reduced Serial Bus driver, again used to communicate with
    PMICs.

    - Drivers for ARM's SCPI (System Control Processor). Not to be
    confused with PSCI (Power State Coordination Interface). SCPI is
    used to communicate with the assistant embedded cores doing power
    management, and we have yet to see how many of them will implement
    this for their hardware vs abstracting in other ways (or not at all
    like in the past).

    - To make confusion between SCPI and PSCI more likely, this release
    also includes an update of PSCI to interface version 1.0.

    - Rockchip support for power domains.

    - A driver to talk to the firmware on Raspberry Pi"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (57 commits)
    soc: qcom: smd-rpm: Correct size of outgoing message
    bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus
    bus: sunxi-rsb: Add Allwinner Reduced Serial Bus (RSB) controller bindings
    ARM: bcm2835: add mutual inclusion protection
    drivers: psci: make PSCI 1.0 functions initialization version dependent
    dt-bindings: Correct paths in Rockchip power domains binding document
    soc: rockchip: power-domain: don't try to print the clock name in error case
    soc: qcom/smem: add HWSPINLOCK dependency
    clk: berlin: add cpuclk
    ARM: berlin: dts: add CLKID_CPU for BG2Q
    ARM: bcm2835: Add the Raspberry Pi firmware driver
    soc: qcom: smem: Move RPM message ram out of smem DT node
    soc: qcom: smd-rpm: Correct the active vs sleep state flagging
    soc: qcom: smd: delete unneeded of_node_put
    firmware: qcom-scm: build for correct architecture level
    soc: qcom: smd: Correct SMEM items for upper channels
    qcom-scm: add missing prototype for qcom_scm_is_available()
    qcom-scm: fix endianess issue in __qcom_scm_is_call_available
    soc: qcom: smd: Reject send of too big packets
    soc: qcom: smd: Handle big endian CPUs
    ...

    Linus Torvalds
     
  • Pull tiny hwmon update from Jean Delvare.

    * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
    hwmon: (k10temp) Remove duplicate pci-id define

    Linus Torvalds
     

09 Nov, 2015

1 commit


08 Nov, 2015

1 commit

  • Pull trivial updates from Jiri Kosina:
    "Trivial stuff from trivial tree that can be trivially summed up as:

    - treewide drop of spurious unlikely() before IS_ERR() from Viresh
    Kumar

    - cosmetic fixes (that don't really affect basic functionality of the
    driver) for pktcdvd and bcache, from Julia Lawall and Petr Mladek

    - various comment / printk fixes and updates all over the place"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
    bcache: Really show state of work pending bit
    hwmon: applesmc: fix comment typos
    Kconfig: remove comment about scsi_wait_scan module
    class_find_device: fix reference to argument "match"
    debugfs: document that debugfs_remove*() accepts NULL and error values
    net: Drop unlikely before IS_ERR(_OR_NULL)
    mm: Drop unlikely before IS_ERR(_OR_NULL)
    fs: Drop unlikely before IS_ERR(_OR_NULL)
    drivers: net: Drop unlikely before IS_ERR(_OR_NULL)
    drivers: misc: Drop unlikely before IS_ERR(_OR_NULL)
    UBI: Update comments to reflect UBI_METAONLY flag
    pktcdvd: drop null test before destroy functions

    Linus Torvalds
     

06 Nov, 2015

1 commit

  • Pull spi updates from Mark Brown:
    "Quite a lot of activity in SPI this cycle, almost all of it in drivers
    with a few minor improvements and tweaks in the core.

    - Updates to pxa2xx to support Intel Broxton and multiple chip selects.
    - Support for big endian in the bcm63xx driver.
    - Multiple slave support for the mt8173
    - New driver for the auxiliary SPI controller in bcm2835 SoCs.
    - Support for Layerscale SoCs in the Freescale DSPI driver"

    * tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (87 commits)
    spi: pxa2xx: Rework self-initiated platform data creation for non-ACPI
    spi: pxa2xx: Add support for Intel Broxton
    spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signals
    spi: pxa2xx: Add output control for multiple Intel LPSS chip selects
    spi: pxa2xx: Use LPSS prefix for defines that are Intel LPSS specific
    spi: Add DSPI support for layerscape family
    spi: ti-qspi: improve ->remove() callback
    spi/spi-xilinx: Fix race condition on last word read
    spi: Drop owner assignment from spi_drivers
    spi: Add THIS_MODULE to spi_driver in SPI core
    spi: Setup the master controller driver before setting the chipselect
    spi: dw: replace magic constant by DW_SPI_DR
    spi: mediatek: mt8173 spi multiple devices support
    spi: mediatek: handle controller_data in mtk_spi_setup
    spi: mediatek: remove mtk_spi_config
    spi: mediatek: Update document devicetree bindings to support multiple devices
    spi: fix kernel-doc warnings about missing return desc in spi.c
    spi: fix kernel-doc warnings about missing return desc in spi.h
    spi: pxa2xx: Align a few defines
    spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select
    ...

    Linus Torvalds
     

04 Nov, 2015

1 commit


01 Nov, 2015

3 commits


31 Oct, 2015

1 commit


30 Oct, 2015

1 commit