1. 11 6月, 2015 3 次提交
  2. 08 6月, 2015 4 次提交
    • H
      samsung-laptop: Use acpi_video_unregister_backlight instead of acpi_video_unregister · 9330dcdd
      Hans de Goede 提交于
      acpi_video_unregister() not only unregisters the acpi-video backlight
      interface but also unregisters the acpi video bus event listener, causing
      e.g. brightness hotkey presses to no longer generate keypress events.
      
      The unregistering of the acpi video bus event listener usually is
      undesirable, which by itself is a good reason to switch to
      acpi_video_unregister_backlight().
      
      Another problem with using acpi_video_unregister() rather then using
      acpi_video_unregister_backlight() is that on systems with an intel video
      opregion (most systems) and a broken_acpi_video quirk, whether or not
      the acpi video bus event listener actually gets unregistered depends on
      module load ordering:
      
      Scenario a:
      1) acpi/video.ko gets loaded (*), does not do acpi_video_register as there
         is an intel opregion.
      2) intel.ko gets loaded, calls acpi_video_register() which registers both
         the listener and the acpi backlight interface
      3) samsung-laptop.ko gets loaded, calls acpi_video_unregister() causing
         both the listener and the acpi backlight interface to unregister
      
      Scenario b:
      1) acpi/video.ko gets loaded (*), does not do acpi_video_register as there
         is an intel opregion.
      2) samsung-laptop.ko gets loaded, calls acpi_video_dmi_promote_vendor(),
         calls acpi_video_unregister(), which is a nop since acpi_video_register
         has not yet been called
      2) intel.ko gets loaded, calls acpi_video_register() which registers
         the listener, but does not register the acpi backlight interface due to
         the call to the preciding call to acpi_video_dmi_promote_vendor()
      
      *) acpi/video.ko always loads first as both other modules depend on it.
      
      So we end up with or without an acpi video bus event listener depending
      on module load ordering, not good.
      
      Switching to using acpi_video_unregister_backlight() means that independ
      of ordering we will always have an acpi video bus event listener fixing
      this.
      
      Note that this commit means that systems without an intel video opregion,
      and systems which were hitting scenario a wrt module load ordering, are
      now getting an acpi video bus event listener while before they were not!
      
      On some systems this may cause the brightness hotkeys to start generating
      keypresses while before they were not (good), while on other systems this
      may cause the brightness hotkeys to generate multiple keypress events for
      a single press (not so good). Since on most systems the acpi video bus is
      the canonical source for brightness events I believe that the latter case
      will needs to be handled on a case by case basis by filtering out the
      duplicate keypresses at the other source for them.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: Corentin Chary <corentin.chary@gmail.com)
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      9330dcdd
    • H
      asus-wmi: Use acpi_video_unregister_backlight instead of acpi_video_unregister · 5f770658
      Hans de Goede 提交于
      acpi_video_unregister() not only unregisters the acpi-video backlight
      interface but also unregisters the acpi video bus event listener, causing
      e.g. brightness hotkey presses to no longer generate keypress events.
      
      The unregistering of the acpi video bus event listener usually is
      undesirable, which by itself is a good reason to switch to
      acpi_video_unregister_backlight().
      
      Another problem with using acpi_video_unregister() rather then using
      acpi_video_unregister_backlight() is that on systems with an intel video
      opregion (most systems) and a wmi_backlight_power quirk, whether or not
      the acpi video bus event listener actually gets unregistered depends on
      module load ordering:
      
      Scenario a:
      1) acpi/video.ko gets loaded (*), does not do acpi_video_register as there
         is an intel opregion.
      2) intel.ko gets loaded, calls acpi_video_register() which registers both
         the listener and the acpi backlight interface
      3) asus-wmi.ko gets loaded, calls acpi_video_unregister() causing both
         the listener and the acpi backlight interface to unregister
      
      Scenario b:
      1) acpi/video.ko gets loaded (*), does not do acpi_video_register as there
         is an intel opregion.
      2) asus-wmi.ko gets loaded, calls acpi_video_dmi_promote_vendor(),
         calls acpi_video_unregister(), which is a nop since acpi_video_register
         has not yet been called
      2) intel.ko gets loaded, calls acpi_video_register() which registers
         the listener, but does not register the acpi backlight interface due to
         the call to the preciding call to acpi_video_dmi_promote_vendor()
      
      *) acpi/video.ko always loads first as both other modules depend on it.
      
      So we end up with or without an acpi video bus event listener depending
      on module load ordering, not good.
      
      Switching to using acpi_video_unregister_backlight() means that independ
      of ordering we will always have an acpi video bus event listener fixing
      this.
      
      Note that this commit means that systems without an intel video opregion,
      and systems which were hitting scenario a wrt module load ordering, are
      now getting an acpi video bus event listener while before they were not!
      
      On some systems this may cause the brightness hotkeys to start generating
      keypresses while before they were not (good), while on other systems this
      may cause the brightness hotkeys to generate multiple keypress events for
      a single press (not so good). Since on most systems the acpi video bus is
      the canonical source for brightness events I believe that the latter case
      will needs to be handled on a case by case basis by filtering out the
      duplicate keypresses at the other source for them.
      
      Cc: acpi4asus-user@lists.sourceforge.net
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: Corentin Chary <corentin.chary@gmail.com)
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      5f770658
    • H
      apple_gmux: Use acpi_video_unregister_backlight instead of acpi_video_unregister · 85eaa5fb
      Hans de Goede 提交于
      acpi_video_unregister() not only unregisters the acpi-video backlight
      interface but also unregisters the acpi video bus event listener, causing
      e.g. brightness hotkey presses to no longer generate keypress events.
      
      The unregistering of the acpi video bus event listener usually is
      undesirable, which by itself is a good reason to switch to
      acpi_video_unregister_backlight().
      
      Another problem with using acpi_video_unregister() rather then using
      acpi_video_unregister_backlight() is that on systems with an intel video
      opregion (most systems) whether or not the acpi video bus event listener
      actually gets unregistered depends on module load ordering:
      
      Scenario a:
      1) acpi/video.ko gets loaded (*), does not do acpi_video_register as there
         is an intel opregion.
      2) intel.ko gets loaded, calls acpi_video_register() which registers both
         the listener and the acpi backlight interface
      3) apple-gmux.ko gets loaded, calls acpi_video_unregister() causing both
         the listener and the acpi backlight interface to unregister
      
      Scenario b:
      1) acpi/video.ko gets loaded (*), does not do acpi_video_register as there
         is an intel opregion.
      2) apple-gmux.ko gets loaded, calls acpi_video_dmi_promote_vendor(),
         calls acpi_video_unregister(), which is a nop since acpi_video_register
         has not yet been called
      2) intel.ko gets loaded, calls acpi_video_register() which registers
         the listener, but does not register the acpi backlight interface due to
         the call to the preciding call to acpi_video_dmi_promote_vendor()
      
      *) acpi/video.ko always loads first as both other modules depend on it.
      
      So we end up with or without an acpi video bus event listener depending
      on module load ordering, not good.
      
      Switching to using acpi_video_unregister_backlight() means that independ
      of ordering we will always have an acpi video bus event listener fixing
      this.
      
      Note that this commit means that systems without an intel video opregion,
      and systems which were hitting scenario a wrt module load ordering, are
      now getting an acpi video bus event listener while before they were not!
      
      On some systems this may cause the brightness hotkeys to start generating
      keypresses while before they were not (good), while on other systems this
      may cause the brightness hotkeys to generate multiple keypress events for
      a single press (not so good). Since on most systems the acpi video bus is
      the canonical source for brightness events I believe that the latter case
      will needs to be handled on a case by case basis by filtering out the
      duplicate keypresses at the other source for them.
      
      Cc: Seth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      85eaa5fb
    • R
      pvpanic: handle missing _STA correctly · 55cd3f01
      Radim Krčmář 提交于
      pvpanic was not properly detected when _STA was missing.
      
      ACPI 6.0 April 2015, 6.3.7 _STA (Status)
        If a device object (including the processor object) does not have an
        _STA object, then OSPM assumes that all of the above bits are set
        (i.e., the device is present, enabled, shown in the UI, and
        functioning).
      
      Not adhering to the specification made pvpanic dormant under QEMU 2.3.
      
      The original patch used acpi_bus_get_status_handle, which was not
      being exported, so module build blew up;  switch to acpi_bus_get_status
      and use the status it populates.
      
      Populated status is a bitfield so we can make the code self-documenting.
      We do not check 'present' because 'enabled' has to be false in that case
      by specification.  Older QEMUs set 0xff to status and newer ones do 0xb.
      Suggested-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NRadim Krčmář <rkrcmar@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      [dvhart@linux.intel.com: Merge acpi_bug_get_status fix to avoid bisect breakage]
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      55cd3f01
  3. 02 6月, 2015 1 次提交
  4. 14 5月, 2015 1 次提交
    • K
      asus-wmi: add fan control · 53e755c2
      Kast Bernd 提交于
      This patch is partially based on Felipe Contrera's earlier patch, that
      was discussed here: https://lkml.org/lkml/2013/10/8/800
      Some problems of that patch are solved, now:
      
      1) The main obstacle for the earlier patch seemed to be the use of
      virt_to_phys, which is accepted, now
      
      2) random memory corruption occurred on my notebook, thus DMA-able memory
      is allocated now, which solves this problem
      
      3) hwmon interface is used instead of the thermal interface, as a
      hwmon device is already set up by this driver and seemed more
      appropriate than the thermal interface
      
      4) Calling the ACPI-functions was modularized thus it's possible to call
      some multifunctions easily, now (by using
      asus_wmi_evaluate_method_agfn).
      
      Unfortunately the WMI doesn't support controlling both fans on
      a dual-fan notebook because of an restriction in the acpi-method
      "SFNS", that is callable through the wmi. If "SFNV" would be called
      directly even dual fan configurations could be controlled, but not by using
      wmi.
      
      Speed readings only work on auto-mode, thus "-1" will be reported in
      manual mode.
      Additionally the speed readings are reported as hundreds of RPM thus
      they are not too precise.
      
      This patch is tested only on one notebook (N551JK) but a similar module,
      that contained some code to try to control the second fan also, was
      reported to work on an UX32VD, at least for the first fan.
      
      As Felipe already mentioned the low-level functions are described here:
      http://forum.notebookreview.com/threads/fan-control-on-asus-prime-ux31-ux31a-ux32a-ux32vd.705656/Signed-off-by: NKast Bernd <kastbernd@gmx.de>
      Acked-by: NCorentin Chary <corentin.chary@gmail.com>
      Cc: Corentin Chary <corentin.chary@gmail.com>
      Cc: Darren Hart <dvhart@infradead.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      53e755c2
  5. 12 5月, 2015 8 次提交
  6. 07 5月, 2015 4 次提交
  7. 27 4月, 2015 1 次提交
  8. 25 4月, 2015 2 次提交
    • D
      platform/chrome: chromeos_laptop - instantiate Atmel at primary address · 96cba9b0
      Dmitry Torokhov 提交于
      The new Atmel MXT driver expects i2c client's address contain the
      primary (main address) of the chip, and calculates the expected
      bootloader address form the primary address. Unfortunately chrome_laptop
      does probe the devices and if touchpad (or touchscreen, or both) comes
      up in bootloader mode the i2c device gets instantiated with the
      bootloader address which confuses the driver.
      
      To work around this issue let's probe the primary address first. If the
      device is not detected at the primary address we'll probe alternative
      addresses as "dummy" devices. If any of them are found, destroy the
      dummy client and instantiate client with proper name at primary address
      still.
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      96cba9b0
    • H
      toshiba_acpi: Do not register vendor backlight when acpi_video bl is available · 358d6a2c
      Hans de Goede 提交于
      commit a39f46df ("toshiba_acpi: Fix regression caused by backlight extra
      check code") causes the backlight to no longer work on the Toshiba Z30,
      reverting that commit fixes this but restores the original issue fixed
      by that commit.
      
      Looking at the toshiba_acpi backlight code for a fix for this I noticed that
      the toshiba code is the only code under platform/x86 which unconditionally
      registers a vendor acpi backlight interface, without checking for acpi_video
      backlight support first.
      
      This commit adds the necessary checks bringing toshiba_acpi in line with the
      other drivers, and fixing the Z30 regression without needing to revert the
      commit causing it.
      
      Chances are that there will be some Toshiba models which have a non working
      acpi-video implementation while the toshiba vendor backlight interface does
      work, this commit adds an empty dmi_id table where such systems can be added,
      this is identical to how other drivers handle such systems.
      
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1206036
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=86521Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-and-tested-by: NAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      358d6a2c
  9. 24 4月, 2015 13 次提交
  10. 23 4月, 2015 2 次提交
  11. 22 4月, 2015 1 次提交