05 Dec, 2014

2 commits

  • Cadence I2C controller has bug wherein it generates invalid read transactions
    after timeout in master receiver mode. This driver does not use the HW
    timeout and this interrupt is disabled but the feature itself cannot be
    disabled. Hence, this patch writes the maximum value (0xFF) to this register.
    This is one of the workarounds to this bug and it will not avoid the issue
    completely but reduces the chances of error.

    Signed-off-by: Vishnu Motghare
    Signed-off-by: Harini Katakam
    Signed-off-by: Wolfram Sang
    Cc: stable@kernel.org

    Vishnu Motghare
     
  • According to I2C specification the NACK should be handled as follows:
    "When SDA remains HIGH during this ninth clock pulse, this is defined as the Not
    Acknowledge signal. The master can then generate either a STOP condition to
    abort the transfer, or a repeated START condition to start a new transfer."
    [I2C spec Rev. 6, 3.1.6: http://www.nxp.com/documents/user_manual/UM10204.pdf]

    Currently the Davinci i2c driver interrupts the transfer on receipt of a
    NACK but fails to send a STOP in some situations and so makes the bus
    stuck until next I2C IP reset (idle/enable).

    For example, the issue will happen during SMBus read transfer which
    consists from two i2c messages write command/address and read data:

    S Slave Address Wr A Command Code A Sr Slave Address Rd A D1..Dn A P

    The I2C client device will send NACK if it can't recognize "Command Code"
    and it's expected from I2C master to generate STP in this case.
    But now, Davinci i2C driver will just exit with -EREMOTEIO and STP will
    not be generated.

    Hence, fix it by generating Stop condition (STP) always when NACK is received.

    This patch fixes Davinci I2C in the same way it was done for OMAP I2C
    commit cda2109a26eb ("i2c: omap: query STP always when NACK is received").

    Reviewed-by: Uwe Kleine-König
    Reported-by: Hein Tibosch
    Signed-off-by: Grygorii Strashko
    Signed-off-by: Wolfram Sang
    Cc: stable@kernel.org

    Grygorii Strashko
     

23 Nov, 2014

1 commit

  • commit 6d9939f651419a63e091105663821f9c7d3fec37 (i2c: omap: split out [XR]DR
    and [XR]RDY) changed the way how errata i207 (I2C: RDR Flag May Be Incorrectly
    Set) get handled. 6d9939f6514 code doesn't correspond to workaround provided by
    errata.

    According to errata ISR must filter out spurious RDR before data read not after.
    ISR must read RXSTAT to get number of bytes available to read. Because RDR
    could be set while there could no data in the receive FIFO.

    Restored pre 6d9939f6514 way of handling errata.

    Found by code review. Real impact haven't seen.
    Tested on Beagleboard XM C.

    Signed-off-by: Alexander Kochetkov
    Fixes: 6d9939f651419a63e09110 i2c: omap: split out [XR]DR and [XR]RDY
    Tested-by: Felipe Balbi
    Reviewed-by: Felipe Balbi
    Signed-off-by: Wolfram Sang

    Alexander Kochetkov
     

21 Nov, 2014

2 commits

  • If the Designware core is configured with IC_EMPTYFIFO_HOLD_MASTER_EN
    set to zero, allowing the TX FIFO to become empty causes a STOP
    condition to be generated on the I2C bus. If the transmit FIFO
    threshold is set too high, an erroneous STOP condition can be
    generated on long transfers - particularly where the interrupt
    latency is extended.

    Signed-off-by: Andrew Jackson
    Signed-off-by: Liviu Dudau
    Tested-by: Mika Westerberg
    Signed-off-by: Wolfram Sang

    Andrew Jackson
     
  • commit 1d7afc95946487945cc7f5019b41255b72224b70 (i2c: omap: ack IRQ in parts)
    changed the interrupt handler to complete transfers without clearing
    XRDY (AL case) and ARDY (NACK case) flags. XRDY or ARDY interrupts will be
    fired again. As a result, ISR keep processing transfer after it was already
    complete (from the driver code point of view).

    A didn't see real impacts of the 1d7afc9, but it is really bad idea to
    have ISR running on user data after transfer was complete.

    It looks, what 1d7afc9 violate TI specs in what how AL and NACK should be
    handled (see Note 1, sprugn4r, Figure 17-31 and Figure 17-32).

    According to specs (if I understood correctly), in case of NACK and AL driver
    must reset NACK, AL, ARDY, RDR, and RRDY (Master Receive Mode), and
    NACK, AL, ARDY, and XDR (Master Transmitter Mode).

    All that is done down the code under the if condition:
    if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK | OMAP_I2C_STAT_AL)) ...

    The patch restore pre 1d7afc9 logic of handling NACK and AL interrupts, so
    no interrupts is fired after ISR informs the rest of driver what transfer
    complete.

    Note: instead of removing break under NACK case, we could just replace 'break'
    with 'continue' and allow NACK transfer to finish using ARDY event. I found
    that NACK and ARDY bits usually set together. That case confirm TI wiki:
    http://processors.wiki.ti.com/index.php/I2C_Tips#Detecting_and_handling_NACK

    In order if someone interested in the event traces for NACK and AL cases,
    I sent them to mailing list.

    Tested on Beagleboard XM C.

    Signed-off-by: Alexander Kochetkov
    Fixes: 1d7afc9 i2c: omap: ack IRQ in parts
    Cc: # v3.7+
    Acked-by: Felipe Balbi
    Tested-by: Aaro Koskinen
    Signed-off-by: Wolfram Sang

    Alexander Kochetkov
     

