1. 25 Oct, 2011 1 commit
  2. 20 Oct, 2011 4 commits
  3. 13 Oct, 2011 3 commits
    • Rongjun Ying's avatar
      pinctrl: add a driver for the CSR SiRFprimaII pinmux · 393daa81
      Rongjun Ying authored
      This creates a pin controller driver for the SiRFprinaII
      pin mux portions.
      Signed-off-by: default avatarRongjun Ying <Rongjun.Ying@csr.com>
      Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
      [Fixup for changed function names and semantics in the v10 patch]
      Signed-off-by: default avatarLinus Walleij <linus.walleij@stericsson.com>
      393daa81
    • Linus Walleij's avatar
      pinctrl: add a driver for the U300 pinmux · 98da3529
      Linus Walleij authored
      This adds a driver for the U300 pinmux portions of the system
      controller "SYSCON". It also serves as an example of how to use
      the pinmux subsystem. This driver also houses the platform data
      for the only supported platform.
      
      This deletes the old U300 driver in arch/arm/mach-u300 and
      replace it with a driver using the new subsystem.
      
      The new driver is considerably fatter than the old one, but it
      also registers all 467 pins of the system and adds the power
      and EMIF pin groups and corresponding functions. The idea
      is to use this driver as a a reference for other
      implementation so it needs to be as complete and verbose
      as possible.
      Reviewed-by: default avatarBarry Song <21cnbao@gmail.com>
      [Fixup for changed function names and semantics in the v10 patch]
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      98da3529
    • Linus Walleij's avatar
      drivers: create a pin control subsystem · 2744e8af
      Linus Walleij authored
      This creates a subsystem for handling of pin control devices.
      These are devices that control different aspects of package
      pins.
      
      Currently it handles pinmuxing, i.e. assigning electronic
      functions to groups of pins on primarily PGA and BGA type of
      chip packages which are common in embedded systems.
      
      The plan is to also handle other I/O pin control aspects
      such as biasing, driving, input properties such as
      schmitt-triggering, load capacitance etc within this
      subsystem, to remove a lot of ARM arch code as well as
      feature-creepy GPIO drivers which are implementing the same
      thing over and over again.
      
      This is being done to depopulate the arch/arm/* directory
      of such custom drivers and try to abstract the infrastructure
      they all need. See the Documentation/pinctrl.txt file that is
      part of this patch for more details.
      
      ChangeLog v1->v2:
      
      - Various minor fixes from Joe's and Stephens review comments
      - Added a pinmux_config() that can invoke custom configuration
        with arbitrary data passed in or out to/from the pinmux driver
      
      ChangeLog v2->v3:
      
      - Renamed subsystem folder to "pinctrl" since we will likely
        want to keep other pin control such as biasing in this
        subsystem too, so let us keep to something generic even though
        we're mainly doing pinmux now.
      - As a consequence, register pins as an abstract entity separate
        from the pinmux. The muxing functions will claim pins out of the
        pin pool and make sure they do not collide. Pins can now be
        named by the pinctrl core.
      - Converted the pin lookup from a static array into a radix tree,
        I agreed with Grant Likely to try to avoid any static allocation
        (which is crap for device tree stuff) so I just rewrote this
        to be dynamic, just like irq number descriptors. The
        platform-wide definition of number of pins goes away - this is
        now just the sum total of the pins registered to the subsystem.
      - Make sure mappings with only a function name and no device
        works properly.
      
      ChangeLog v3->v4:
      
      - Define a number space per controller instead of globally,
        Stephen and Grant requested the same thing so now maps need to
        define target controller, and the radix tree of pin descriptors
        is a property on each pin controller device.
      - Add a compulsory pinctrl device entry to the pinctrl mapping
        table. This must match the pinctrl device, like "pinctrl.0"
      - Split the file core.c in two: core.c and pinmux.c where the
        latter carry all pinmux stuff, the core is for generic pin
        control, and use local headers to access functionality between
        files. It is now possible to implement a "blank" pin controller
        without pinmux capabilities. This split will make new additions
        like pindrive.c, pinbias.c etc possible for combined drivers
        and chunks of functionality which is a GoodThing(TM).
      - Rewrite the interaction with the GPIO subsystem - the pin
        controller descriptor now handles this by defining an offset
        into the GPIO numberspace for its handled pin range. This is
        used to look up the apropriate pin controller for a GPIO pin.
        Then that specific GPIO range is matched 1-1 for the target
        controller instance.
      - Fixed a number of review comments from Joe Perches.
      - Broke out a header file pinctrl.h for the core pin handling
        stuff that will be reused by other stuff than pinmux.
      - Fixed some erroneous EXPORT() stuff.
      - Remove mispatched U300 Kconfig and Makefile entries
      - Fixed a number of review comments from Stephen Warren, not all
        of them - still WIP. But I think the new mapping that will
        specify which function goes to which pin mux controller address
        50% of your concerns (else beat me up).
      
      ChangeLog v4->v5:
      
      - Defined a "position" for each function, so the pin controller now
        tracks a function in a certain position, and the pinmux maps define
        what position you want the function in. (Feedback from Stephen
        Warren and Sascha Hauer).
      - Since we now need to request a combined function+position from
        the machine mapping table that connect mux settings to drivers,
        it was extended with a position field and a name field. The
        name field is now used if you e.g. need to switch between two
        mux map settings at runtime.
      - Switched from a class device to using struct bus_type for this
        subsystem. Verified sysfs functionality: seems to work fine.
        (Feedback from Arnd Bergmann and Greg Kroah-Hartman)
      - Define a per pincontroller list of GPIO ranges from the GPIO
        pin space that can be handled by the pin controller. These can
        be added one by one at runtime. (Feedback from Barry Song)
      - Expanded documentation of regulator_[get|enable|disable|put]
        semantics.
      - Fixed a number of review comments from Barry Song. (Thanks!)
      
      ChangeLog v5->v6:
      
      - Create an abstract pin group concept that can sort pins into
        named and enumerated groups no matter what the use of these
        groups may be, one possible usecase is a group of pins being
        muxed in or so. The intention is however to also use these
        groups for other pin control activities.
      - Make it compulsory for pinmux functions to associate with
        at least one group, so the abstract pin group concept is used
        to define the groups of pins affected by a pinmux function.
        The pinmux driver interface has been altered so as to enforce
        a function to list applicable groups per function.
      - Provide an optional .group entry in the pinmux machine map
        so the map can select beteween different available groups
        to be used with a certain function.
      - Consequent changes all over the place so that e.g. debugfs
        present reasonable information about the world.
      - Drop the per-pin mux (*config) function in the pinmux_ops
        struct - I was afraid that this would start to be used for
        things totally unrelated to muxing, we can introduce that to
        the generic struct pinctrl_ops if needed. I want to keep
        muxing orthogonal to other pin control subjects and not mix
        these things up.
      
      ChangeLog v6->v7:
      
      - Make it possible to have several map entries matching the
        same device, pin controller and function, but using
        a different group, and alter the semantics so that
        pinmux_get() will pick all matching map entries, and
        store the associated groups in a list. The list will
        then be iterated over at pinmux_enable()/pinmux_disable()
        and corresponding driver functions called for each
        defined group. Notice that you're only allowed to map
        multiple *groups* to the same
        { device, pin controller, function } triplet, attempts
        to map the same device to multiple pin controllers will
        for example fail. This is hopefully the crucial feature
        requested by Stephen Warren.
      - Add a pinmux hogging field to the pinmux mapping entries,
        and enable the pinmux core to hog pinmux map entries.
        This currently only works for pinmuxes without assigned
        devices as it looks now, but with device trees we can
        look up the corresponding struct device * entries when
        we register the pinmux driver, and have it hog each
        pinmux map in turn, for a simple approach to
        non-dynamic pin muxing. This addresses an issue from
        Grant Likely that the machine should take care of as
        much of the pinmux setup as possible, not the devices.
        By supplying a list of hogs, it can now instruct the
        core to take care of any static mappings.
      - Switch pinmux group retrieveal function to grab an
        array of strings representing the groups rather than an
        array of unsigned and rewrite accordingly.
      - Alter debugfs to show the grouplist handled by each
        pinmux. Also add a list of hogs.
      - Dynamically allocate a struct pinmux at pinmux_get() and
        free it at pinmux_put(), then add these to the global
        list of pinmuxes active as we go along.
      - Go over the list of pinmux maps at pinmux_get() time
        and repeatedly apply matches.
      - Retrieve applicable groups per function from the driver
        as a string array rather than a unsigned array, then
        lookup the enumerators.
      - Make the device to pinmux map a singleton - only allow the
        mapping table to be registered once and even tag the
        registration function with __init so it surely won't be
        abused.
      - Create a separate debugfs file to view the pinmux map at
        runtime.
      - Introduce a spin lock to the pin descriptor struct, lock it
        when modifying pin status entries. Reported by Stijn Devriendt.
      - Fix up the documentation after review from Stephen Warren.
      - Let the GPIO ranges give names as const char * instead of some
        fixed-length string.
      - add a function to unregister GPIO ranges to mirror the
        registration function.
      - Privatized the struct pinctrl_device and removed it from the
        <linux/pinctrl/pinctrl.h> API, the drivers do not need to know
        the members of this struct. It is now in the local header
        "core.h".
      - Rename the concept of "anonymous" mux maps to "system" muxes
        and add convenience macros and documentation.
      
      ChangeLog v7->v8:
      
      - Delete the leftover pinmux_config() function from the
       <linux/pinctrl/pinmux.h> header.
      - Fix a race condition found by Stijn Devriendt in pin_request()
      
      ChangeLog v8->v9:
      
      - Drop the bus_type and the sysfs attributes and all, we're not on
        the clear about how this should be used for e.g. userspace
        interfaces so let us save this for the future.
      - Use the right name in MAINTAINERS, PIN CONTROL rather than
        PINMUX
      - Don't kfree() the device state holder, let the .remove() callback
        handle this.
      - Fix up numerous kerneldoc headers to have one line for the function
        description and more verbose documentation below the parameters
      
      ChangeLog v9->v10:
      - pinctrl: EXPORT_SYMBOL needs export.h, folded in a patch
        from Steven Rothwell
      - fix pinctrl_register error handling, folded in a patch from
        Axel Lin
      - Various fixes to documentation text so that it's consistent.
      - Removed pointless comment from drivers/Kconfig
      - Removed dependency on SYSFS since we removed the bus in
        v9.
      - Renamed hopelessly abbreviated pctldev_* functions to the
        more verbose pinctrl_dev_*
      - Drop mutex properly when looking up GPIO ranges
      - Return NULL instead of ERR_PTR() errors on registration of
        pin controllers, using cast pointers is fragile. We can
        live without the detailed error codes for sure.
      
      Cc: Stijn Devriendt <highguy@gmail.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Acked-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarStephen Warren <swarren@nvidia.com>
      Tested-by: default avatarBarry Song <21cnbao@gmail.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      2744e8af
  4. 27 Sep, 2011 8 commits
    • Linus Torvalds's avatar
      Linux 3.1-rc8 · a102a9ec
      Linus Torvalds authored
      a102a9ec
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://github.com/tiwai/sound · 058e0676
      Linus Torvalds authored
      * 'for-linus' of git://github.com/tiwai/sound:
        ASoC: ssm2602: Re-enable oscillator after suspend
        ALSA: usb-audio: Check for possible chip NULL pointer before clearing probing flag
        ALSA: hda/realtek - Don't detect LO jack when identical with HP
        ALSA: hda/realtek - Avoid bogus HP-pin assignment
        ALSA: HDA: No power nids on 92HD93
        ASoC: omap-mcbsp: Do not attempt to change DAI sysclk if stream is active
      058e0676
    • Linus Torvalds's avatar
      Merge branch 'pm-fixes' of git://github.com/rjwysocki/linux-pm · 57119327
      Linus Torvalds authored
      * 'pm-fixes' of git://github.com/rjwysocki/linux-pm:
        PM / Clocks: Do not acquire a mutex under a spinlock
      57119327
    • Takashi Iwai's avatar
      Merge branch 'fix/asoc' into for-linus · 0fac2590
      Takashi Iwai authored
      0fac2590
    • Linus Torvalds's avatar
      vfs: remove LOOKUP_NO_AUTOMOUNT flag · b6c8069d
      Linus Torvalds authored
      That flag no longer makes sense, since we don't look up automount points
      as eagerly any more.  Additionally, it turns out that the NO_AUTOMOUNT
      handling was buggy to begin with: it would avoid automounting even for
      cases where we really *needed* to do the automount handling, and could
      return ENOENT for autofs entries that hadn't been instantiated yet.
      
      With our new non-eager automount semantics, one discussion has been
      about adding a AT_AUTOMOUNT flag to vfs_fstatat (and thus the
      newfstatat() and fstatat64() system calls), but it's probably not worth
      it: you can always force at least directory automounting by simply
      adding the final '/' to the filename, which works for *all* of the stat
      family system calls, old and new.
      
      So AT_NO_AUTOMOUNT (and thus LOOKUP_NO_AUTOMOUNT) really were just a
      result of our bad default behavior.
      Acked-by: default avatarIan Kent <raven@themaw.net>
      Acked-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b6c8069d
    • Lars-Peter Clausen's avatar
      ASoC: ssm2602: Re-enable oscillator after suspend · 9058020c
      Lars-Peter Clausen authored
      Currently the the internal oscillator is powered down when entering BIAS_OFF
      state, but not re-enabled when going back to BIAS_STANDBY. As a result the
      CODEC will stop working after suspend if the internal oscillator is used to
      generate the sysclock signal. This patch fixes it by clearing the appropriate
      bit in the power down register when the CODEC is re-enabled.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: stable@kernel.org
      9058020c
    • Trond Myklebust's avatar
      VFS: Fix the remaining automounter semantics regressions · 815d405c
      Trond Myklebust authored
      The concensus seems to be that system calls such as stat() etc should
      not trigger an automount.  Neither should the l* versions.
      
      This patch therefore adds a LOOKUP_AUTOMOUNT flag to tag those lookups
      that _should_ trigger an automount on the last path element.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      [ Edited to leave out the cases that are already covered by LOOKUP_OPEN,
        LOOKUP_DIRECTORY and LOOKUP_CREATE - all of which also fundamentally
        force automounting for their own reasons   - Linus ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      815d405c
    • Linus Torvalds's avatar
      vfs pathname lookup: Add LOOKUP_AUTOMOUNT flag · d94c177b
      Linus Torvalds authored
      Since we've now turned around and made LOOKUP_FOLLOW *not* force an
      automount, we want to add the ability to force an automount event on
      lookup even if we don't happen to have one of the other flags that force
      it implicitly (LOOKUP_OPEN, LOOKUP_DIRECTORY, LOOKUP_PARENT..)
      
      Most cases will never want to use this, since you'd normally want to
      delay automounting as long as possible, which usually implies
      LOOKUP_OPEN (when we open a file or directory, we really cannot avoid
      the automount any more).
      
      But Trond argued sufficiently forcefully that at a minimum bind mounting
      a file and quotactl will want to force the automount lookup.  Some other
      cases (like nfs_follow_remote_path()) could use it too, although
      LOOKUP_DIRECTORY would work there as well.
      
      This commit just adds the flag and logic, no users yet, though.  It also
      doesn't actually touch the LOOKUP_NO_AUTOMOUNT flag that is related, and
      was made irrelevant by the same change that made us not follow on
      LOOKUP_FOLLOW.
      
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Ian Kent <raven@themaw.net>
      Cc: Jeff Layton <jlayton@redhat.com>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Greg KH <gregkh@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d94c177b
  5. 26 Sep, 2011 14 commits
  6. 25 Sep, 2011 3 commits
  7. 24 Sep, 2011 1 commit
  8. 23 Sep, 2011 6 commits