15 Apr, 2015

1 commit

  • Pull power management and ACPI updates from Rafael Wysocki:
    "These are mostly fixes and cleanups all over, although there are a few
    items that sort of fall into the new feature category.

    First off, we have new callbacks for PM domains that should help us to
    handle some issues related to device initialization in a better way.

    There also is some consolidation in the unified device properties API
    area allowing us to use that inferface for accessing data coming from
    platform initialization code in addition to firmware-provided data.

    We have some new device/CPU IDs in a few drivers, support for new
    chips and a new cpufreq driver too.

    Specifics:

    - Generic PM domains support update including new PM domain callbacks
    to handle device initialization better (Russell King, Rafael J
    Wysocki, Kevin Hilman)

    - Unified device properties API update including a new mechanism for
    accessing data provided by platform initialization code (Rafael J
    Wysocki, Adrian Hunter)

    - ARM cpuidle update including ARM32/ARM64 handling consolidation
    (Daniel Lezcano)

    - intel_idle update including support for the Silvermont Core in the
    Baytrail SOC and for the Airmont Core in the Cherrytrail and
    Braswell SOCs (Len Brown, Mathias Krause)

    - New cpufreq driver for Hisilicon ACPU (Leo Yan)

    - intel_pstate update including support for the Knights Landing chip
    (Dasaratharaman Chandramouli, Kristen Carlson Accardi)

    - QorIQ cpufreq driver update (Tang Yuantian, Arnd Bergmann)

    - powernv cpufreq driver update (Shilpasri G Bhat)

    - devfreq update including Tegra support changes (Tomeu Vizoso,
    MyungJoo Ham, Chanwoo Choi)

    - powercap RAPL (Running-Average Power Limit) driver update including
    support for Intel Broadwell server chips (Jacob Pan, Mathias Krause)

    - ACPI device enumeration update related to the handling of the
    special PRP0001 device ID allowing DT-style 'compatible' property
    to be used for ACPI device identification (Rafael J Wysocki)

    - ACPI EC driver update including limited _DEP support (Lan Tianyu,
    Lv Zheng)

    - ACPI backlight driver update including a new mechanism to allow
    native backlight handling to be forced on non-Windows 8 systems and
    a new quirk for Lenovo Ideapad Z570 (Aaron Lu, Hans de Goede)

    - New Windows Vista compatibility quirk for Sony VGN-SR19XN (Chen Yu)

    - Assorted ACPI fixes and cleanups (Aaron Lu, Martin Kepplinger,
    Masanari Iida, Mika Westerberg, Nan Li, Rafael J Wysocki)

    - Fixes related to suspend-to-idle for the iTCO watchdog driver and
    the ACPI core system suspend/resume code (Rafael J Wysocki, Chen Yu)

    - PM tracing support for the suspend phase of system suspend/resume
    transitions (Zhonghui Fu)

    - Configurable delay for the system suspend/resume testing facility
    (Brian Norris)

    - PNP subsystem cleanups (Peter Huewe, Rafael J Wysocki)"

    * tag 'pm+acpi-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (74 commits)
    ACPI / scan: Fix NULL pointer dereference in acpi_companion_match()
    ACPI / scan: Rework modalias creation when "compatible" is present
    intel_idle: mark cpu id array as __initconst
    powercap / RAPL: mark rapl_ids array as __initconst
    powercap / RAPL: add ID for Broadwell server
    intel_pstate: Knights Landing support
    intel_pstate: remove MSR test
    cpufreq: fix qoriq uniprocessor build
    ACPI / scan: Take the PRP0001 position in the list of IDs into account
    ACPI / scan: Simplify acpi_match_device()
    ACPI / scan: Generalize of_compatible matching
    device property: Introduce firmware node type for platform data
    device property: Make it possible to use secondary firmware nodes
    PM / watchdog: iTCO: stop watchdog during system suspend
    cpufreq: hisilicon: add acpu driver
    ACPI / EC: Call acpi_walk_dep_device_list() after installing EC opregion handler
    cpufreq: powernv: Report cpu frequency throttling
    intel_idle: Add support for the Airmont Core in the Cherrytrail and Braswell SOCs
    intel_idle: Update support for Silvermont Core in Baytrail SOC
    PM / devfreq: tegra: Register governor on module init
    ...

    Linus Torvalds
     