08 Nov, 2014

3 commits


20 Oct, 2014

1 commit

  • Pull i2c updates from Wolfram Sang:
    "Highlights from the I2C subsystem for 3.18:

    - new drivers for Axxia AM55xx, and Hisilicon hix5hd2 SoC.

    - designware driver gained AMD support, exynos gained exynos7 support

    The rest is usual driver stuff. Hopefully no lowlights this time"

    * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
    i2c: i801: Add Device IDs for Intel Sunrise Point PCH
    i2c: hix5hd2: add i2c controller driver
    i2c-imx: Disable the clock on probe failure
    i2c: designware: Add support for AMD I2C controller
    i2c: designware: Rework probe() to get clock a bit later
    i2c: designware: Default to fast mode in case of ACPI
    i2c: axxia: Add I2C driver for AXM55xx
    i2c: exynos: add support for HSI2C module on Exynos7
    i2c: mxs: detect No Slave Ack on SELECT in PIO mode
    i2c: cros_ec: Remove EC_I2C_FLAG_10BIT
    i2c: cros-ec-tunnel: Add of match table
    i2c: rcar: remove sign-compare flaw
    i2c: ismt: Use minimum descriptor size
    i2c: imx: Add arbitration lost check
    i2c: rk3x: Remove unlikely() annotations
    i2c: rcar: check for no IRQ in rcar_i2c_irq()
    i2c: rcar: make rcar_i2c_prepare_msg() *void*
    i2c: rcar: simplify check for last message
    i2c: designware: add support of platform data to set I2C mode
    i2c: designware: add support of I2C standard mode

    Linus Torvalds
     

16 Oct, 2014

2 commits


15 Oct, 2014

