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


26 May, 2011

1 commit


20 Mar, 2011

5 commits


22 Jan, 2011

1 commit


11 Jan, 2011

1 commit


16 Nov, 2010

1 commit

  • It's about time to make it clear that i2c_adapter.id is deprecated.
    Hopefully this will remind the last user to move over to a different
    strategy.

    Signed-off-by: Jean Delvare
    Acked-by: Jarod Wilson
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Hans Verkuil

    Jean Delvare
     

01 Nov, 2010

1 commit


25 Oct, 2010

2 commits


12 Aug, 2010

5 commits


11 Aug, 2010

1 commit

  • Fix kernel-doc warnings in linux/i2c.h:

    Warning(include/linux/i2c.h:176): No description found for parameter 'alert'
    Warning(include/linux/i2c.h:259): No description found for parameter 'of_node'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

22 May, 2010

1 commit