1. 14 Mar, 2022 3 commits
    • Jorge Lopez's avatar
      platform/x86: hp-wmi: Fix 0x05 error code reported by several WMI calls · be9d73e6
      Jorge Lopez authored
      Several WMI queries leverage hp_wmi_read_int function to read their
      data. hp_wmi_read_int function was corrected in a previous patch.
      Now, this function invokes hp_wmi_perform_query with input parameter
      of size zero and the output buffer of size 4.
      
      WMI commands calling hp_wmi_perform_query with input buffer size value
      of zero are listed below.
      
      HPWMI_DISPLAY_QUERY
      HPWMI_HDDTEMP_QUERY
      HPWMI_ALS_QUERY
      HPWMI_HARDWARE_QUERY
      HPWMI_WIRELESS_QUERY
      HPWMI_BIOS_QUERY
      HPWMI_FEATURE_QUERY
      HPWMI_HOTKEY_QUERY
      HPWMI_FEATURE2_QUERY
      HPWMI_WIRELESS2_QUERY
      HPWMI_POSTCODEERROR_QUERY
      HPWMI_THERMAL_PROFILE_QUERY
      HPWMI_FAN_SPEED_MAX_GET_QUERY
      
      Invoking those WMI commands with an input buffer size greater
      than zero will cause error 0x05 to be returned.
      
      All WMI commands executed by the driver were reviewed and changes
      were made to ensure the expected input and output buffer size match
      the WMI specification.
      
      Changes were validated on a HP ZBook Workstation notebook,
      HP EliteBook x360, and HP EliteBook 850 G8.  Additional
      validation was included in the test process to ensure no other
      commands were incorrectly handled.
      Signed-off-by: default avatarJorge Lopez <jorge.lopez2@hp.com>
      Link: https://lore.kernel.org/r/20220310210853.28367-4-jorge.lopez2@hp.comReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      be9d73e6
    • Jorge Lopez's avatar
      platform/x86: hp-wmi: Fix SW_TABLET_MODE detection method · 520ee4ea
      Jorge Lopez authored
      The purpose of this patch is to introduce a fix and removal of the
      current hack when determining tablet mode status.
      
      Determining the tablet mode status requires reading Byte 0 bit 2 as
      reported by HPWMI_HARDWARE_QUERY.  The investigation identified the
      failure was rooted in two areas: HPWMI_HARDWARE_QUERY failure (0x05)
      and reading Byte 0, bit 2 only to determine the table mode status.
      HPWMI_HARDWARE_QUERY WMI failure also rendered the dock state value
      invalid.
      
      The latest changes use SMBIOS Type 3 (chassis type) and WMI Command
      0x40 (device_mode_status) information to determine if the device is
      in tablet mode or not.
      
      hp_wmi_hw_state function was split into two functions;
      hp_wmi_get_dock_state and hp_wmi_get_tablet_mode.  The new functions
      separate how dock_state and tablet_mode is handled in a cleaner
      manner.
      
      All changes were validated on a HP ZBook Workstation notebook,
      HP EliteBook x360, and HP EliteBook 850 G8.
      Signed-off-by: default avatarJorge Lopez <jorge.lopez2@hp.com>
      Link: https://lore.kernel.org/r/20220310210853.28367-3-jorge.lopez2@hp.comReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      520ee4ea
    • Jorge Lopez's avatar
      platform/x86: hp-wmi: Fix hp_wmi_read_int() reporting error (0x05) · 12b19f14
      Jorge Lopez authored
      The purpose of this patch is to introduce a fix to hp_wmi_read_int()
      and eliminate failure error (0x05). Several WMI queries leverage
      hp_wmi_read_int() to read their data and were failing with error 0x05.
      
      HPWMI_DISPLAY_QUERY
      HPWMI_HDDTEMP_QUERY
      HPWMI_ALS_QUERY
      HPWMI_HARDWARE_QUERY
      HPWMI_WIRELESS_QUERY
      HPWMI_POSTCODEERROR_QUERY
      
      The failure occurs because hp_wmi_read_int() calls
      hp_wmi_perform_query() with input parameter of size greater than zero.
      Invoking those WMI commands with an input buffer size greater than
      zero causes the command to be rejected and error 0x05 be returned.
      
      All changes were validated on a HP ZBook Workstation notebook,
      HP EliteBook x360, and HP EliteBook 850 G8.
      Signed-off-by: default avatarJorge Lopez <jorge.lopez2@hp.com>
      Link: https://lore.kernel.org/r/20220310210853.28367-2-jorge.lopez2@hp.comReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      12b19f14
  2. 10 Mar, 2022 1 commit
  3. 09 Mar, 2022 4 commits
  4. 08 Mar, 2022 3 commits
  5. 02 Mar, 2022 15 commits
  6. 24 Feb, 2022 1 commit
  7. 23 Feb, 2022 1 commit
  8. 21 Feb, 2022 1 commit
  9. 17 Feb, 2022 6 commits
  10. 14 Feb, 2022 1 commit
  11. 11 Feb, 2022 4 commits
    • Hans de Goede's avatar
      platform/x86: intel_cht_int33fe: Move to intel directory · ae707d0e
      Hans de Goede authored
      Now that there is only 1 c-file left of the intel_cht_int33fe code,
      move it to the intel directory instead of it having its own int33fe
      sub-directory.
      
      Note this also renames the module from intel_cht_int33fe_typec to
      intel_chtwc_int33fe, to better match the names of other PMIC related
      modules like the intel_chtdc_ti_pwrbtn module.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://lore.kernel.org/r/20220206220220.88491-4-hdegoede@redhat.com
      ae707d0e
    • Hans de Goede's avatar
      platform/x86: intel_cht_int33fe: Drop Lenovo Yogabook YB1-X9x code · bb22fc51
      Hans de Goede authored
      Move the Lenovo Yogabook YB1-X9x fuel-gauge instantiation code over to
      the x86-android-tablets module, which already deals with this for various
      other devices.
      
      This removes the need to have a special intel_cht_int33fe_microb module
      just for Lenovo Yogabook YB1-X9x laptops.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://lore.kernel.org/r/20220206220220.88491-3-hdegoede@redhat.com
      bb22fc51
    • Hans de Goede's avatar
      platform/x86: intel_cht_int33fe: Switch to DMI modalias based loading · 915623a8
      Hans de Goede authored
      The intel_cht_int33fe driver is intended to deal with ACPI INT33FE
      firmware-nodes on Cherry Trail devices with a Whiskey Cove PMIC.
      
      The original version of the driver only dealt with the GPD win and
      GPD pocket boards where the WC PMIC is connected to a TI BQ24292i charger,
      paired with a Maxim MAX17047 fuelgauge + a FUSB302 USB Type-C Controller +
      a PI3USB30532 USB switch, for a fully functional Type-C port.
      
      Later it was split into a Type-C and a Micro-B variant to deal with
      the Lenovo Yoga Book YB1-X90 / Lenovo Yoga Book YB1-X91 boards where
      the ACPI INT33FE firmware-node only describes the TI BQ27542 fuelgauge.
      
      Currently the driver differentiates between these 2 models by counting
      the number of I2cSerialBus resources in the firmware-node.
      
      There are a number of problems with this approach:
      
      1. The driver autoloads based on the acpi:INT33FE modalias causing it
      to get loaded on almost all Bay Trail and Cherry Trail devices. It
      checks for the presence of a WC PMIC, so it won't bind but the loading
      still wastes time and memory.
      
      2. Both code paths in the driver are really only designed for a single
      board and have harcoded various assumptions about these boards, if
      another design matching the current checks ever shows up the driver
      may end up doing something completely wrong.
      
      Avoid both issues by switching to using DMI based autoloading of
      the module, which has neither of these problems.
      
      Note this splits the previous intel_cht_int33fe kernel module into two
      modules: intel_cht_int33fe_typec and intel_cht_int33fe_microb, one for
      each model.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://lore.kernel.org/r/20220206220220.88491-2-hdegoede@redhat.com
      915623a8
    • Hans de Goede's avatar
      platform/x86: x86-android-tablets: Minor charger / fuel-gauge improvements · 5030e8d9
      Hans de Goede authored
      Minor charger / fuel-gauge improvements:
      
      1. Make some of the names of charger / fuel-gauge related globals more
         generic in preparation for also using them on other boards.
      
      2. Update the dev_name on the Asus ME176C and TF103C to reflect that these
         are using the bq24297 variant of the bq24190 family.
      
      3. During review of the ug3105 driver the "upi,rsns-microohm" property was
         renamed to "upisemi,rsns-microohm" as "upisemi" is the correct vendor
         prefix, update the ug3105 properties accordingly.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://lore.kernel.org/r/20220206220220.88491-1-hdegoede@redhat.com
      5030e8d9