1. 27 5月, 2018 1 次提交
  2. 29 11月, 2017 1 次提交
  3. 30 10月, 2017 2 次提交
    • L
      i2c: gpio: Augment all boardfiles to use open drain · 4d0ce62c
      Linus Walleij 提交于
      We now handle the open drain mode internally in the I2C GPIO
      driver, but we will get warnings from the gpiolib that we
      override the default mode of the line so it becomes open
      drain.
      
      We can fix all in-kernel users by simply passing the right
      flag along in the descriptor table, and we already touched
      all of these files in the series so let's just tidy it up.
      
      Cc: Steven Miao <realmz6@gmail.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Acked-by: NOlof Johansson <olof@lixom.net>
      Acked-by: NLee Jones <lee.jones@linaro.org>
      Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NWu, Aaron <Aaron.Wu@analog.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      4d0ce62c
    • L
      i2c: gpio: Convert to use descriptors · b2e63555
      Linus Walleij 提交于
      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
      NEVER COME BACK.
      
      Special conversion for the different boards utilizing
      I2C-GPIO:
      
      - 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: NWu, Aaron <Aaron.Wu@analog.com>
      Acked-by: NOlof Johansson <olof@lixom.net>
      Acked-by: NLee Jones <lee.jones@linaro.org>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      b2e63555
  4. 02 12月, 2015 1 次提交
  5. 15 10月, 2015 1 次提交
  6. 16 9月, 2015 1 次提交
    • T
      genirq: Remove irq argument from irq flow handlers · bd0b9ac4
      Thomas Gleixner 提交于
      Most interrupt flow handlers do not use the irq argument. Those few
      which use it can retrieve the irq number from the irq descriptor.
      
      Remove the argument.
      
      Search and replace was done with coccinelle and some extra helper
      scripts around it. Thanks to Julia for her help!
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      bd0b9ac4
  7. 28 7月, 2015 1 次提交
    • R
      ARM: kill off set_irq_flags usage · e8d36d5d
      Rob Herring 提交于
      set_irq_flags is ARM specific with custom flags which have genirq
      equivalents. Convert drivers to use the genirq interfaces directly, so we
      can kill off set_irq_flags. The translation of flags is as follows:
      
      IRQF_VALID -> !IRQ_NOREQUEST
      IRQF_PROBE -> !IRQ_NOPROBE
      IRQF_NOAUTOEN -> IRQ_NOAUTOEN
      
      For IRQs managed by an irqdomain, the irqdomain core code handles clearing
      and setting IRQ_NOREQUEST already, so there is no need to do this in
      .map() functions and we can simply remove the set_irq_flags calls. Some
      users also modify IRQ_NOPROBE and this has been maintained although it
      is not clear that is really needed. There appears to be a great deal of
      blind copy and paste of this code.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Sekhar Nori <nsekhar@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Cc: Gregory Clement <gregory.clement@free-electrons.com>
      Acked-by: NHans Ulli Kroll <ulli.kroll@googlemail.com>
      Acked-by: NShawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: Imre Kaloz <kaloz@openwrt.org>
      Acked-by: NKrzysztof Halasa <khalasa@piap.pl>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Roland Stigge <stigge@antcom.de>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Daniel Mack <daniel@zonque.org>
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      Cc: Robert Jarzmik <robert.jarzmik@free.fr>
      Cc: Simtec Linux Team <linux@simtec.co.uk>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Acked-by: NWan ZongShun <mcuos.com@gmail.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-omap@vger.kernel.org
      Cc: linux-samsung-soc@vger.kernel.org
      Tested-by: NKevin Hilman <khilman@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      e8d36d5d
  8. 13 7月, 2015 1 次提交
    • T
      ARM/pxa: Prepare *_irq_handler for irq argument removal · 6947d04a
      Thomas Gleixner 提交于
      The irq argument of most interrupt flow handlers is unused or merily
      used instead of a local variable. The handlers which need the irq
      argument can retrieve the irq number from the irq descriptor.
      
      Search and update was done with coccinelle and the invaluable help of
      Julia Lawall.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Russell King <linux+kernel@arm.linux.org.uk>
      Cc: linux-arm-kernel@lists.infradead.org
      6947d04a
  9. 09 8月, 2014 1 次提交
  10. 19 3月, 2014 1 次提交
  11. 16 10月, 2013 1 次提交
  12. 25 12月, 2012 1 次提交
  13. 04 10月, 2012 1 次提交
    • A
      ARM: pxa: Wunused-result warning in viper board file · 5f0cc6d1
      Arnd Bergmann 提交于
      Calling kstrtoul requires checking the result. In case of
      the viper_tpm_setup function, let's fail the __setup function
      if the number was invalid.
      
      Without this patch, building viper_defconfig results in:
      
      arch/arm/mach-pxa/viper.c: In function 'viper_tpm_setup':
      arch/arm/mach-pxa/viper.c:771:10: warning: ignoring return value of 'kstrtoul', declared with attribute warn_unused_result [-Wunused-result]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NMarc Zyngier <maz@misterjones.org>
      Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
      Cc: Eric Miao <eric.y.miao@gmail.com>
      5f0cc6d1
  14. 14 9月, 2012 1 次提交
  15. 29 3月, 2012 1 次提交
  16. 26 1月, 2012 1 次提交
  17. 05 1月, 2012 1 次提交
  18. 14 11月, 2011 1 次提交
  19. 22 8月, 2011 1 次提交
  20. 12 7月, 2011 1 次提交
  21. 25 4月, 2011 1 次提交
  22. 29 3月, 2011 2 次提交
  23. 21 3月, 2011 1 次提交
  24. 16 3月, 2011 1 次提交
  25. 14 1月, 2011 1 次提交
  26. 16 12月, 2010 1 次提交
  27. 20 10月, 2010 1 次提交
    • N
      arm: remove machine_desc.io_pg_offst and .phys_io · 6451d778
      Nicolas Pitre 提交于
      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: NNicolas Pitre <nicolas.pitre@linaro.org>
      Acked-by: Eric Miao <eric.miao at canonical.com>
      6451d778
  28. 06 5月, 2010 1 次提交
  29. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  30. 02 3月, 2010 2 次提交
  31. 04 1月, 2010 1 次提交
  32. 13 12月, 2009 1 次提交
  33. 01 12月, 2009 2 次提交
  34. 05 6月, 2009 1 次提交
  35. 17 5月, 2009 1 次提交
  36. 09 3月, 2009 1 次提交
    • E
      [ARM] pxa: move PCMCIA definitions out of pxa-regs.h into pxa2xx_base.c · b393c696
      Eric Miao 提交于
      Move the processor specific initialization (largely resources initialization)
      out of soc_common_drv_pcmcia_probe() into dedicated sa11xx_drv_pcmcia_probe()
      and __pxa2xx_drv_pcmcia_probe().
      
      By doing this, we are now able to move the PCMCIA related definitions out of
      pxa-regs.h and back into pxa2xx_base.c.
      
      As a result, remove that reference of _PCMCIA1IO in arch/arm/mach-pxa/viper.c.
      Signed-off-by: NEric Miao <eric.miao@marvell.com>
      b393c696