21 Sep, 2020

1 commit

  • Here is an I2C slave backend driver which allows to test some uncommon
    functionalities of the I2C and SMBus world. Usually, you need specific
    devices to test e.g. SMBus Host Notify and such. With this driver you
    just need the slave interface of another I2C controller.

    This initial version has testcases for multi-master and SMBus Host
    Notify. Already planned but not yet implemented are SMBus Alert and
    messages with I2C_M_RECV_LEN.

    Please read the documentation for further details.

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

    Wolfram Sang
     

25 Aug, 2020

1 commit


04 Jul, 2020

2 commits


14 Jun, 2020

1 commit

  • Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
    '---help---'"), the number of '---help---' has been gradually
    decreasing, but there are still more than 2400 instances.

    This commit finishes the conversion. While I touched the lines,
    I also fixed the indentation.

    There are a variety of indentation styles found.

    a) 4 spaces + '---help---'
    b) 7 spaces + '---help---'
    c) 8 spaces + '---help---'
    d) 1 space + 1 tab + '---help---'
    e) 1 tab + '---help---' (correct indentation)
    f) 1 tab + 1 space + '---help---'
    g) 1 tab + 2 spaces + '---help---'

    In order to convert all of them to 1 tab + 'help', I ran the
    following commend:

    $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

01 Aug, 2019

1 commit


21 May, 2019

1 commit


21 Dec, 2018

1 commit

  • The Kconfig lexer supports special characters such as '.' and '/' in
    the parameter context. In my understanding, the reason is just to
    support bare file paths in the source statement.

    I do not see a good reason to complicate Kconfig for the room of
    ambiguity.

    The majority of code already surrounds file paths with double quotes,
    and it makes sense since file paths are constant string literals.

    Make it treewide consistent now.

    Signed-off-by: Masahiro Yamada
    Acked-by: Wolfram Sang
    Acked-by: Geert Uytterhoeven
    Acked-by: Ingo Molnar

    Masahiro Yamada
     

16 Dec, 2016

1 commit

  • Pull i2c updates from Wolfram Sang:

    - the first series of making i2c_device_id optional instead of
    mandatory (in favor of alternatives like of_device_id).

    This involves adding a new probe callback (probe_new) which removes
    some peculiarities I2C had for a long time now. The new probe is
    matching the other subsystems now and the old one will be removed
    once all users are converted. It is expected to take a while but
    there is ongoing interest in that.

    - SMBus Host Notify introduced 4.9 got refactored. They are now using
    interrupts instead of the alert callback which solves multiple
    issues.

    - new drivers for iMX LowPower I2C, Mellanox CPLD and its I2C mux

    - significant refactoring for bcm2835 driver

    - the usual set of driver updates and improvements

    * 'i2c/for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (46 commits)
    i2c: fsl-lpi2c: read lpi2c fifo size in probe()
    i2c: octeon: thunderx: Remove double-check after interrupt
    i2c: octeon: thunderx: TWSI software reset in recovery
    i2c: cadence: Allow Cadence I2C to be selected for Cadence Xtensa CPUs
    i2c: sh_mobile: Add per-Generation fallback bindings
    i2c: rcar: Add per-Generation fallback bindings
    i2c: imx-lpi2c: add low power i2c bus driver
    dt-bindings: i2c: imx-lpi2c: add devicetree bindings
    i2c: designware-pcidrv: Add 10bit address feature to medfield/merrifield
    i2c: pxa: Add support for the I2C units found in Armada 3700
    i2c: pxa: Add definition of fast and high speed modes via the regs layout
    dt-bindings: i2c: pxa: Update the documentation for the Armada 3700
    i2c: qup: support SMBus block read
    i2c: qup: add ACPI support
    i2c: designware: Consolidate default functionality bits
    i2c: i2c-mux-gpio: update mux with gpiod_set_array_value_cansleep
    i2c: mux: pca954x: Add ACPI support for pca954x
    i2c: use an IRQ to report Host Notify events, not alert
    i2c: i801: remove SMBNTFDDAT reads as they always seem to return 0
    i2c: i801: use the BIT() macro for FEATURES_* also
    ...

    Linus Torvalds
     

