1. 27 6月, 2008 3 次提交
    • H
      rfkill: add read-write rfkill switch support · 801e49af
      Henrique de Moraes Holschuh 提交于
      Currently, rfkill support for read/write rfkill switches is hacked through
      a round-trip over the input layer and rfkill-input to let a driver sync
      rfkill->state to hardware changes.
      
      This is buggy and sub-optimal.  It causes real problems.  It is best to
      think of the rfkill class as supporting only write-only switches at the
      moment.
      
      In order to implement the read/write functionality properly:
      
      Add a get_state() hook that is called by the class every time it needs to
      fetch the current state of the switch.  Add a call to this hook every time
      the *current* state of the radio plays a role in a decision.
      
      Also add a force_state() method that can be used to forcefully syncronize
      the class' idea of the current state of the switch.  This allows for a
      faster implementation of the read/write functionality, as a driver which
      get events on switch changes can avoid the need for a get_state() hook.
      
      If the get_state() hook is left as NULL, current behaviour is maintained,
      so this change is fully backwards compatible with the current rfkill
      drivers.
      
      For hardware that issues events when the rfkill state changes, leave
      get_state() NULL in the rfkill struct, set the initial state properly
      before registering with the rfkill class, and use the force_state() method
      in the driver to keep the rfkill interface up-to-date.
      
      get_state() can be called by the class from atomic context. It must not
      sleep.
      Signed-off-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Acked-by: NIvo van Doorn <IvDoorn@gmail.com>
      Cc: Dmitry Torokhov <dtor@mail.ru>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      801e49af
    • H
      rfkill: add parameter to disable radios by default · e954b0b8
      Henrique de Moraes Holschuh 提交于
      Currently, radios are always enabled when their rfkill interface is
      registered.  This is not optimal, the safest state for a radio is to be
      offline unless the user turns it on.
      
      Add a module parameter that causes all radios to be disabled when their
      rfkill interface is registered.  The module default is not changed so
      unless the parameter is used, radios will still be forced to their enabled
      state when they are registered.
      
      The new rfkill module parameter is called "default_state".
      Signed-off-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Acked-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e954b0b8
    • H
      rfkill: fix minor typo in kernel doc · c8fcd905
      Henrique de Moraes Holschuh 提交于
      Fix a minor typo in an exported function documentation
      Signed-off-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Acked-by: NIvo van Doorn <IvDoorn@gmail.com>
      Cc: Dmitry Torokhov <dtor@mail.ru>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c8fcd905
  2. 16 4月, 2008 1 次提交
  3. 24 2月, 2008 1 次提交
    • R
      PM: Introduce PM_EVENT_HIBERNATE callback state · 3a2d5b70
      Rafael J. Wysocki 提交于
      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: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Tested-by: NJeff Chua <jeff.chua.linux@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3a2d5b70
  4. 03 2月, 2008 1 次提交
  5. 01 2月, 2008 1 次提交
  6. 21 1月, 2008 1 次提交
  7. 30 11月, 2007 1 次提交
  8. 11 11月, 2007 4 次提交
  9. 11 10月, 2007 5 次提交
  10. 19 7月, 2007 1 次提交
  11. 20 5月, 2007 1 次提交
  12. 07 5月, 2007 1 次提交