1 commit

  • Pull MFD updates from Lee Jones:
    "Changes to existing drivers:
    - DT clean-ups in da9055-core, max14577, rn5t618, arizona, hi6421, stmpe, twl4030
    - Export symbols for use in modules in max14577
    - Plenty of static code analysis/Coccinelle fixes throughout the SS
    - Regmap clean-ups in arizona, wm5102, wm5110, da9052, tps65217, rk808
    - Remove unused/duplicate code in da9052, 88pm860x, ti_ssp, lpc_sch, arizona
    - Bug fixes in ti_am335x_tscadc, da9052, ti_am335x_tscadc, rtsx_pcr
    - IRQ fixups in arizona, stmpe, max14577
    - Regulator related changes in axp20x
    - Pass DMA coherency information from parent => child in MFD core
    - Rename DT document files for consistency
    - Add ACPI support to the MFD core
    - Add Andreas Werner to MAINTAINERS for MEN F21BMC

    New drivers/supported devices:
    - New driver for MEN 14F021P00 Board Management Controller
    - New driver for Ricoh RN5T618 PMIC
    - New driver for Rockchip RK808
    - New driver for HiSilicon Hi6421 PMIC
    - New driver for Qualcomm SPMI PMICs
    - Add support for Intel Braswell in lpc_ich
    - Add support for Intel 9 Series PCH in lpc_ich
    - Add support for Intel Quark ILB in lpc_sch"

    [ Delayed to after the poweer/reset pull due to Kconfig problems with
    recursive Kconfig select/depends-on chains. - Linus ]

    * tag 'mfd-for-linus-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (79 commits)
    mfd: cros_ec: wait for completion of commands that return IN_PROGRESS
    i2c: i2c-cros-ec-tunnel: Set retries to 3
    mfd: cros_ec: move locking into cros_ec_cmd_xfer
    mfd: cros_ec: stop calling ->cmd_xfer() directly
    mfd: cros_ec: Delay for 50ms when we see EC_CMD_REBOOT_EC
    MAINTAINERS: Adds Andreas Werner to maintainers list for MEN F21BMC
    mfd: arizona: Correct mask to allow setting micbias external cap
    mfd: Add ACPI support
    Revert "mfd: wm5102: Manually apply register patch"
    mfd: ti_am335x_tscadc: Update logic in CTRL register for 5-wire TS
    mfd: dt-bindings: atmel-gpbr: Rename doc file to conform to naming convention
    mfd: dt-bindings: qcom-pm8xxx: Rename doc file to conform to naming convention
    mfd: Inherit coherent_dma_mask from parent device
    mfd: Document DT bindings for Qualcomm SPMI PMICs
    mfd: Add support for Qualcomm SPMI PMICs
    mfd: dt-bindings: pm8xxx: Add new compatible string
    mfd: axp209x: Drop the parent supplies field
    mfd: twl4030-power: Use 'ti,system-power-controller' as alternative way to support system power off
    mfd: dt-bindings: twl4030-power: Use the standard property to mark power control
    mfd: syscon: Add Atmel GPBR DT bindings documention
    ...

    Linus Torvalds
     

10 Oct, 2014

