Skip to content
Snippets Groups Projects
  1. May 10, 2010
  2. Mar 06, 2010
    • Rafael J. Wysocki's avatar
      PM: Provide generic subsystem-level callbacks · d690b2cd
      Rafael J. Wysocki authored
      
      There are subsystems whose power management callbacks only need to
      invoke the callbacks provided by device drivers.  Still, their system
      sleep PM callbacks should play well with the runtime PM callbacks,
      so that devices suspended at run time can be left in that state for
      a system sleep transition.
      
      Provide a set of generic PM callbacks for such subsystems and
      define convenience macros for populating dev_pm_ops structures.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      d690b2cd
    • Rafael J. Wysocki's avatar
      PM / Runtime: Document power.runtime_auto and related functions · 87d1b3e6
      Rafael J. Wysocki authored
      
      The power.runtime_auto device flag and the helper functions
      pm_runtime_allow() and pm_runtime_forbid() used to modify it are a
      part of the run-time power management framework and therefore they
      should be described in Documentation/power/runtime_pm.txt.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      87d1b3e6
  3. Feb 05, 2010
  4. Dec 22, 2009
  5. Dec 06, 2009
  6. Dec 04, 2009
  7. Sep 22, 2009
  8. Aug 22, 2009
    • Rafael J. Wysocki's avatar
      PM: Introduce core framework for run-time PM of I/O devices (rev. 17) · 5e928f77
      Rafael J. Wysocki authored
      
      Introduce a core framework for run-time power management of I/O
      devices.  Add device run-time PM fields to 'struct dev_pm_info'
      and device run-time PM callbacks to 'struct dev_pm_ops'.  Introduce
      a run-time PM workqueue and define some device run-time PM helper
      functions at the core level.  Document all these things.
      
      Special thanks to Alan Stern for his help with the design and
      multiple detailed reviews of the pereceding versions of this patch
      and to Magnus Damm for testing feedback.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarMagnus Damm <damm@igel.co.jp>
      5e928f77
  9. Jul 02, 2009
  10. Jun 30, 2009
  11. Jun 12, 2009
  12. Oct 16, 2008
  13. Oct 13, 2008
    • Liam Girdwood's avatar
      regulator: core - Rework machine API to remove string based functions. · a5766f11
      Liam Girdwood authored
      
      This improves the machine level API in order to configure
      regulator constraints and consumers as platform data and removes the
      old string based API that required several calls to set up each regulator.
      
      The intention is to create a struct regulator_init_data, populate
      it's fields with constraints, consumers devices, etc and then register
      the regulator device from board.c in the standard Linux way.
      
      e.g. regulator LDO2 (supplying codec and sim) platform data.
      
      /* regulator LDO2 consumer devices */
      static struct regulator_consumer_supply ldo2_consumers[] = {
      {
      	.dev	= &platform_audio_device.dev,
      	.supply	= "codec_avdd",
      },
      {
      	.dev	= &platform_sim_device.dev,
      	.supply	= "sim_vcc",
      }
      };
      
      /* regulator LDO2 constraints  */
      static struct regulator_init_data ldo2_data = {
      	.constraints = {
      		.min_uV = 3300000,
      		.max_uV = 3300000,
      		.valid_modes_mask = REGULATOR_MODE_NORMAL,
      		.apply_uV = 1,
      	},
      	.num_consumer_supplies = ARRAY_SIZE(ldo2_consumers),
      	.consumer_supplies = ldo2_consumers,
      };
      
      /* machine regulator devices with thier consumers and constraints */
      static struct platform_device wm8350_regulator_devices[] = {
      {
      	.name = "wm8350-regulator",
      	.id = WM8350_LDO_2,
      	.dev = {
      		.platform_data = &ldo2_data,
      	},
      },
      };
      
      Changes in detail:-
      
        o Removed all const char* regulator config functions in machine API.
        o Created new struct regulator_init_data to contain regulator
          machine configuration constraints and consmuers.
        o Changed set_supply(), set_machine_constraints(),
          set_consumer_device_supply() to remove their string identifier
          parameters. Also made them static and moved functions nearer top of
          core.c.
        o Removed no longer used inline func to_rdev()
        o Added regulator_get_init_drvdata() to retrieve init data.
        o Added struct device* as parameter to regulator_register().
        o Changed my email address.
      
      Signed-off-by: default avatarEric Miao <eric.miao@marvell.com>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
      a5766f11
  14. Aug 05, 2008
  15. Jul 30, 2008
  16. Jul 24, 2008
  17. May 13, 2008
  18. Apr 19, 2008
    • Rafael J. Wysocki's avatar
      PM: Handle device registrations during suspend/resume · 58aca232
      Rafael J. Wysocki authored
      
      Modify the PM core to protect its data structures, specifically the
      dpm_active list, from being corrupted if a child of the currently
      suspending device is registered concurrently with its ->suspend()
      callback.  In that case, since the new device (the child) is added
      to dpm_active after its parent, the PM core will attempt to
      suspend it after the parent, which is wrong.
      
      Introduce a new member of struct dev_pm_info, called 'sleeping',
      and use it to check if the parent of the device being added to
      dpm_active has been suspended, in which case the device registration
      fails.  Also, use 'sleeping' for checking if the ordering of devices
      on dpm_active is correct.
      
      Introduce variable 'all_sleeping' that will be set to 'true' once all
      devices have been suspended and make new device registrations fail
      until 'all_sleeping' is reset to 'false', in order to avoid having
      unsuspended devices around while the system is going into a sleep state.
      
      Remove pm_sleep_rwsem which is not necessary any more.
      
      Special thanks to Alan Stern for discussions and suggestions that
      lead to the creation of this patch.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      58aca232
  19. Mar 12, 2008
  20. Feb 23, 2008
    • Rafael J. Wysocki's avatar
      PM: Introduce PM_EVENT_HIBERNATE callback state · 3a2d5b70
      Rafael J. Wysocki authored
      During the last step of hibernation in the "platform" mode (with the
      help of ACPI) we use the suspend code, including the devices'
      ->suspend() methods, to prepare the system for entering the ACPI S4
      system sleep state.
      
      But at least for some devices the operations performed by the
      ->suspend() callback in that case must be different from its operations
      during regular suspend.
      
      For this reason, introduce the new PM event type PM_EVENT_HIBERNATE and
      pass it to the device drivers' ->suspend() methods during the last phase
      of hibernation, so that they can distinguish this case and handle it as
      appropriate.  Modify the drivers that handle PM_EVENT_SUSPEND in a
      special way and need to handle PM_EVENT_HIBERNATE in the same way.
      
      These changes are necessary to fix a hibernation regression related
      to the i915 driver (ref. http://lkml.org/lkml/2008/2/22/488
      
      ).
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Tested-by: default avatarJeff Chua <jeff.chua.linux@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3a2d5b70
  21. Feb 06, 2008
  22. Feb 01, 2008
Loading