10 Apr, 2015

1 commit

  • This patch changes type of input parameter for
    prepare/unprepare_recovery() callbacks from struct i2c_bus_recovery_info
    * to struct i2c_adapter *. This allows to simplify implementation of
    these callbacks and avoid type conversations from i2c_bus_recovery_info
    to i2c_adapter. The i2c_bus_recovery_info can be simply retrieved from
    struct i2c_adapter which contains pointer on it. There are no users
    currently, so this is safe to do.

    Acked-by: Uwe Kleine-König
    Acked-by: Alexander Sverdlin
    Signed-off-by: Grygorii Strashko
    Signed-off-by: Wolfram Sang

    Grygorii Strashko
     

27 Mar, 2015

1 commit

  • After more discussion, brave users, and additional datasheet evaluation,
    some API updates for the new I2C slave framework became imminent. The
    slave events now get some easier to understand naming. Also, the event
    handling has been simplified to only need a single call to the slave
    callback when an action by the backend is required.

    Reported-by: Uwe Kleine-König
    Signed-off-by: Wolfram Sang
    Acked-by: Geert Uytterhoeven
    Acked-by: Uwe Kleine-König
    Signed-off-by: Wolfram Sang

    Wolfram Sang
     

17 Mar, 2015

1 commit

  • Now that we have struct fwnode_handle, we can use that to point to
    ACPI companions from struct device objects instead of pointing to
    struct acpi_device directly.

    There are two benefits from that. First, the somewhat ugly and
    hackish struct acpi_dev_node can be dropped and, second, the same
    struct fwnode_handle pointer can be used in the future to point
    to other (non-ACPI) firmware device node types.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman
    Acked-by: Grant Likely

    Rafael J. Wysocki
     

13 Mar, 2015

1 commit

  • The number of I2C adapters which are not fully I2C compatible is rising,
    sadly. Drivers usually do handle the flaws, still the user receives only
    some errno for a transfer which normally can be expected to work. This
    patch introduces a formal description of flaws. One advantage is that
    the core can check before the actual transfer if the messages could be
    transferred at all. This is done in the next patch. Another advantage is
    that we can pass this information to the user so the restrictions are
    exactly known and further actions can be based on that. This will be
    done later after some stabilization period for this description.

    Signed-off-by: Wolfram Sang
    Tested-by: Ray Jui
    Tested-by: Ivan T. Ivanov
    Tested-by: Neelesh Gupta
    Tested-By: Ludovic Desroches

    Wolfram Sang
     

22 Feb, 2015

1 commit

  • Pull i2c updates from Wolfram Sang:
    "Summary:

    - legacy PM code removed from the core, there were no users anymore
    (thanks to Lars-Peter Clausen)

    - new driver for Broadcom iProc

    - bigger driver updates for designware, rk3x, cadence, ocores

    - a bunch of smaller updates and bugfixes"

    * 'i2c/for-3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (31 commits)
    i2c: ocores: rework clk code to handle NULL cookie
    i2c: designware-baytrail: another fixup for proper Kconfig dependencies
    i2c: fix reference to functionality constants definition
    i2c: iproc: Add Broadcom iProc I2C Driver
    i2c: designware-pci: update Intel copyright line
    i2c: ocores: add common clock support
    i2c: hix5hd2: add COMPILE_TEST
    i2c: clarify comments about the dev_released completion
    i2c: ocores: fix clock-frequency binding usage
    i2c: tegra: Maintain CPU endianness
    i2c: designware-baytrail: use proper Kconfig dependencies
    i2c: designware: Do not calculate SCL timing parameters needlessly
    i2c: do not try to load modules for of-registered devices
    i2c: designware: Add Intel Baytrail PMIC I2C bus support
    i2c: designware: Add i2c bus locking support
    of: i2c: Add i2c-mux-idle-disconnect DT property to PCA954x mux driver
    i2c: designware: use {readl|writel}_relaxed instead of readl/writel
    i2c: designware-pci: no need to provide clk_khz
    i2c: designware-pci: remove Moorestown support
    i2c: imx: whitespace and checkpatch cleanup
    ...

    Linus Torvalds
     