1 commit

  • Pull ACPI and power management updates from Rafael Wysocki:
    "Features-wise, to me the most important this time is a rework of
    wakeup interrupts handling in the core that makes them work
    consistently across all of the available sleep states, including
    suspend-to-idle. Many thanks to Thomas Gleixner for his help with
    this work.

    Second is an update of the generic PM domains code that has been in
    need of some care for quite a while. Unused code is being removed, DT
    support is being added and domains are now going to be attached to
    devices in bus type code in analogy with the ACPI PM domain. The
    majority of work here was done by Ulf Hansson who also has been the
    most active developer this time.

    Apart from this we have a traditional ACPICA update, this time to
    upstream version 20140828 and a few ACPI wakeup interrupts handling
    patches on top of the general rework mentioned above. There also are
    several cpufreq commits including renaming the cpufreq-cpu0 driver to
    cpufreq-dt, as this is what implements generic DT-based cpufreq
    support, and a new DT-based idle states infrastructure for cpuidle.

    In addition to that, the ACPI LPSS driver is updated, ACPI support for
    Apple machines is improved, a few bugs are fixed and a few cleanups
    are made all over.

    Finally, the Adaptive Voltage Scaling (AVS) subsystem now has a tree
    maintained by Kevin Hilman that will be merged through the PM tree.

    Numbers-wise, the generic PM domains update takes the lead this time
    with 32 non-merge commits, second is cpufreq (15 commits) and the 3rd
    place goes to the wakeup interrupts handling rework (13 commits).

    Specifics:

    - Rework the handling of wakeup IRQs by the IRQ core such that all of
    them will be switched over to "wakeup" mode in suspend_device_irqs()
    and in that mode the first interrupt will abort system suspend in
    progress or wake up the system if already in suspend-to-idle (or
    equivalent) without executing any interrupt handlers. Among other
    things that eliminates the wakeup-related motivation to use the
    IRQF_NO_SUSPEND interrupt flag with interrupts which don't really
    need it and should not use it (Thomas Gleixner and Rafael Wysocki)

    - Switch over ACPI to handling wakeup interrupts with the help of the
    new mechanism introduced by the above IRQ core rework (Rafael Wysocki)

    - Rework the core generic PM domains code to eliminate code that's
    not used, add DT support and add a generic mechanism by which
    devices can be added to PM domains automatically during enumeration
    (Ulf Hansson, Geert Uytterhoeven and Tomasz Figa).

    - Add debugfs-based mechanics for debugging generic PM domains
    (Maciej Matraszek).

    - ACPICA update to upstream version 20140828. Included are updates
    related to the SRAT and GTDT tables and the _PSx methods are in the
    METHOD_NAME list now (Bob Moore and Hanjun Guo).

    - Add _OSI("Darwin") support to the ACPI core (unfortunately, that
    can't really be done in a straightforward way) to prevent
    Thunderbolt from being turned off on Apple systems after boot (or
    after resume from system suspend) and rework the ACPI Smart Battery
    Subsystem (SBS) driver to work correctly with Apple platforms
    (Matthew Garrett and Andreas Noever).

    - ACPI LPSS (Low-Power Subsystem) driver update cleaning up the code,
    adding support for 133MHz I2C source clock on Intel Baytrail to it
    and making it avoid using UART RTS override with Auto Flow Control
    (Heikki Krogerus).

    - ACPI backlight updates removing the video_set_use_native_backlight
    quirk which is not necessary any more, making the code check the
    list of output devices returned by the _DOD method to avoid
    creating acpi_video interfaces that won't work and adding a quirk
    for Lenovo Ideapad Z570 (Hans de Goede, Aaron Lu and Stepan Bujnak)

    - New Win8 ACPI OSI quirks for some Dell laptops (Edward Lin)

    - Assorted ACPI code cleanups (Fabian Frederick, Rasmus Villemoes,
    Sudip Mukherjee, Yijing Wang, and Zhang Rui)

    - cpufreq core updates and cleanups (Viresh Kumar, Preeti U Murthy,
    Rasmus Villemoes)

    - cpufreq driver updates: cpufreq-cpu0/cpufreq-dt (driver name change
    among other things), ppc-corenet, powernv (Viresh Kumar, Preeti U
    Murthy, Shilpasri G Bhat, Lucas Stach)

    - cpuidle support for DT-based idle states infrastructure, new ARM64
    cpuidle driver, cpuidle core cleanups (Lorenzo Pieralisi, Rasmus
    Villemoes)

    - ARM big.LITTLE cpuidle driver updates: support for DT-based
    initialization and Exynos5800 compatible string (Lorenzo Pieralisi,
    Kevin Hilman)

    - Rework of the test_suspend kernel command line argument and a new
    trace event for console resume (Srinivas Pandruvada, Todd E Brandt)

    - Second attempt to optimize swsusp_free() (hibernation core) to make
    it avoid going through all PFNs which may be way too slow on some
    systems (Joerg Roedel)

    - devfreq updates (Paul Bolle, Punit Agrawal, Ãrjan Eide).

    - rockchip-io Adaptive Voltage Scaling (AVS) driver and AVS entry
    update in MAINTAINERS (Heiko Stübner, Kevin Hilman)

    - PM core fix related to clock management (Geert Uytterhoeven)

    - PM core's sysfs code cleanup (Johannes Berg)"

    * tag 'pm+acpi-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (105 commits)
    ACPI / fan: printk replacement
    PM / clk: Fix crash in clocks management code if !CONFIG_PM_RUNTIME
    PM / Domains: Rename cpu_data to cpuidle_data
    cpufreq: cpufreq-dt: fix potential double put of cpu OF node
    cpufreq: cpu0: rename driver and internals to 'cpufreq_dt'
    PM / hibernate: Iterate over set bits instead of PFNs in swsusp_free()
    cpufreq: ppc-corenet: remove duplicate update of cpu_data
    ACPI / sleep: Rework the handling of ACPI GPE wakeup from suspend-to-idle
    PM / sleep: Rename platform suspend/resume functions in suspend.c
    PM / sleep: Export dpm_suspend_late/noirq() and dpm_resume_early/noirq()
    ACPICA: Introduce acpi_enable_all_wakeup_gpes()
    ACPICA: Clear all non-wakeup GPEs in acpi_hw_enable_wakeup_gpe_block()
    ACPI / video: check _DOD list when creating backlight devices
    PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h
    cpufreq: Replace strnicmp with strncasecmp
    cpufreq: powernv: Set the cpus to nominal frequency during reboot/kexec
    cpufreq: powernv: Set the pstate of the last hotplugged out cpu in policy->cpus to minimum
    cpufreq: Allow stop CPU callback to be used by all cpufreq drivers
    PM / devfreq: exynos: Enable building exynos PPMU as module
    PM / devfreq: Export helper functions for drivers
    ...

    Linus Torvalds
     

08 Oct, 2014

1 commit

  • Pull "trivial tree" updates from Jiri Kosina:
    "Usual pile from trivial tree everyone is so eagerly waiting for"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    Remove MN10300_PROC_MN2WS0038
    mei: fix comments
    treewide: Fix typos in Kconfig
    kprobes: update jprobe_example.c for do_fork() change
    Documentation: change "&" to "and" in Documentation/applying-patches.txt
    Documentation: remove obsolete pcmcia-cs from Changes
    Documentation: update links in Changes
    Documentation: Docbook: Fix generated DocBook/kernel-api.xml
    score: Remove GENERIC_HAS_IOMAP
    gpio: fix 'CONFIG_GPIO_IRQCHIP' comments
    tty: doc: Fix grammar in serial/tty
    dma-debug: modify check_for_stack output
    treewide: fix errors in printk
    genirq: fix reference in devm_request_threaded_irq comment
    treewide: fix synchronize_rcu() in comments
    checkstack.pl: port to AArch64
    doc: queue-sysfs: minor fixes
    init/do_mounts: better syntax description
    MIPS: fix comment spelling
    powerpc/simpleboot: fix comment
    ...

    Linus Torvalds
     

07 Oct, 2014

7 commits

  • * pm-domains: (32 commits)
    PM / Domains: Rename cpu_data to cpuidle_data
    PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h
    PM / Domains: Remove legacy API for adding devices through DT
    PM / Domains: Add genpd attach/detach callbacks
    PM / Domains: add debugfs listing of struct generic_pm_domain-s
    ACPI / PM: Convert acpi_dev_pm_detach() into a static function
    ARM: exynos: Move to generic PM domain DT bindings
    amba: Add support for attach/detach of PM domains
    spi: core: Convert to dev_pm_domain_attach|detach()
    mmc: sdio: Convert to dev_pm_domain_attach|detach()
    i2c: core: Convert to dev_pm_domain_attach|detach()
    drivercore / platform: Convert to dev_pm_domain_attach|detach()
    PM / Domains: Add APIs to attach/detach a PM domain for a device
    PM / Domains: Add generic OF-based PM domain look-up
    ACPI / PM: Assign the ->detach() callback when attaching the PM domain
    PM / Domains: Add a detach callback to the struct dev_pm_domain
    PM / domains: Spelling s/domian/domain/
    PM / domains: Keep declaration of dev_power_governors together
    PM / domains: Remove default_stop_ok() API
    drivers: sh: Leave disabling of unused PM domains to genpd
    ...

    Rafael J. Wysocki
     
  • Since the i2c bus can get wedged on the EC sometimes, set the number of retries
    to 3. Since we un-wedge the bus immediately after the wedge happens, this is the
    correct fix since only one transfer will fail.

    Signed-off-by: Derek Basehore
    Reviewed-by: Doug Anderson
    Acked-by: Wolfram Sang
    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Lee Jones

    Derek Basehore
     
  • Instead of having users of the ChromeOS EC call the interface-specific
    cmd_xfer() callback directly, introduce a central cros_ec_cmd_xfer()
    to use instead. This will allow us to put all the locking and retry
    logic in one place instead of duplicating it across the different
    drivers.

    Signed-off-by: Andrew Bresticker
    Reviewed-by: Simon Glass
    Signed-off-by: Javier Martinez Canillas
    Reviewed-by: Doug Anderson
    Signed-off-by: Lee Jones

    Andrew Bresticker
     
  • In the case of errors during probe, we should disable i2c_imx->clk.

    Signed-off-by: Fabio Estevam
    Signed-off-by: Wolfram Sang

    Fabio Estevam
     
  • Add support for AMD version of the DW I2C host controller. The device is
    enumerated from ACPI namespace with ACPI ID AMD0010. Because the core
    driver needs an input source clock, and this is not an Intel LPSS device
    where clocks are provided through drivers/acpi/acpi_lpss.c, we register the
    clock ourselves if the clock rate is given in ->driver_data

    Signed-off-by: Carl Peng
    Signed-off-by: Mika Westerberg
    Signed-off-by: Wolfram Sang

    Carl Peng
     
  • In order to be able to create missing clock for AMD (and in future possibly
    others) we move getting clock for the device a bit later. Also make ACPI/DT
    configuration in the same place depending on from where the device was
    enumerated from.

    Signed-off-by: Mika Westerberg
    Signed-off-by: Wolfram Sang

    Mika Westerberg
     
  • There is no way in ACPI to tell in which speed the host controller is
    supposed to run, so we default to fast mode (400KHz). Since this has been
    the default all the time there should be no functional changes with this
    change.

    This is the first step required to refactor the driver probe so that we can
    supply source clock from ACPI part of the driver to the core.

    Signed-off-by: Mika Westerberg
    Signed-off-by: Wolfram Sang

    Mika Westerberg
     

03 Oct, 2014

5 commits

  • Add I2C bus driver for the controller found in the LSI Axxia family SoCs. The
    driver implements 10-bit addressing and SMBus transfer modes via emulation
    (including SMBus block data read).

    Signed-off-by: Anders Berg
    Signed-off-by: Wolfram Sang

    Anders Berg
     
  • The HSI2C module on Exynos7 differs in the transfer status
    bits. Transfer status bits were moved to INT_ENABLE and
    INT_STATUS registers

    This patch adds support for the HSI2C module on Exynos7.
    1. Implementes a "hw" field in the variant struct to distinguish
    the hardware.
    2. Updates the dt-new compatible in dt-binding documenation

    Signed-off-by: Naveen Krishna Chatradhi
    Signed-off-by: Wolfram Sang

    Naveen Krishna Ch
     
  • i2cdetect scanned i2c bus slow because the i2c-mxs driver ignored the
    NO_SLAVE_ACK bit during busy-waiting loop. Thanks to the patch, the
    speedup happens.

    Signed-off-by: Janusz Uzycki
    Signed-off-by: Wolfram Sang

    Janusz Użycki
     
  • The runtime pm calls need to be done before populating the children via the
    i2c_add_adapter call. If this is not done, a child can run into issues trying
    to do i2c read/writes due to the pm_runtime_sync failing.

    Signed-off-by: Andy Gross
    Reviewed-by: Felipe Balbi
    Acked-by: Bjorn Andersson
    Signed-off-by: Wolfram Sang
    Cc: stable@kernel.org

    Andy Gross
     
  • i2cdetect -q was broken (everything was a false positive, and no transfers were
    actually being sent over i2c). The way it works is by sending a 0 length write
    request and checking for NACK. This patch fixes the 0 length writes and actually
    sends them.

    Reported-by: Doug Anderson
    Signed-off-by: Alexandru M Stan
    Tested-by: Doug Anderson
    Tested-by: Max Schwarz
    Signed-off-by: Wolfram Sang
    Cc: stable@kernel.org

    Alexandru M Stan
     

30 Sep, 2014

12 commits

  • In pointed out that the 10-bit
    flag in the cros_ec_tunnel was useless. It went into a 16-bit flags
    field but was defined at (1 << 16).

    Since we have no 10-bit i2c devices on the other side of the tunnel on
    any known devices this was never a problem. Until we do it makes
    sense to remove this code. On the EC side the code to handle this
    flag was removed in .

    Reported-by: Dave Jones
    Signed-off-by: Doug Anderson
    Reviewed-by: Simon Glass
    Signed-off-by: Wolfram Sang

    Doug Anderson
     
  • The commit 46420dd73b80 (PM / Domains: Add APIs to attach/detach a PM
    domain for a device) started using errno values in pm.h header file.
    It also failed to include the header for these, thus it caused
    compiler errors.

    Instead of including the errno header to pm.h, let's move the functions
    to pm_domain.h, since it's a better match.

    Fixes: 46420dd73b80 (PM / Domains: Add APIs to attach/detach a PM domain for a device)
    Signed-off-by: Ulf Hansson
    Acked-by: Geert Uytterhoeven
    Acked-by: Wolfram Sang
    Acked-by: Mark Brown
    Signed-off-by: Rafael J. Wysocki

    Ulf Hansson
     
  • To enable the cros-ec-tunnel driver to be auto-loaded when build as a
    module add an of match table (and export it) to match the modalias
    information passed on to userspace as the Cros EC MFD driver registers
    the MFD subdevices with an of_compatibility string.

    Signed-off-by: Sjoerd Simons
    Reviewed-by: Javier Martinez Canillas
    Signed-off-by: Wolfram Sang

    Sjoerd Simons
     
  • gcc rightfully says:

    drivers/i2c/busses/i2c-rcar.c:198:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

    Signed-off-by: Wolfram Sang
    Acked-by: Laurent Pinchart
    Signed-off-by: Wolfram Sang

    Wolfram Sang
     
  • Software is allowed to allocate number of descriptor size from 2 to 256,
    this i2c controller could process more descriptor, but for i2c core soft
    ware layer, only one i2c transaction is allowed each time.

    So here switch to minimum 2 descriptor when initialization.

    Signed-off-by: Fan Du
    Acked-by: Neil Horman
    Signed-off-by: Wolfram Sang

    Fan Du
     
  • According to the i.mx spec, for multimaster mode, if I2C is
    enabled when the bus is busy and asserts start, hardware inhibits
    the transmission, clears MSTA without signaling a stop, generate
    an interrupt, and set I2C_I2SR[IAL] to indicate a failed attempt
    to engage the bus, which means arbitration lost. In this case,
    we should first test I2C_I2SR[IAL], and clear this bit if it is
    set, and then I2C controller default to slave receive mode.

    This patch check the IAL bit every time before an I2c transmission.
    if IAL is set, clear it and make I2C controller to default mode.

    Signed-off-by: Haibo Chen
    Acked-by: Fugang Duan
    Signed-off-by: Wolfram Sang

    Haibo Chen
     
  • Having a transfer more than 32 bits is not all that unlikely. Remove
    the annotation.

    The unlikely in the IRQ handler can't gain us much. It's not in a
    loop, so at most it would save 1 instruction per IRQ, which isn't
    much. In fact on the compiler I tested it produced the exact same
    code. Remove it too.

    Suggested-by: Dmitry Torokhov
    Signed-off-by: Doug Anderson
    Signed-off-by: Wolfram Sang

    Doug Anderson
     
  • Check if the ICMSR register (masked with the ICMIER register) evaluates to 0 in
    the driver's interrupt handler and return IRQ_NONE in that case, like many other
    drivers do.

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Wolfram Sang

    Sergei Shtylyov
     
  • rcar_i2c_prepare_msg() always returns 0, so we can make this function return
    *void* and thus remove the result check in rcar_i2c_master_xfer().

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Wolfram Sang

    Sergei Shtylyov
     
  • rcar_i2c_master_xfer() needlessly compares the message pointers (using indirect
    addressing) in order to detect the last I2C message, while it's enough to only
    compare the message indexes.

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Wolfram Sang

    Sergei Shtylyov
     
  • Use the platform data to set the clk_freq when there is no DT configuration
    available. The clk_freq in turn will determine the I2C speed mode.

    In Quark, there is currently no other configuration mechanism other than
    board files.

    Signed-off-by: Raymond Tan
    Reviewed-by: Mika Westerberg
    Reviewed-by: Hock Leong Kweh
    Signed-off-by: Wolfram Sang

    Tan, Raymond
     
  • Some legacy devices support ony I2C standard mode at 100kHz.
    This patch allows to select the standard mode through the DTS
    with the use of the existing clock-frequency parameter.

    When clock-frequency parameter is not set, the fast mode is selected.
    Only when the parameter is set at 100000, the standard mode is selected.

    Signed-off-by: Romain Baeriswyl
    Reviewed-by: Christian Ruppert
    Acked-by: Alan Tull
    Signed-off-by: Wolfram Sang

    Romain Baeriswyl
     

26 Sep, 2014

1 commit


25 Sep, 2014

1 commit

  • If adapter->dev.parent == NULL there is a NULL pointer dereference in
    acpi_i2c_install_space_handler and acpi_i2c_remove_space_handler.

    This is present since introduction of this code:
    366047515c6e "i2c: rework kernel config I2C_ACPI" or even
    da3c6647ee08 "I2C/ACPI: Clean up I2C ACPI code and Add CONFIG_I2C_ACPI"

    The adapter->dev.parent == NULL case is valid for the i2c_stub,
    so loading i2c_stub with ACPI_I2C_OPREGION enabled results in an oops.
    This is also valid at least for i2c_tiny_usb and i2c_robotfuzz_osif.

    Fix by checking whether it is null before calling ACPI_HANDLE.

    Signed-off-by: Peter Huewe
    Acked-by: Mika Westerberg
    Signed-off-by: Wolfram Sang

    Peter Hüwe