1. 23 Jan, 2013 1 commit
    • Linus Walleij's avatar
      drivers/pinctrl: grab default handles from device core · ab78029e
      Linus Walleij authored
      This makes the device core auto-grab the pinctrl handle and set
      the "default" (PINCTRL_STATE_DEFAULT) state for every device
      that is present in the device model right before probe. This will
      account for the lion's share of embedded silicon devcies.
      
      A modification of the semantics for pinctrl_get() is also done:
      previously if the pinctrl handle for a certain device was already
      taken, the pinctrl core would return an error. Now, since the
      core may have already default-grabbed the handle and set its
      state to "default", if the handle was already taken, this will
      be disregarded and the located, previously instanitated handle
      will be returned to the caller.
      
      This way all code in drivers explicitly requesting their pinctrl
      handlers will still be functional, and drivers that want to
      explicitly retrieve and switch their handles can still do that.
      But if the desired functionality is just boilerplate of this
      type in the probe() function:
      
      struct pinctrl  *p;
      
      p = devm_pinctrl_get_select_default(&dev);
      if (IS_ERR(p)) {
         if (PTR_ERR(p) == -EPROBE_DEFER)
              return -EPROBE_DEFER;
              dev_warn(&dev, "no pinctrl handle\n");
      }
      
      The discussion began with the addition of such boilerplate
      to the omap4 keypad driver:
      http://marc.info/?l=linux-input&m=135091157719300&w=2
      
      A previous approach using notifiers was discussed:
      http://marc.info/?l=linux-kernel&m=135263661110528&w=2
      This failed because it could not handle deferred probes.
      
      This patch alone does not solve the entire dilemma faced:
      whether code should be distributed into the drivers or
      if it should be centralized to e.g. a PM domain. But it
      solves the immediate issue of the addition of boilerplate
      to a lot of drivers that just want to grab the default
      state. As mentioned, they can later explicitly retrieve
      the handle and set different states, and this could as
      well be done by e.g. PM domains as it is only related
      to a certain struct device * pointer.
      
      ChangeLog v4->v5 (Stephen):
      - Simplified the devicecore grab code.
      - Deleted a piece of documentation recommending that pins
        be mapped to a device rather than hogged.
      ChangeLog v3->v4 (Linus):
      - Drop overzealous NULL checks.
      - Move kref initialization to pinctrl_create().
      - Seeking Tested-by from Stephen Warren so we do not disturb
        the Tegra platform.
      - Seeking ACK on this from Greg (and others who like it) so I
        can merge it through the pinctrl subsystem.
      ChangeLog v2->v3 (Linus):
      - Abstain from using IS_ERR_OR_NULL() in the driver core,
        Russell recently sent a patch to remove it. Handle the
        NULL case explicitly even though it's a bogus case.
      - Make sure we handle probe deferral correctly in the device
        core file. devm_kfree() the container on error so we don't
        waste memory for devices without pinctrl handles.
      - Introduce reference counting into the pinctrl core using
        <linux/kref.h> so that we don't release pinctrl handles
        that have been obtained for two or more places.
      ChangeLog v1->v2 (Linus):
      - Only store a pointer in the device struct, and only allocate
        this if it's really used by the device.
      
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Mitch Bradley <wmb@firmworks.com>
      Cc: Ulf Hansson <ulf.hansson@linaro.org>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      Cc: Rickard Andersson <rickard.andersson@stericsson.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Reviewed-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      [swarren: fixed and simplified error-handling in pinctrl_bind_pins(), to
      correctly handle deferred probe. Removed admonition from docs not to use
      pinctrl hogs for devices]
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      ab78029e
  2. 21 Jan, 2013 3 commits
  3. 18 Jan, 2013 6 commits
  4. 11 Jan, 2013 8 commits
  5. 10 Jan, 2013 1 commit
  6. 09 Jan, 2013 6 commits
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · 5c49985c
      Linus Torvalds authored
      Pull ARM fixes from Russell King.
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: 7616/1: cache-l2x0: aurora: Use writel_relaxed instead of writel
        ARM: 7615/1: cache-l2x0: aurora: Invalidate during clean operation with WT enable
        ARM: 7614/1: mm: fix wrong branch from Cortex-A9 to PJ4b
        ARM: 7612/1: imx: Do not select some errata that depends on !ARCH_MULTIPLATFORM
        ARM: 7611/1: VIC: fix bug in VIC irqdomain code
        ARM: 7610/1: versatile: bump IRQ numbers
        ARM: 7609/1: disable errata work-arounds which access secure registers
        ARM: 7608/1: l2x0: Only set .set_debug on PL310 r3p0 and earlier
      5c49985c
    • Linus Torvalds's avatar
      Merge tag 'edac_fixes_for_3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp · 57a0c1e2
      Linus Torvalds authored
      Pull EDAC fixes from Borislav Petkov:
       "Two error path fixes causing a crash and a Kconfig fix for an issue
        which spilled all EDAC suboptions into the 'Device Drivers' menu."
      
      * tag 'edac_fixes_for_3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
        EDAC: Cleanup device deregistering path
        EDAC: Fix EDAC Kconfig menu
        EDAC: Fix kernel panic on module unloading
      57a0c1e2
    • Linus Torvalds's avatar
      mm: reinstante dropped pmd_trans_splitting() check · e53289c0
      Linus Torvalds authored
      The check for a pmd being in the process of being split was dropped by
      mistake by commit d10e63f2 ("mm: numa: Create basic numa page
      hinting infrastructure"). Put it back.
      Reported-by: default avatarDave Jones <davej@redhat.com>
      Debugged-by: default avatarHillf Danton <dhillf@gmail.com>
      Acked-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
      Acked-by: default avatarMel Gorman <mgorman@suse.de>
      Cc: Kirill Shutemov <kirill@shutemov.name>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e53289c0
    • Marc Dionne's avatar
      cred: Remove tgcred pointer from struct cred · 08c097fc
      Marc Dionne authored
      Commit 3a50597d ("KEYS: Make the session and process keyrings
      per-thread") removed the definition of the thread_group_cred structure,
      but left a now unused pointer in struct cred.
      Signed-off-by: default avatarMarc Dionne <marc.c.dionne@gmail.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      08c097fc
    • Linus Torvalds's avatar
      Merge tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 974b3358
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "People are back from the holiday breaks, and it shows.  Here are a
        bunch of fixes for a number of platforms:
         - A couple of small fixes for Nomadik
         - A larger set of changes for kirkwood/mvebu
           - uart driver selection, dt clocks, gpio-poweroff fixups, a few
             __init annotation fixes and some error handling improvement in
             their xor dma driver.
         - i.MX had a couple of minor fixes (and a critical one for flexcan2
           clock setup)
         - MXS has a small board fix and a framebuffer bugfix
         - A set of fixes for Samsung Exynos, fixing default bootargs and some
           Exynos5440 clock issues
         - A set of OMAP changes including PM fixes and a few sparse warning
           fixups
      
        All in all a bit more positive code delta than we'd ideally want to
        see here, mostly from the OMAP PM changes, but nothing overly crazy."
      
      * tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (44 commits)
        ARM: clps711x: Fix bad merge of clockevents setup
        ARM: highbank: save and restore L2 cache and GIC on suspend
        ARM: highbank: add a power request clear
        ARM: highbank: fix secondary boot and hotplug
        ARM: highbank: fix typos with hignbank in power request functions
        ARM: dts: fix highbank cpu mpidr values
        ARM: dts: add device_type prop to cpu nodes on Calxeda platforms
        ARM: mx5: Fix MX53 flexcan2 clock
        ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
        pinctrl: mvebu: make pdma clock on dove mandatory
        ARM: Dove: Add pinctrl clock to DT
        dma: mv_xor: fix error handling for clocks
        dma: mv_xor: fix error handling of mv_xor_channel_add()
        arm: mvebu: Add missing ; for cpu node.
        arm: mvebu: Armada XP MV78230 has only three Ethernet interfaces
        arm: mvebu: Armada XP MV78230 has two cores, not one
        clk: mvebu: Remove inappropriate __init tagging
        ARM: Kirkwood: Use fixed-regulator instead of board gpio call
        ARM: Kirkwood: Fix missing sdio clock
        ARM: Kirkwood: Switch TWSI1 of 88f6282 to DT clock providers
        ...
      974b3358
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · ca5c8a4c
      Linus Torvalds authored
      Pull drm update from Dave Airlie:
       "Exynos and Radeon mostly, with a dma-buf and ttm fix thrown in.
      
        It's a bit big but its mostly exynos license fix ups and I'd rather
        not hold those up since its legally stuff.
      
        Radeon has a couple of fixes from dma engine work, TTM is just a
        locking fix, and dma-buf fix has been hanging around and I finally got
        a chance to review it."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (30 commits)
        drm/ttm: fix fence locking in ttm_buffer_object_transfer
        drm/prime: drop reference on imported dma-buf come from gem
        drm/radeon: add quirk for d3 delay during switcheroo poweron for apple macbooks
        drm/exynos: move finish page flip to a common place
        drm/exynos: fimd: modify condition in fimd resume
        drm/radeon: fix DMA CS parser for r6xx linear copy packet
        drm/radeon: split r6xx and r7xx copy_dma functions
        drm/exynos: Use devm_clk_get in exynos_drm_gsc.c
        drm/exynos: Remove redundant NULL check in exynos_drm_gsc.c
        drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_gsc.c
        drm/exynos: Use devm_clk_get in exynos_drm_rotator.c
        drm/exynos: Remove redundant NULL check in exynos_drm_rotator.c
        drm/exynos: Remove unnecessary devm_* freeing APIs in exynos_drm_rotator.c
        drm/exynos: Use devm_clk_get in exynos_drm_fimc.c
        drm/exynos: Remove redundant NULL check
        drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_fimc.c
        drm/exynos: Use devm_kzalloc in exynos_drm_ipp.c
        drm/exynos: fix gem buffer allocation type checking
        drm/exynos: remove needless parenthesis.
        drm/exynos: fix incorrect interrupt induced by m2m operation.
        ...
      ca5c8a4c
  7. 08 Jan, 2013 15 commits