1. 14 12月, 2016 1 次提交
    • K
      platform/x86: asus-wmi: Set specified XUSB2PR value for X550LB · 8023eff1
      Kai-Chuan Hsieh 提交于
      The bluetooth adapter Atheros AR3012 can't be enumerated
      and make the bluetooth function broken.
      
      T:  Bus=02 Lev=01 Prnt=01 Port=05 Cnt=02 Dev#=  5 Spd=12  MxCh= 0
      D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=13d3 ProdID=3362 Rev=00.02
      S:  Manufacturer=Atheros Communications
      S:  Product=Bluetooth USB Host Controller
      S:  SerialNumber=Alaska Day 2006
      C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
      I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      
      The error is:
      
       usb 2-6: device not accepting address 7, error -62
       usb usb2-port6: unable to enumerate USB device
      
      It is caused by adapter's connected port is mapped to xHC
      controller, but the xHCI is not supported by the usb device.
      
      The output of 'sudo lspci -nnxxx -s 00:14.0':
      
       00:14.0 USB controller [0c03]: Intel Corporation 8 Series USB xHCI HC [8086:9c31] (rev 04)
       00: 86 80 31 9c 06 04 90 02 04 30 03 0c 00 00 00 00
       10: 04 00 a0 f7 00 00 00 00 00 00 00 00 00 00 00 00
       20: 00 00 00 00 00 00 00 00 00 00 00 00 43 10 1f 20
       30: 00 00 00 00 70 00 00 00 00 00 00 00 0b 01 00 00
       40: fd 01 36 80 89 c6 0f 80 00 00 00 00 00 00 00 00
       50: 5f 2e ce 0f 00 00 00 00 00 00 00 00 00 00 00 00
       60: 30 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00
       70: 01 80 c2 c1 08 00 00 00 00 00 00 00 00 00 00 00
       80: 05 00 87 00 0c a0 e0 fe 00 00 00 00 a1 41 00 00
       90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
       a0: 00 01 04 00 00 00 00 00 00 00 00 00 00 00 00 00
       b0: 0f 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00
       c0: 03 c0 30 00 00 00 00 00 03 0c 00 00 00 00 00 00
       d0: f9 01 00 00 f9 01 00 00 0f 00 00 00 0f 00 00 00
       e0: 00 08 00 00 00 00 00 00 00 00 00 00 d8 d8 00 00
       f0: 00 00 00 00 00 00 00 00 b1 0f 04 08 00 00 00 00
      
      By referencing Intel Platform Controller Hub(PCH) datasheet,
      the xHC USB 2.0 Port Routing(XUSB2PR) at offset 0xD0-0xD3h
      decides the setting of mapping the port to EHCI controller or
      xHC controller. And the port mapped to xHC will enable xHCI
      during bus resume.
      
      The setting of disabling bluetooth adapter's connected port is
      0x000001D9. The value can be obtained by few times 1 bit flip
      operation. The suited configuration should have the 'lsusb -t'
      result with bluetooth using ehci:
      
      /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
      /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 480M
          |__ Port 5: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M
          |__ Port 5: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M
      /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
          |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
              |__ Port 6: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
              |__ Port 6: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M
      Signed-off-by: NKai-Chuan Hsieh <kai.chiuan@gmail.com>
      Acked-by: NCorentin Chary <corentin.chary@gmail.com>
      Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
      [andy: resolve merge conflict in asus-wmi.h]
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      8023eff1
  2. 24 9月, 2016 2 次提交
  3. 02 7月, 2016 1 次提交
    • J
      asus-wmi: Create quirk for airplane_mode LED · a977e59c
      João Paulo Rechi Vita 提交于
      Some Asus laptops that have an airplane-mode indicator LED, also have
      the WMI WLAN user bit set, and the following bits in their DSDT:
      
      Scope (_SB)
      {
        (...)
        Device (ATKD)
        {
          (...)
          Method (WMNB, 3, Serialized)
          {
            (...)
            If (LEqual (IIA0, 0x00010002))
            {
              OWGD (IIA1)
              Return (One)
            }
          }
        }
      }
      
      So when asus-wmi uses ASUS_WMI_DEVID_WLAN_LED (0x00010002) to store the
      wlan state, it drives the airplane-mode indicator LED (through the call
      to OWGD) in an inverted fashion: the LED is ON when airplane mode is OFF
      (since wlan is ON), and vice-versa.
      
      This commit creates a quirk to not register a RFKill switch at all for
      these laptops, to allow the asus-wireless driver to drive the airplane
      mode LED correctly through the ASHS ACPI device. It also adds a match to
      that quirk for the Asus X555UB, which is affected by this problem.
      Signed-off-by: NJoão Paulo Rechi Vita <jprvita@endlessm.com>
      Reviewed-by: NCorentin Chary <corentin.chary@gmail.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      a977e59c
  4. 27 2月, 2013 1 次提交
  5. 25 2月, 2013 1 次提交
    • A
      asus-wmi: add display toggle quirk · a2a96f0c
      AceLan Kao 提交于
      For machines with AMD graphic chips, it will send out WMI event and ACPI
      interrupt at the same time while hitting the hotkey. BIOS will notify the
      system the next display output mode throught WMI event code, so that
      windows' application can show an OSD to tell the user which mode will be
      taken effect. User can hit the display toggle key many times within 2
      seconds to choose the mode they want. After 2 seconds, WMI dirver should
      send a WMIMethod(SDSP) command to tell the BIOS which mode the user chose.
      And then BIOS will raise another ACPI interrupt to tell the system to
      really switch the display mode.
      
      In Linux desktop, we don't have this kind of OSD to let users to choose
      the mode they want, so we don't need to call WMIMethod(SDSP) to have
      another ACPI interrupt. To simplify the problem, we just have to ignore
      the WMI event, and let the first ACPI interrupt to send out the key event.
      
      For the need, here comes another quirk to add machines with this kind of
      behavior. When the WMI driver receives the display toggle WMI event, and
      found the machin is in the list, it will do nothing and let ACPI video
      driver to report the key event.
      Signed-off-by: NAceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NCorentin Chary <corentincj@iksaif.net>
      Signed-off-by: NMatthew Garrett <matthew.garrett@nebula.com>
      a2a96f0c
  6. 18 8月, 2012 1 次提交
    • A
      asus-wmi: record wlan status while controlled by userapp · a50bd128
      AceLan Kao 提交于
      If the user bit is set, that mean BIOS can't set and record the wlan
      status, it will report the value read from id ASUS_WMI_DEVID_WLAN_LED
      (0x00010012) while we query the wlan status by id ASUS_WMI_DEVID_WLAN
      (0x00010011) through WMI.
      So, we have to record wlan status in id ASUS_WMI_DEVID_WLAN_LED
      (0x00010012) while setting the wlan status through WMI.
      This is also the behavior that windows app will do.
      
      Quote from ASUS application engineer
      ===
      When you call WMIMethod(DSTS, 0x00010011) to get WLAN status, it may return
      
      (1) 0x00050001 (On)
      (2) 0x00050000 (Off)
      (3) 0x00030001 (On)
      (4) 0x00030000 (Off)
      (5) 0x00000002 (Unknown)
      
      (1), (2) means that the model has hardware GPIO for WLAN, you can call
      WMIMethod(DEVS, 0x00010011, 1 or 0) to turn WLAN on/off.
      (3), (4) means that the model doesn’t have hardware GPIO, you need to use
      API or driver library to turn WLAN on/off, and call
      WMIMethod(DEVS, 0x00010012, 1 or 0) to set WLAN LED status.
      After you set WLAN LED status, you can see the WLAN status is changed with
      WMIMethod(DSTS, 0x00010011). Because the status is recorded lastly
      (ex: Windows), you can use it for synchronization.
      (5) means that the model doesn’t have WLAN device.
      
      WLAN is the ONLY special case with upper rule.
      
      For other device, like Bluetooth, you just need use
      WMIMethod(DSTS, 0x00010013) to get, and WMIMethod(DEVS, 0x00010013, 1 or 0)
      to set.
      ===
      Signed-off-by: NAceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      a50bd128
  7. 28 7月, 2012 1 次提交
  8. 27 3月, 2012 3 次提交
    • C
      asus-wmi: move WAPF variable into quirks_entry · 6a2bcccd
      Corentin Chary 提交于
      Some models work better with different values of wapf, so move the
      variable into quriks_entry to make it more easy to give a specific
      value to different models.
      
      Based on original patch from AceLan Kao <acelan.kao@canonical.com>
      
      Cc: AceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NCorentin Chary <corentin.chary@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      6a2bcccd
    • A
      asus-wmi: store backlight power status for AIO machine · 6e0044be
      AceLan Kao 提交于
      Due to some implementation reasons, ASUS ET2012 All-in-One machines
      can't report the correct backlight power status, it will always return
      1. To track the backlight power status correctly, we have to store the
      status by ourselves.
      
      BTW, by the BIOS design, the backlight power will be turn on/off
      sequently, no matter what the value of the parameter will be.
      More over, the brightness adjustment command will turn on the backlight
      power. Those behaviors will make us fail to track the backlight power
      status.
      For example, While we are trying to turn on the backlight power,
      we will send out the brightness adjustment command and then trying to
      figure out if we have to turn on the backlight power, then send out
      the command. But, the real case is that, the backlight power turns on
      while sending the brightness adjustment command, and then we send out
      the command to turn on the backlight power, it actually will turn off
      the backlight power and the backlight power status we recorded becomes
      wrong. So, we have to seperate these two commands by a if statement.
      Signed-off-by: NAceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NCorentin Chary <corentin.chary@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      6e0044be
    • A
      asus-wmi: add scalar board brightness adj. support · c87992d1
      AceLan Kao 提交于
      Some ASUS ET2012E/I All-in-One machines that use a scalar board
      to control the brightness, and they only accept brightness up and down
      command. So, I introduced a get_scalar_command() function to pass the
      command to the scalar board through WMI.
      
      Besides, we have to store the brightness value locally, for we need the
      old value to know the brightness value is increasing or decreasing.
      
      BTW, since there is no way to retrieve the actual brightness(it would be
      a fixed value), and the max brightness value would be fixed to 1, so we
      have to keep passing the brightness up/down command when we reached the
      max brightness value or 0.
      Signed-off-by: NAceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NCorentin Chary <corentin.chary@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      c87992d1
  9. 06 8月, 2011 2 次提交
  10. 28 3月, 2011 1 次提交
    • C
      eeepc-wmi: asus generic asus-wmi.ko module · e12e6d94
      Corentin Chary 提交于
      New Asus notebooks are using a WMI device similar to
      the one used in Eee PCs. Since we don't want to load
      eeepc-wmi module on Asus notebooks, and we want to
      keep the eeepc-wmi module for backward compatibility,
      this patch introduce a new module, named asus-wmi, that
      will be used by eeepc-wmi and the new Asus Notebook WMI
      Driver.
      
      eeepc-wmi's input device strings (device name and phys)
      are kept, but rfkill and led names are changed (s/eeepc/asus/).
      This should not break anything since rfkill are used by type or
      index, not by name, and the eeepc::touchpad led wasn't working
      correctly before 2.6.39 anyway.
      Signed-off-by: NCorentin Chary <corentincj@iksaif.net>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      e12e6d94