1. 24 2月, 2012 1 次提交
  2. 01 11月, 2011 1 次提交
  3. 27 5月, 2011 1 次提交
  4. 12 4月, 2011 1 次提交
  5. 27 3月, 2011 1 次提交
    • A
      mfd: Add mfd_clone_cell(), convert cs5535-mfd/olpc-xo1 to it · fa1df691
      Andres Salomon 提交于
      Replace mfd_shared_platform_driver_register with mfd_clone_cell.  The
      former was called by an mfd client, and registered both a platform driver
      and device.  The latter is called by an mfd driver, and registers only a
      platform device.
      
      The downside of this is that mfd drivers need to be modified whenever
      new clients are added that share a cell; the upside is that it fits
      Linux's driver model better.  It's also simpler.
      
      This also converts cs5535-mfd/olpc-xo1 from the old API.  cs5535-mfd
      now creates the olpc-xo1-{acpi,pms} devices, while olpc-xo1 binds to
      them via platform drivers.
      Signed-off-by: NAndres Salomon <dilinger@queued.net>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      fa1df691
  6. 23 3月, 2011 5 次提交
    • A
      mfd: Rename mfd_shared_cell_{en,dis}able to drop the "shared" part · f77289ac
      Andres Salomon 提交于
      As requested by Samuel, there's not really any reason to have "shared"
      in the name.
      
      This also modifies the only user of the function, as well.
      Signed-off-by: NAndres Salomon <dilinger@queued.net>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      f77289ac
    • A
      mfd: add platform_device sharing support for mfd · a9bbba99
      Andres Salomon 提交于
      This adds functions to enable platform_device sharing for mfd clients.
      
      Each platform driver (mfd client) that wants to share an mfd_cell's
      platform_device uses the mfd_shared_platform_driver_{un,}register()
      functions instead of platform_driver_{un,}register().  Along with
      registering the platform driver, these also register a new platform
      device with the same characteristics as the original cell, but a different
      name.  Given an mfd_cell with the name "foo", drivers that want to
      share access to its resources can call mfd_shared_platform_driver_register
      with platform drivers named (for example) "bar" and "baz".  This
      will register two platform devices and drivers named "bar" and "baz"
      that share the same cell as the platform device "foo".  The drivers
      can then call "foo" cell's enable hooks (or mfd_shared_cell_enable)
      to enable resources, and obtain platform resources as they normally
      would.
      
      This deals with platform handling only; mfd driver-specific details,
      hardware handling, refcounting, etc are all dealt with separately.
      Signed-off-by: NAndres Salomon <dilinger@queued.net>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      a9bbba99
    • A
      mfd: Add refcounting support to mfd_cells · 1e29af62
      Andres Salomon 提交于
      This provides convenience functions for sharing of cells across
      multiple mfd clients.  Mfd drivers can provide enable/disable hooks
      to actually tweak the hardware, and clients can call
      mfd_shared_cell_{en,dis}able without having to worry about whether
      or not another client happens to have enabled or disabled the
      cell/hardware.
      
      Note that this is purely optional; drivers can continue to use
      the mfd_cell's enable/disable hooks for their own purposes, if
      desired.
      Signed-off-by: NAndres Salomon <dilinger@queued.net>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      1e29af62
    • A
      mfd: Remove driver_data field from mfd_cell · dcb50e83
      Andres Salomon 提交于
      All users of this have now been switched over to using mfd_data;
      it can go away now.
      Signed-off-by: NAndres Salomon <dilinger@queued.net>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      dcb50e83
    • A
      mfd-core: Unconditionally add mfd_cell to every platform_device · fe891a00
      Andres Salomon 提交于
      Previously, one would set the mfd_cell's platform_data/data_size to point
      to the current mfd_cell in order to pass that information along to drivers.
      
      This causes the current mfd_cell to always be available to drivers.  It
      also adds a wrapper function for fetching the mfd cell from a platform
      device, similar to what originally existed for mfd devices.
      
      Drivers who previously used platform_data for other purposes can still
      use it; the difference is that mfd_get_data() must be used to
      access it (and the pdata structure is no longer allocated in
      mfd_add_devices).
      
      Note that mfd_get_data is intentionally vague (in name) about where
      the data is stored; variable name changes can come later without having
      to touch brazillions of drivers.
      Signed-off-by: NAndres Salomon <dilinger@queued.net>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      fe891a00
  7. 14 1月, 2011 1 次提交
  8. 29 10月, 2010 2 次提交
  9. 12 8月, 2010 1 次提交
  10. 28 5月, 2010 1 次提交
  11. 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
  12. 08 3月, 2010 1 次提交
  13. 17 9月, 2009 1 次提交
    • M
      mfd: Allow multiple MFD cells with the same name · 3bed6e41
      Mark Brown 提交于
      Provide basic support for MFDs having multiple cells of a given
      type with different IDs by adding an id to the mfd_cell structure
      and then adding that to the id passed in to mfd_add_devices().
      
      As it stands this approach requires that MFDs using this feature
      deal with ensuring that there aren't any ID collisions resulting
      from multiple MFDs of the same type being instantiated. This needs
      to happen with the existing code too, but with this approach there
      is a knock on effect on the IDs for non-duplicated devices.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      3bed6e41
  14. 04 1月, 2009 1 次提交
  15. 20 10月, 2008 1 次提交
  16. 29 7月, 2008 4 次提交
  17. 26 7月, 2008 1 次提交
  18. 07 7月, 2008 1 次提交