27 Jan, 2015

1 commit


23 Dec, 2014

1 commit

  • There haven't been any I2C driver that use the legacy suspend/resume
    callbacks for a while now and new drivers are supposed to use PM ops. So
    remove support for legacy suspend/resume for I2C drivers.

    Since there aren't any special bus specific things to do during
    suspend/resume and since the PM core will automatically fallback directly to
    using the device's PM ops if no bus PM ops are specified there is no need to
    have any I2C bus PM ops.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Wolfram Sang

    Lars-Peter Clausen
     

15 Dec, 2014

1 commit

  • Pull i2c updates from Wolfram Sang:
    "For 3.19, the I2C subsystem has to offer special candy this time.
    Right in time for Christmas :)

    - I2C slave framework: finally, a generic mechanism for Linux being
    an I2C slave (if the bus driver supports that). Docs are still
    missing but will come later this cycle, the code is good enough to
    go.
    - I2C muxes represent their topology in sysfs much more detailed.
    This will help users to navigate around much easier.
    - irq population of i2c clients is now done at probe time, not device
    creation time, to have better support for deferred probing.
    - new drivers for Imagination SCB, Amlogic Meson
    - DMA support added for Freescale IMX, Renesas SHMobile
    - slightly bigger driver updates to OMAP, i801, AT91, and rk3x
    (mostly quirk handling, timing updates, and using better kernel
    interfaces)
    - eeprom driver can now write with byte-access (very slow, but OK to
    have)
    - and the bunch of smaller fixes, cleanups, ID updates..."

    * 'i2c/for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (56 commits)
    i2c: sh_mobile: remove unneeded DMA mask
    i2c: rcar: add slave support
    i2c: slave-eeprom: add eeprom simulator driver
    i2c: core changes for slave support
    MAINTAINERS: add I2C dt bindings also to I2C realm
    i2c: designware: Fix falling time bindings doc
    i2c: davinci: switch to use platform_get_irq
    Documentation: i2c: Use PM ops instead of legacy suspend/resume
    i2c: sh_mobile: optimize irq entry
    i2c: pxa: add support for SCCB devices
    omap: i2c: don't check bus state IP rev3.3 and earlier
    i2c: s3c2410: Handle i2c sys_cfg register in i2c driver
    i2c: rk3x: add Kconfig dependency on COMMON_CLK
    i2c: omap: add notes related to i2c multimaster mode
    i2c: omap: don't reset controller if Arbitration Lost detected
    i2c: omap: implement workaround for handling invalid BB-bit values
    i2c: omap: cleanup register definitions
    i2c: rk3x: handle dynamic clock rate changes correctly
    i2c: at91: enable probe deferring on dma channel request
    i2c: at91: remove legacy DMA support
    ...

    Linus Torvalds
     

12 Dec, 2014

1 commit

  • Finally(!), make Linux support being an I2C slave. Most of the existing
    infrastructure is reused. We mainly add i2c_slave_register/unregister()
    calls which tells i2c bus drivers to activate the slave mode. Then, they
    also get a callback to report slave events to.

    Signed-off-by: Wolfram Sang
    Signed-off-by: Wolfram Sang

    Wolfram Sang
     

04 Nov, 2014

1 commit


25 Sep, 2014

1 commit

  • Commit 5d98e61d337c ("I2C/ACPI: Add i2c ACPI operation region support")
    renamed the i2c-core module. This may cause regressions for
    distributions, so put the ACPI code back into the core.

    Reported-by: Jean Delvare
    Signed-off-by: Wolfram Sang
    Tested-by: Lan Tianyu
    Tested-by: Mika Westerberg

    Wolfram Sang
     

19 Aug, 2014

