1. 05 8月, 2015 3 次提交
    • A
      toshiba_acpi: Refactor *{get, set} functions return value · e1a949c1
      Azael Avalos 提交于
      This patch refactors the return value of the driver *{get, set}
      functions, since the driver default error value is -EIO.
      
      All the functions now check for TOS_FAILURE, TOS_NOT_SUPPORTED and
      TOS_SUCCESS.
      
      On TOS_FAILURE a pr_err message is printed informing the user of the
      error (no change was made to this, except the check was added to the
      functions not checking for this).
      
      On TOS_NOT_SUPPORTED we now return -ENODEV immediately (some
      functions were returning -EIO and some other were not checking)
      
      On TOS_SUCCESS* we now return 0 (as a side effect, a new success value
      was added, since some functions return one instead of zero to
      indicate success).
      
      As a special case, the LED functions now check for *FAILURE on
      *set, and check for TOS_FAILURE and TOS_SUCCESS on *get with their
      "default" return value set to LED_OFF.
      
      Also the {lcd, video}_proc* functions were adapted to reflect these
      changes to their parent HCI functions.
      Signed-off-by: NAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      e1a949c1
    • A
      toshiba_acpi: Remove "*not supported" feature prints · 0409cbce
      Azael Avalos 提交于
      Currently the driver prints "*not supported" if any of the features
      queried are in fact not supported, let us print the available
      features instead.
      
      This patch removes all instances pr_info printing "*not supported",
      and add a new function called "print_supported_features", which will
      print the available laptop features.
      Signed-off-by: NAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      0409cbce
    • A
      toshiba_acpi: Change *available functions return type · ea215a3f
      Azael Avalos 提交于
      This patch changes the *available functions return type from int to
      void.
      
      The checks for support of their respective features are done inside
      such functions and there was no need to return anything as we can
      flag the queried feature as supported inside these functions.
      
      The code was adapted accordingly to these changes and two new
      variables were created and another was changed from uint to bool.
      
      Also, the function toshiba_acceleremoter_supported was renamed to
      toshiba_accelerometer_available to maintain the naming consistency on
      the driver.
      Signed-off-by: NAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      ea215a3f
  2. 29 7月, 2015 1 次提交
    • A
      toshiba_acpi: Add set_fan_status function · 3e07e5ba
      Azael Avalos 提交于
      This patch adds a new function named "set_fan_status" to complement
      its get* counterpart, as well as to avoid code duplication between
      "fan_proc_write" and "fan_store".
      
      Also, both functions (get*, set*) are now checking for TOS_FAILURE,
      TOS_NOT_SUPPORTED and TOS_SUCCESS (to be on par with the rest of the
      HCI/SCI functions), printing an error message, returning -ENODEV and
      zero respectively.
      
      The proc and sysfs functions were updated to reflect these changes as
      well, returning -EIO for proc, and propagating the error value on the
      sysfs functions.
      Signed-off-by: NAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      3e07e5ba
  3. 25 7月, 2015 7 次提交
  4. 19 6月, 2015 1 次提交
  5. 12 5月, 2015 5 次提交
  6. 07 5月, 2015 1 次提交
  7. 25 4月, 2015 1 次提交
  8. 08 4月, 2015 2 次提交
  9. 26 3月, 2015 3 次提交
  10. 15 3月, 2015 1 次提交
  11. 12 2月, 2015 12 次提交
  12. 10 2月, 2015 1 次提交
    • A
      toshiba_acpi: Make toshiba_eco_mode_available more robust · 98fc4ec6
      Azael Avalos 提交于
      Some Toshiba laptops do not come with the ECO led installed, however,
      the driver is registering support for it when it should not.
      
      This patch makes the toshiba_eco_mode_available function more robust
      in detecting ECO led capabilities, not registering the led on laptops
      that do not support it and registering the led when it really does.
      
      The ECO led function now returns 0x8e00 (Not Installed) by querying
      with in[3] = 0, whenever theres no physical LED installed, and
      returning 0x8300 (Input Data Error) when it is, however, there are
      some BIOSes that have stub function calls not returning anything and
      and the LED device was being registered too, hence the change of the
      default return value from 1 to 0.
      Signed-off-by: NAzael Avalos <coproscefalo@gmail.com>
      
      Minor comment update, fixed a whitespace error, s/truly/actual/.
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      98fc4ec6
  13. 29 1月, 2015 1 次提交
    • A
      toshiba_acpi: Add a check for TOS_NOT_SUPPORTED in the sci_open function · fa465739
      Azael Avalos 提交于
      This was "toshiba_acpi: Change sci_open function return value"
      
      Some Toshiba laptops have "poorly implemented" SCI calls on their
      BIOSes and are not checking for sci_{open, close} calls, therefore,
      the sci_open function is failing and making some of the supported
      features unavailable (kbd backlight, touchpad, illumination, etc.).
      
      This patch checks whether we receive TOS_NOT_SUPPORTED and returns
      1, making the supported features work on such laptops.
      
      In the case that some laptops really do not support the SCI, all the
      SCI dependent functions check for TOS_NOT_SUPPORTED, and thus, not
      registering support for the queried feature.
      Signed-off-by: NAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      fa465739
  14. 24 1月, 2015 1 次提交