1. 30 Oct, 2017 1 commit
    • Linus Walleij's avatar
      i2c: gpio: Convert to use descriptors · b2e63555
      Linus Walleij authored
      This converts the GPIO-based I2C-driver to using GPIO
      descriptors instead of the old global numberspace-based
      GPIO interface. We:
      - Convert the driver to unconditionally grab two GPIOs
        from the device by index 0 (SDA) and 1 (SCL) which
        will work fine with device tree and descriptor tables.
        The existing device trees will continue to work just
        like before, but without any roundtrip through the
        global numberspace.
      - Brutally convert all boardfiles still passing global
        GPIOs by registering descriptor tables associated with
        the devices instead so this driver does not need to keep
        supporting passing any GPIO numbers as platform data.
      There is no stepwise approach as elegant as this, I
      strongly prefer this big hammer over any antsteps for this
      conversion. This way the old GPIO numbers go away and
      Special conversion for the different boards utilizing
      - EP93xx (arch/arm/mach-ep93xx): pretty straight forward as
        all boards were using the same two GPIO lines, just define
        these two in a lookup table for "i2c-gpio" and register
        these along with the device. None of them define any
        other platform data so just pass NULL as platform data.
        This platform selects GPIOLIB so all should be smooth.
        The pins appear on a gpiochip for bank "G" as pins 1 (SDA)
        and 0 (SCL).
      - IXP4 (arch/arm/mach-ixp4): descriptor tables have to
        be registered for each board separately. They all use
        "IXP4XX_GPIO_CHIP" so it is pretty straight forward.
        Most board define no other platform data than SCL/SDA
        so they can drop the #include of <linux/i2c-gpio.h> and
        assign NULL to platform data.
        The "goramo_mlr" (Goramo Multilink Router) board is a bit
        worrisome: it implements its own I2C bit-banging in the
        board file, and optionally registers an I2C serial port,
        but claims the same GPIO lines for itself in the board file.
        This is not going to work: there will be competition for the
        GPIO lines, so delete the optional extra I2C bus instead, no
        I2C devices are registered on it anyway, there are just hints
        that it may contain an EEPROM that may be accessed from
        userspace. This needs to be fixed up properly by the serial
        clock using I2C emulation so drop a note in the code.
      - KS8695 board acs5k (arch/arm/mach-ks8695/board-acs5.c)
        has some platform data in addition to the pins so it needs to
        be kept around sans GPIO lines. Its GPIO chip is named
        "KS8695" and the arch selects GPIOLIB.
      - PXA boards (arch/arm/mach-pxa/*) use some of the platform
        data so it needs to be preserved here. The viper board even
        registers two GPIO I2Cs. The gpiochip is named "gpio-pxa" and
        the arch selects GPIOLIB.
      - SA1100 Simpad (arch/arm/mach-sa1100/simpad.c) defines a GPIO
        I2C bus, and the arch selects GPIOLIB.
      - Blackfin boards (arch/blackfin/bf533 etc) for these I assume
        their I2C GPIOs refer to the local gpiochip defined in
        arch/blackfin/kernel/bfin_gpio.c names "BFIN-GPIO".
        The arch selects GPIOLIB. The boards get spiked with
        IF_ENABLED(I2C_GPIO) but that is a side effect of it
        being like that already (I would just have Kconfig select
        I2C_GPIO and get rid of them all.) I also delete any
        platform data set to 0 as it will get that value anyway
        from static declartions of platform data.
      - The MIPS selects GPIOLIB and the Alchemy machine is using
        two local GPIO chips, one of them has a GPIO I2C. We need
        to adjust the local offset from the global number space here.
        The ATH79 has a proper GPIO driver in drivers/gpio/gpio-ath79.c
        and AFAICT the chip is named "ath79-gpio" and the PB44
        PCF857x expander spawns from this on GPIO 1 and 0. The latter
        board only use the platform data to specify pins so it can be
        cut altogether after this.
      - The MFD Silicon Motion SM501 is a special case. It dynamically
        spawns an I2C bus off the MFD using sm501_create_subdev().
        We use an approach to dynamically create a machine descriptor
        table and attach this to the "SM501-LOW" or "SM501-HIGH"
        gpiochip. We use chip-local offsets to grab the right lines.
        We can get rid of two local static inline helpers as part
        of this refactoring.
      Cc: Steven Miao <realmz6@gmail.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Ben Dooks <ben.dooks@codethink.co.uk>
      Cc: Heiko Schocher <hs@denx.de>
      Acked-by: default avatarWu, Aaron <Aaron.Wu@analog.com>
      Acked-by: default avatarOlof Johansson <olof@lixom.net>
      Acked-by: default avatarLee Jones <lee.jones@linaro.org>
      Acked-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
  2. 19 Feb, 2016 1 commit
  3. 22 Dec, 2015 1 commit
  4. 29 Oct, 2013 1 commit
    • Linus Walleij's avatar
      ARM: 7865/1: sa1100: fix simpad compilation warning · 9a48aa4c
      Linus Walleij authored
      When removing the complex GPIO interface from the SA1100 machines,
      we also removed the implicit #includes for a few header files
      that was included by <linux/gpio.h> thru <mach/gpio.h>, causing
      a compile warning on the simpad boardfile, as <asm/irq.h> was no
      longer #included, as follows:
      ./../arch/arm/include/asm/irq.h:9:0: warning: "NR_IRQS" redefined
      [enabled by default]
       #define NR_IRQS NR_IRQS_LEGACY
      In file included from ../../arch/arm/mach-sa1100/simpad.c:29:0:
      ../../arch/arm/mach-sa1100/include/mach/irqs.h:87:0: note: this is the
      location of the previous definition
      This resolves the problem by explicitly including <asm/irq.h>
      into the simpad boardfile.
      Reported-by: default avatarOlof Johansson <olof@lixom.net>
      Cc: Alexandre Courbot <acourbot@nvidia.com>
      Cc: Kristoffer Ericson <kristoffer.ericson@gmail.com>
      Cc: Kevin Hilman <khilman@linaro.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  5. 24 Dec, 2012 1 commit
  6. 16 Nov, 2012 1 commit
  7. 19 Sep, 2012 1 commit
  8. 14 Sep, 2012 1 commit
  9. 08 May, 2012 1 commit
  10. 25 Mar, 2012 1 commit
  11. 18 Feb, 2012 1 commit
  12. 09 Feb, 2012 1 commit
  13. 03 Feb, 2012 1 commit
  14. 20 Jan, 2012 2 commits
    • Russell King's avatar
      Revert "ARM: sa11x0: Implement autoloading of codec and codec pdata for mcp bus." · 65f2e753
      Russell King authored
      This reverts commit 5dd7bf59.
      This change is wrong on many levels.  First and foremost, it causes a
      regression.  On boot on Assabet, which this patch gives a codec id of
      'ucb1x00', it gives:
      	ucb1x00 ID not found: 1005
      0x1005 is a valid ID for the UCB1300 device.
      Secondly, this patch is way over the top in terms of complexity.  The
      only device which has been seen to be connected with this MCP code is
      the UCB1x00 (UCB1200, UCB1300 etc) devices, and they all use the same
      driver.  Adding a match table, requiring the codec string to match the
      hardware ID read out of the ID register, etc is completely over the top
      when we can just read the hardware ID register.
    • Russell King's avatar
      Revert "ARM: sa1100: Refactor mcp-sa11x0 to use platform resources." · 216f63c4
      Russell King authored
      This reverts commit af9081ae.
      This revert is necessary to revert 5dd7bf59.
  15. 08 Jan, 2012 2 commits
  16. 05 Jan, 2012 1 commit
  17. 17 Oct, 2011 4 commits
  18. 21 Aug, 2011 1 commit
  19. 03 Jan, 2011 1 commit
  20. 20 Oct, 2010 1 commit
    • Nicolas Pitre's avatar
      arm: remove machine_desc.io_pg_offst and .phys_io · 6451d778
      Nicolas Pitre authored
      Since we're now using addruart to establish the debug mapping, we can
      remove the io_pg_offst and phys_io members of struct machine_desc.
      The various declarations were removed using the following script:
        grep -rl MACHINE_START arch/arm | xargs \
        sed -i '/MACHINE_START/,/MACHINE_END/ { /\.\(phys_io\|io_pg_offst\)/d }'
      [ Initial patch was from Jeremy Kerr, example script from Russell King ]
      Signed-off-by: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
      Acked-by: Eric Miao <eric.miao at canonical.com>
  21. 06 Dec, 2009 1 commit
  22. 06 Sep, 2008 1 commit
  23. 07 Aug, 2008 2 commits
  24. 30 Jun, 2006 1 commit
  25. 13 Jan, 2006 1 commit
  26. 29 Oct, 2005 1 commit
  27. 28 Oct, 2005 1 commit
  28. 18 Aug, 2005 1 commit
  29. 03 Jul, 2005 1 commit
  30. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      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!