1 commit

  • Commit da3c6647(I2C/ACPI: Clean up I2C ACPI code and Add CONFIG_I2C_ACPI
    config) adds a new kernel config I2C_ACPI and make I2C core built in
    when the config is selected. This is wrong because distributions
    etc generally compile I2C as a module and the commit broken that.
    This patch is to rename I2C_ACPI to ACPI_I2C_OPREGION. New config
    only controls ACPI I2C operation region code and depends on I2C=y.

    Signed-off-by: Lan Tianyu
    Reviewed-by: Mika Westerberg
    [wsa: removed unrelated change for Kconfig]
    Signed-off-by: Wolfram Sang

    Lan Tianyu
     

27 Jun, 2014

2 commits

  • Clean up ACPI related code in the i2c core and add CONFIG_I2C_ACPI
    to enable I2C ACPI code.

    Current there is a race between removing I2C ACPI operation region
    and ACPI AML code accessing. So make i2c core built-in if CONFIG_I2C_ACPI
    is set.

    Reviewed-by: Mika Westerberg
    Signed-off-by: Lan Tianyu
    Signed-off-by: Wolfram Sang

    Lan Tianyu
     
  • ACPI 5.0 spec(5.5.2.4.5) defines GenericSerialBus(i2c, spi, uart) operation region.
    It allows ACPI aml code able to access such kind of devices to implement
    some ACPI standard method.

    ACPI Spec defines some access attribute to associate with i2c protocol.
    AttribQuick Read/Write Quick Protocol
    AttribSendReceive Send/Receive Byte Protocol
    AttribByte Read/Write Byte Protocol
    AttribWord Read/Write Word Protocol
    AttribBlock Read/Write Block Protocol
    AttribBytes Read/Write N-Bytes Protocol
    AttribProcessCall Process Call Protocol
    AttribBlockProcessCall Write Block-Read Block Process Call Protocol
    AttribRawBytes Raw Read/Write N-BytesProtocol
    AttribRawProcessBytes Raw Process Call Protocol

    On the Asus T100TA, Bios use GenericSerialBus operation region to access
    i2c device to get battery info.

    Sample code From Asus T100TA

    Scope (_SB.I2C1)
    {
    Name (UMPC, ResourceTemplate ()
    {
    I2cSerialBus (0x0066, ControllerInitiated, 0x00061A80,
    AddressingMode7Bit, "\\_SB.I2C1",
    0x00, ResourceConsumer, ,
    )
    })

    ...

    OperationRegion (DVUM, GenericSerialBus, Zero, 0x0100)
    Field (DVUM, BufferAcc, NoLock, Preserve)
    {
    Connection (UMPC),
    Offset (0x81),
    AccessAs (BufferAcc, AttribBytes (0x3E)),
    FGC0, 8
    }
    ...
    }

    Device (BATC)
    {
    Name (_HID, EisaId ("PNP0C0A")) // _HID: Hardware ID
    Name (_UID, One) // _UID: Unique ID
    ...

    Method (_BST, 0, NotSerialized) // _BST: Battery Status
    {
    If (LEqual (AVBL, One))
    {
    Store (FGC0, BFFG)
    If (LNotEqual (STAT, One))
    {
    ShiftRight (CHST, 0x04, Local0)
    And (Local0, 0x03, Local0)
    If (LOr (LEqual (Local0, One), LEqual (Local0, 0x02)))
    {
    Store (0x02, Local1)
    }
    ...

    }

    The i2c operation region is defined under I2C1 scope. _BST method under
    battery device BATC read battery status from the field "FCG0". The request
    would be sent to i2c operation region handler.

    This patch is to add i2c ACPI operation region support. Due to there are
    only "Byte" and "Bytes" protocol access on the Asus T100TA, other protocols
    have not been tested.

    About RawBytes and RawProcessBytes protocol, they needs specific drivers to interpret
    reference data from AML code according ACPI 5.0 SPEC(5.5.2.4.5.3.9 and 5.5.2.4.5.3.10).
    So far, not found such case and will add when find real case.

    Signed-off-by: Lan Tianyu
    Reviewed-by: Mika Westerberg
    Signed-off-by: Wolfram Sang

    Lan Tianyu
     

06 Mar, 2014

1 commit

  • Class based instantiation can cause noticeable delays when booting. This
    mechanism is used when it is not possible to describe slaves on I2C
    busses. As we do have other mechanisms, most embedded I2C will not need
    classes and for embedded it is explicitly not recommended to use them. Add
    a deprecation warning for drivers which want to disable class based
    instantiation in the near future to gain boot-up time, so users relying
    on this technique can switch to something better. They really should.

    Signed-off-by: Wolfram Sang

    Wolfram Sang
     

27 Jan, 2014

1 commit


15 Jan, 2014

1 commit

  • The body of i2c_parent_is_i2c_adapter() is currently guarded by
    I2C_MUX. It should be CONFIG_I2C_MUX instead.

    Among potentially other problems, this resulted in i2c_lock_adapter()
    only locking I2C mux child adapters, and not the parent adapter. In
    turn, this could allow inter-mingling of mux child selection and I2C
    transactions, which could result in I2C transactions being directed to
    the wrong I2C bus, and possibly even switching between busses in the
    middle of a transaction.

    One concrete issue caused by this bug was corrupted HDMI EDID reads
    during boot on the NVIDIA Tegra Seaboard system, although this only
    became apparent in recent linux-next, when the boot timing was changed
    just enough to trigger the race condition.

    Fixes: 3923172b3d70 ("i2c: reduce parent checking to a NOOP in non-I2C_MUX case")
    Cc: Phil Carmody
    Cc:
    Signed-off-by: Stephen Warren
    Signed-off-by: Wolfram Sang

    Stephen Warren
     

04 Oct, 2013

1 commit

  • The 'driver' field of the i2c_client struct is redundant. The same data can be
    accessed through to_i2c_driver(client->dev.driver). The generated code for both
    approaches in more or less the same.

    E.g. on ARM the expression client->driver->command(...) generates

    ...
    ldr r3, [r0, #28]
    ldr r3, [r3, #32]
    blx r3
    ...

    and the expression to_i2c_driver(client->dev.driver)->command(...) generates

    ...
    ldr r3, [r0, #160]
    ldr r3, [r3, #-4]
    blx r3
    ...

    Other architectures will generate similar code.

    All users of the 'driver' field outside of the I2C core have already been
    converted. So this only leaves the core itself. This patch converts the
    remaining few users in the I2C core and then removes the 'driver' field from the
    i2c_client struct.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Wolfram Sang

    Lars-Peter Clausen
     

23 Aug, 2013

2 commits

  • This follows what has already been done for the DeviceTree helpers. Move
    the ACPI helpers from drivers/acpi/acpi_i2c.c to the I2C core and update
    documentation accordingly.

    This also solves a problem reported by Jerry Snitselaar that we can't build
    the ACPI I2C helpers as a module.

    Signed-off-by: Mika Westerberg
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Wolfram Sang

    Mika Westerberg
     
  • I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
    that it is much cleaner to have this in the core. This also removes a
    circular dependency between the helpers and the core, and so we can
    finally register child nodes in the core instead of doing this manually
    in each driver. So, fix the drivers and documentation, too.

    Signed-off-by: Wolfram Sang

    Wolfram Sang
     

07 Aug, 2013

1 commit

  • In 0826374 - i2c: Multiplexed I2C bus core support
    core i2c code increased in size and complexity even when I2C_MUX
    wasn't selected.

    Turning this check into a constant NULL in the n case lets the
    client functions in be simplified too, not needing to include
    never-called calls to the mux-specific helpers.

    Signed-off-by: Phil Carmody
    Signed-off-by: Wolfram Sang

    Phil Carmody
     

02 Apr, 2013

2 commits

  • i2c_del_adapter() is usually called from a drivers remove callback. The Linux
    device driver model does not allow the remove callback to fail and all resources
    allocated in the probe callback need to be freed, as well as all resources which
    have been provided to the rest of the kernel(for example a I2C adapter) need to
    be revoked. So any function revoking such resources isn't allowed to fail
    either. i2c_del_adapter() adheres to this requirement and will never fail. But
    i2c_del_adapter()'s return type is int, which may cause driver authors to think
    that it can fail. This led to code constructs like:

    ret = i2c_del_adapter(...);
    BUG_ON(ret);

    Since i2c_del_adapter() always returns 0 the BUG_ON is never hit and essentially
    becomes dead code, which means it can be removed. Making the return type of
    i2c_del_adapter() void makes it explicit that the function will never fail and
    should prevent constructs like the above from re-appearing in the kernel code.

    All callers of i2c_del_adapter() have already been updated in a previous patch
    to ignore the return value, so the conversion of the return type from int to
    void can be done without causing any build failures.

    Signed-off-by: Lars-Peter Clausen
    Reviewed-by: Jean Delvare
    Signed-off-by: Wolfram Sang

    Lars-Peter Clausen
     
  • The detach_adapter callback has been deprecated for quite some time and has no
    user left. Keeping it alive blocks other cleanups, so remove it.

    Signed-off-by: Lars-Peter Clausen
    Reviewed-by: Jean Delvare
    Signed-off-by: Wolfram Sang

    Lars-Peter Clausen
     

24 Mar, 2013

1 commit

  • Add i2c bus recovery infrastructure to i2c adapters as specified in the i2c
    protocol Rev. 03 section 3.1.16 titled "Bus clear".

    http://www.nxp.com/documents/user_manual/UM10204.pdf

    Sometimes during operation i2c bus hangs and we need to give dummy clocks to
    slave device to start the transfer again. Now we may have capability in the bus
    controller to generate these clocks or platform may have gpio pins which can be
    toggled to generate dummy clocks. This patch supports both.

    This patch also adds in generic bus recovery routines gpio or scl line based
    which can be used by bus controller. In addition controller driver may provide
    its own version of the bus recovery routine.

    This doesn't support multi-master recovery for now.

    Signed-off-by: Viresh Kumar
    [wsa: changed gpio type to int and minor reformatting]
    Signed-off-by: Wolfram Sang

    Viresh Kumar
     

23 Nov, 2012

1 commit

  • ACPI 5 introduced I2cSerialBus resource that makes it possible to enumerate
    and configure the I2C slave devices behind the I2C controller. This patch
    adds helper functions to support I2C slave enumeration.

    An ACPI enabled I2C controller driver only needs to call acpi_i2c_register_devices()
    in order to get its slave devices enumerated, created and bound to the
    corresponding ACPI handle.

    Signed-off-by: Mika Westerberg
    Signed-off-by: Rafael J. Wysocki

    Mika Westerberg
     

13 Oct, 2012

1 commit


06 Oct, 2012

1 commit


31 Jul, 2012

1 commit

  • Pull media updates from Mauro Carvalho Chehab:
    "This is the first part of the media patches for v3.6.

    This patch series contain:
    - new DVB frontend: rtl2832
    - new video drivers: adv7393
    - some unused files got removed
    - a selection API cleanup between V4L2 and V4L2 subdev API's
    - a major redesign at v4l-ioctl2, in order to clean it up
    - several driver fixes and improvements."

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (174 commits)
    v4l: Export v4l2-common.h in include/linux/Kbuild
    media: Revert "[media] Terratec Cinergy S2 USB HD Rev.2"
    [media] media: Use pr_info not homegrown pr_reg macro
    [media] Terratec Cinergy S2 USB HD Rev.2
    [media] v4l: Correct conflicting V4L2 subdev selection API documentation
    [media] Feature removal: V4L2 selections API target and flag definitions
    [media] v4l: Unify selection flags documentation
    [media] v4l: Unify selection flags
    [media] v4l: Common documentation for selection targets
    [media] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces
    [media] v4l: Remove "_ACTUAL" from subdev selection API target definition names
    [media] V4L: Remove "_ACTIVE" from the selection target name definitions
    [media] media: dvb-usb: print mac address via native %pM
    [media] s5p-tv: Use module_i2c_driver in sii9234_drv.c file
    [media] media: gpio-ir-recv: add allowed_protos for platform data
    [media] s5p-jpeg: Use module_platform_driver in jpeg-core.c file
    [media] saa7134: fix spelling of detach in label
    [media] cx88-blackbird: replace ioctl by unlocked_ioctl
    [media] cx88: don't use current_norm
    [media] cx88: fix a number of v4l2-compliance violations
    ...

    Linus Torvalds
     

24 Jul, 2012

1 commit

  • SCCB is a serial communication bus developed by Omnivision. Its 2-wire
    mode is very similar to SMBus byte data transactions, but requires the
    controller to ignore the ACK bit and to insert a stop condition after
    each message.

    Add a device SCCB flag and a message stop flag to be passed to
    controller drivers.

    [JD: Kill rogue definition in go7007 driver.]

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Jean Delvare

    Laurent Pinchart
     

30 Jun, 2012

1 commit

  • Some drivers (in particular for TV cards) need exclusive access to
    their I2C buses for specific operations. Export an unlocked flavor
    of i2c_transfer to give them full control.

    The unlocked flavor has the following limitations:
    * Obviously, caller must hold the i2c adapter lock.
    * No debug messages are logged. We don't want to log messages while
    holding a rt_mutex.
    * No check is done on the existence of adap->algo->master_xfer. It
    is thus the caller's responsibility to ensure that the function is
    OK to call.

    Signed-off-by: Jean Delvare
    Signed-off-by: Mauro Carvalho Chehab

    Jean Delvare
     

30 May, 2012

1 commit

  • Since there are uses for I2C_M_NOSTART which are much more sensible and
    standard than most of the protocol mangling functionality (the main one
    being gather writes to devices where something like a register address
    needs to be inserted before a block of data) create a new I2C_FUNC_NOSTART
    for this feature and update all the users to use it.

    Also strengthen the disrecommendation of the protocol mangling while we're
    at it.

    In the case of regmap-i2c we remove the requirement for mangling as
    I2C_M_NOSTART is the only mangling feature which is being used.

    Signed-off-by: Mark Brown
    Acked-by: Wolfram Sang
    Signed-off-by: Jean Delvare

    Mark Brown
     

12 May, 2012

1 commit

  • This converts a struct device * to a struct i2c_adapter * while verifying
    that the device really is an I2C adapter. Just like i2c_verify_client.

    Signed-off-by: Stephen Warren
    Acked-by: Jean Delvare
    Signed-off-by: Wolfram Sang

    Stephen Warren
     

27 Mar, 2012

1 commit


07 Jan, 2012

1 commit

  • This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
    and it fixes the build error in the arch/x86/kernel/microcode_core.c
    file, that the merge did not catch.

    The microcode_core.c patch was provided by Stephen Rothwell
    who was invaluable in the merge issues involved
    with the large sysdev removal process in the driver-core tree.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

23 Nov, 2011

1 commit


18 Nov, 2011

1 commit

  • This patch introduces the module_i2c_driver macro which is a convenience macro
    for I2C driver modules similar to module_platform_driver. It is intended to be
    used by drivers which init/exit section does nothing but register/unregister
    the I2C driver. By using this macro it is possible to eliminate a few lines of
    boilerplate code per I2C driver.

    Signed-off-by: Lars-Peter Clausen
    Acked-by: Grant Likely
    Acked-by: Jonathan Cameron
    Acked-by: Wolfram Sang
    Acked-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Lars-Peter Clausen
     

01 Nov, 2011

2 commits

  • The pretty much brings in the kitchen sink along
    with it, so it should be avoided wherever reasonably possible in
    terms of being included from other commonly used
    files, as it results in a measureable increase on compile times.

    The worst culprit was probably device.h since it is used everywhere.
    This file also had an implicit dependency/usage of mutex.h which was
    masked by module.h, and is also fixed here at the same time.

    There are over a dozen other headers that simply declare the
    struct instead of pulling in the whole file, so follow their lead
    and simply make it a few more.

    Most of the implicit dependencies on module.h being present by
    these headers pulling it in have been now weeded out, so we can
    finally make this change with hopefully minimal breakage.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • The original implementations reference THIS_MODULE in an inline.
    We could include , but it is better to avoid chaining.

    Fortunately someone else already thought of this, and made a similar
    inline into a #define in for device_schedule_callback(),
    [see commit 523ded71de0] so follow that precedent here.

    Also bubble up any __must_check that were used on the prev. wrapper inline
    functions up one to the real __register functions, to preserve any prev.
    sanity checks that were used in those instances.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

30 Oct, 2011

1 commit