24 Nov, 2016

1 commit

  • The current SMBus Host Notify implementation relies on .alert() to
    relay its notifications. However, the use cases where SMBus Host
    Notify is needed currently is to signal data ready on touchpads.

    This is closer to an IRQ than a custom API through .alert().
    Given that the 2 touchpad manufacturers (Synaptics and Elan) that
    use SMBus Host Notify don't put any data in the SMBus payload, the
    concept actually matches one to one.

    Benefits are multiple:
    - simpler code and API: the client will just have an IRQ, and
    nothing needs to be added in the adapter beside internally
    enabling it.
    - no more specific workqueue, the threading is handled by IRQ core
    directly (when required)
    - no more races when removing the device (the drivers are already
    required to disable irq on remove)
    - simpler handling for drivers: use plain regular IRQs
    - no more dependency on i2c-smbus for i2c-i801 (and any other adapter)
    - the IRQ domain is created automatically when the adapter exports
    the Host Notify capability
    - the IRQ are assign only if ACPI, OF and the caller did not assign
    one already
    - the domain is automatically destroyed on remove
    - fewer lines of code (minus 20, yeah!)

    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Wolfram Sang

    Benjamin Tissoires
     

15 Nov, 2016

1 commit

  • We get the following build error from UM Linux after adding
    an entry to drivers/iio/gyro/Kconfig that issues "select I2C_MUX":

    ERROR: "devm_ioremap_resource"
    [drivers/i2c/muxes/i2c-mux-reg.ko] undefined!
    ERROR: "of_address_to_resource"
    [drivers/i2c/muxes/i2c-mux-reg.ko] undefined!

    It appears that the I2C mux core code depends on HAS_IOMEM
    for historical reasons, while CONFIG_I2C_MUX_REG does *not*
    have a direct dependency on HAS_IOMEM.

    This creates a situation where a allyesconfig or allmodconfig
    for UM Linux will select I2C_MUX, and will implicitly enable
    I2C_MUX_REG as well, and the compilation will fail for the
    register driver.

    Fix this up by making I2C_MUX_REG depend on HAS_IOMEM and
    removing the dependency from I2C_MUX.

    Reported-by: kbuild test robot
    Reported-by: Jonathan Cameron
    Signed-off-by: Linus Walleij
    Acked-by: Jonathan Cameron
    Acked-by: Peter Rosin
    Signed-off-by: Wolfram Sang
    Cc: stable@kernel.org

    Linus Walleij
     

19 Jul, 2016

1 commit


07 Jan, 2015

1 commit


12 Dec, 2014

1 commit


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

1 commit


13 Sep, 2013

1 commit


11 Mar, 2013

1 commit

  • Remove !S390 dependency from i2c Kconfig, since s390 now supports PCI, HAS_IOMEM
    and HAS_DMA, however we need to add a couple of GENERIC_HARDIRQS dependecies to
    fix compile and link errors like these:

    ERROR: "devm_request_threaded_irq" [drivers/i2c/i2c-smbus.ko] undefined!
    ERROR: "devm_request_threaded_irq" [drivers/i2c/busses/i2c-ocores.ko] undefined!

    Cc: Wolfram Sang
    Cc: Jean Delvare
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

22 Jan, 2013

1 commit

  • The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
    while now and is almost always enabled by default. As agreed during the
    Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

    CC: Ralf Baechle
    CC: Manuel Lauss
    Signed-off-by: Kees Cook
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     

06 Oct, 2012

1 commit

  • Remove the global dependency of the I2C subsystem on HAS_IOMEM and
    move the dependency to the i2c/busses submenu, with an exception for
    i2c-stub.

    The generic I2C part does not need to have HAS_IOMEM set and thus now
    becomes available in UML, so the I2C subsystem can now be used, e.g.
    by the i2c-stub driver, for development of I2C device drivers.

    [JD: Some adjustments.]

    [Heiko Carstens: Keep I2C disabled on S390.]

    Signed-off-by: Peter Huewe
    Signed-off-by: Jean Delvare

    Peter Huewe
     

