10 Feb, 2017

1 commit

  • Declare i2c_algorithm structures as const as they are only stored in the
    algo field of an i2c_adapter structure. This field is of type const, so
    i2c_algorithm structures having this property can be made const too.

    Signed-off-by: Bhumika Goyal
    Acked-by: Uwe Kleine-König for
    Acked-by: Patrice Chotard
    Acked-by: Jarkko Nikula
    Reviewed-by: Jean Delvare
    Acked-by: Ludovic Desroches
    Signed-off-by: Wolfram Sang

    Bhumika Goyal
     

25 Oct, 2016

1 commit

  • If the driver is built as a module, autoload won't work because the module
    alias information is not filled. So user-space can't match the registered
    device with the corresponding module.

    Export the module alias information using the MODULE_DEVICE_TABLE() macro.

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Wolfram Sang

    Javier Martinez Canillas
     

22 Aug, 2016

1 commit

  • The core will do this for us now.

    Signed-off-by: Wolfram Sang
    Reviewed-by: Grygorii Strashko
    Acked-by: Peter Korsgaard
    Acked-by: Heiko Stuebner
    Acked-by: Neil Horman
    Acked-by: Thierry Reding
    Acked-by: Ray Jui
    Acked-by: Vladimir Zapolskiy
    Acked-by: Ludovic Desroches
    Acked-by: Krzysztof Kozlowski
    Acked-by: Laxman Dewangan
    Signed-off-by: Wolfram Sang

    Wolfram Sang
     

16 Dec, 2015

2 commits

  • The Sigma Designs variant of this controller has the ability to generate
    interrupts. This is controlled using two additional registers, oddly
    enough overlapping with the defined but unused HDSTATIM.

    This patch adds support for using this feature instead of busy-looping
    if an IRQ is specified.

    Signed-off-by: Mans Rullgard
    Signed-off-by: Wolfram Sang

    Måns Rullgård
     
  • The BYTECNT register holds the transfer size minus one. Setting it to
    the correct value removes the need for a dummy read/write at the end of
    each transfer. As zero-length transfers are not supported, do not
    advertise I2C_FUNC_SMBUS_QUICK.

    In other words, this patch makes the driver transfer the number of bytes
    requested unless this is zero, which is not supported by the hardware
    and is thus refused.

    Signed-off-by: Mans Rullgard
    Signed-off-by: Wolfram Sang

    Måns Rullgård
     

15 Dec, 2015

1 commit

  • Sigma Designs chips use a variant of this controller with the following
    differences:

    - The BUSY bit in the STATUS register is inverted
    - Bit 8 of the CONFIG register must be set
    - The controller can generate interrupts

    This patch adds support for the first two of these. It also calculates
    and sets the correct clock divisor if a clk is provided. The bus
    frequency is optionally speficied in the device tree node.

    Signed-off-by: Mans Rullgard
    Signed-off-by: Wolfram Sang

    Måns Rullgård
     

20 Oct, 2014

1 commit


25 Jan, 2014

1 commit


27 Feb, 2013

1 commit

  • Pull i2c updates from Wolfram Sang:
    "Highlights:

    - new drivers for Intel ismt & Broadcom bcm2835
    - a number of drivers got support for more variants and mostly got
    cleaned up on the way (sis630, i801, at91, tegra, designware)
    - i2c got rid of all *_set_drvdata(..., NULL) on remove/probe failure
    - removed the i2c_smbus_process_call from the core since there are no
    users
    - mxs can now switch between PIO and DMA depending on the message
    size and the bus speed can now be arbitrary

    In addition, there is the usual bunch of fixes, cleanups, devm_*
    conversions, etc"

    Fixed conflict (and buggy devm_* conversion) in i2c-s3c2410.c

    * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (39 commits)
    i2c: Remove unneeded xxx_set_drvdata(..., NULL) calls
    i2c: pxa: remove incorrect __exit annotations
    i2c: ocores: Fix pointer to integer cast warning
    i2c: tegra: remove warning dump if timeout happen in transfer
    i2c: fix i2c-ismt.c printk format warning
    i2c: i801: Add Device IDs for Intel Wellsburg PCH
    i2c: add bcm2835 driver
    i2c: ismt: Add Seth and Myself as maintainers
    i2c: sis630: checkpatch cleanup
    i2c: sis630: display unsigned hex
    i2c: sis630: use hex to constants for SMBus commands
    i2c: sis630: fix behavior after collision
    i2c: sis630: clear sticky bits
    i2c: sis630: Add SIS964 support
    i2c: isch: Add module parameter for backbone clock rate if divider is unset
    i2c: at91: fix unsed variable warning when building with !CONFIG_OF
    i2c: Adding support for Intel iSMT SMBus 2.0 host controller
    i2c: sh_mobile: don't send a stop condition by default inside transfers
    i2c: sh_mobile: eliminate an open-coded "goto" loop
    i2c: sh_mobile: fix timeout error handling
    ...

    Linus Torvalds
     

22 Feb, 2013

1 commit

  • There is simply no reason to be manually setting the private driver
    data to NULL in the remove/fail to probe cases. This is just extra
    cruft code that can be removed.

    A few notes:
    * Nothing relies on drvdata being set to NULL.
    * The __device_release_driver() function eventually calls
    dev_set_drvdata(dev, NULL) anyway, so there's no need to do it
    twice.
    * I verified that there were no cases where xxx_get_drvdata() was
    being called in these drivers and checking for / relying on the NULL
    return value.

    This could be cleaned up kernel-wide but for now just take the baby
    step and remove from the i2c subsystem.

    Reported-by: Wolfram Sang
    Reported-by: Stephen Warren
    Signed-off-by: Doug Anderson
    Reviewed-by: Jean Delvare
    Acked-by: Peter Korsgaard
    Reviewed-by: Mika Westerberg
    Reviewed-by: Marek Vasut
    Signed-off-by: Wolfram Sang

    Doug Anderson
     

25 Jan, 2013

1 commit

  • Convert all uses of devm_request_and_ioremap() to the newly introduced
    devm_ioremap_resource() which provides more consistent error handling.

    devm_ioremap_resource() provides its own error messages so all explicit
    error messages can be removed from the failure code paths.

    Signed-off-by: Thierry Reding
    Acked-by: Wolfram Sang
    Cc: Ben Dooks
    Signed-off-by: Greg Kroah-Hartman

    Thierry Reding
     

23 Dec, 2012

1 commit

  • CONFIG_HOTPLUG is going away as an option. As result the __dev*
    markings will be going away.

    Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
    and __devexit.

    Signed-off-by: Bill Pemberton
    Acked-by: Peter Korsgaard (for ocores and mux-gpio)
    Acked-by: Havard Skinnemoen (for i2c-gpio)
    Acked-by: Guan Xuetao (for puf3)
    Acked-by: Barry Song (for sirf)
    Reviewed-by: Jean Delvare
    [wsa: Fixed "foo* bar" flaws while we are here]
    Signed-off-by: Wolfram Sang

    Bill Pemberton
     

25 Feb, 2012

1 commit

  • Add support for the intergrated I2C controller on Netlogic
    XLR/XLS MIPS SoC.

    The changes are to add a new file i2c/buses/i2c-xlr.c, containing the
    i2c bus implementation, and to update i2c/buses/{Kconfig,Makefile} to
    add the CONFIG_I2C_XLR option.

    Signed-off-by: Ganesan Ramalingam
    Signed-off-by: Jayachandran C
    Signed-off-by: Wolfram Sang

    Ganesan Ramalingam