12 May, 2012

1 commit

  • We got multiple patches to add mux support to device tree, so people are
    using it happily already and build up on it. I also used it in a project
    without encountering problems. 20 months of EXPERIMENTAL should do for
    this.

    Signed-off-by: Wolfram Sang
    Acked-by: Peter Korsgaard
    Acked-by: Guenter Roeck
    Acked-by: Jean Delvare
    Acked-by: Stephen Warren
    Acked-by: Michael Lawnick
    Cc: Lars-Peter Clausen
    Cc: David Daney

    Wolfram Sang
     

11 Jul, 2011

1 commit


22 Nov, 2010

1 commit


25 Oct, 2010

1 commit

  • drivers/i2c/algos/Kconfig makes all the algorithms dependent on
    !I2C_HELPER_AUTO, which triggers a Kconfig warning about broken
    dependencies when some driver selects one of the algorithms. Ideally
    we would make only the prompts dependent on !I2C_HELPER_AUTO, however
    Kconfig doesn't currently support that. So we have to redefine the
    symbols separately for the I2C_HELPER_AUTO=y case.

    Signed-off-by: Jean Delvare
    Acked-by: Michal Marek

    Jean Delvare
     

12 Aug, 2010

2 commits


14 Mar, 2010

2 commits


02 Mar, 2010

1 commit

  • Having a separate Kconfig option for i2c-smbus makes it possible to
    build that support as a module even when i2c-core itself is built-in.
    Bus drivers which implement SMBus alert should select this option, so
    in most cases this option is hidden and the user doesn't have to care
    about it.

    Signed-off-by: Jean Delvare
    Cc: David Brownell
    Cc: Trent Piepho

    Jean Delvare
     

07 Dec, 2009

1 commit


19 Sep, 2009

1 commit


11 Aug, 2008

1 commit

  • In kernel 2.6.26, the ability to select I2C algorithm drivers manually
    was removed, as all in-kernel drivers do that automatically. However
    there were some complaints that it was a problem for out-of-tree I2C
    bus drivers. In order to address these complaints, let's allow manual
    selection of these drivers again, but still hide them by default for
    better general user experience.

    This closes bug #11140:
    http://bugzilla.kernel.org/show_bug.cgi?id=11140

    Signed-off-by: Jean Delvare

    Jean Delvare
     

10 May, 2007

1 commit


02 May, 2007

2 commits

  • Allow the whole I2C menu to be disabled at once without diving into
    the submenus for deselecting all options (should the user desire so).

    Signed-off-by: Jan Engelhardt
    Signed-off-by: Jean Delvare

    Jan Engelhardt
     
  • This provides partial support for new-style I2C driver binding. It builds
    on "struct i2c_board_info" declarations that identify I2C devices on a given
    board. This is needed on systems with I2C devices that can't be fully probed
    and/or autoconfigured, such as many embedded Linux configurations where the
    way a given I2C device is wired may affect how it must be used.

    There are two models for declaring such devices:

    * LATE -- using a public function i2c_new_device(). This lets modules
    declare I2C devices found *AFTER* a given I2C adapter becomes available.

    For example, a PCI card could create adapters giving access to utility
    chips on that card, and this would be used to associate those chips with
    those adapters.

    * EARLY -- from arch_initcall() level code, using a non-exported function
    i2c_register_board_info(). This copies the declarations *BEFORE* such
    an i2c_adapter becomes available, arranging that i2c_new_device() will
    be called later when i2c-core registers the relevant i2c_adapter.

    For example, arch/.../.../board-*.c files would declare the I2C devices
    along with their platform data, and I2C devices would behave much like
    PNPACPI devices. (That is, both enumerate from board-specific tables.)

    To match the exported i2c_new_device(), the previously-private function
    i2c_unregister_device() is now exported.

    Pending later patches using these new APIs, this is effectively a NOP.

    Signed-off-by: David Brownell
    Signed-off-by: Jean Delvare

    David Brownell
     

27 Sep, 2006

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds