1. 29 10月, 2018 1 次提交
    • H
      platform/x86: Add Intel AtomISP2 dummy / power-management driver · 49ad712a
      Hans de Goede 提交于
      The Image Signal Processor found on Cherry Trail devices is brought up in
      D0 state on devices which have camera sensors attached to it. The ISP will
      not enter D3 state again without some massaging of its registers beforehand
      and the ISP not being in D3 state blocks the SoC from entering S0ix modes.
      
      There was a driver for the ISP in drivers/staging but that got removed
      again because it never worked. It does not seem likely that a real
      driver for the ISP will be added to the mainline kernel anytime soon.
      
      This commit adds a dummy driver which contains the necessary magic from
      the staging driver to powerdown the ISP, so that Cherry Trail devices where
      the ISP is used will properly use S0ix modes when suspended.
      
      Together with other recent S0ix related fixes this allows S0ix modes to
      be entered on e.g. a Chuwi Hi8 Pro and a HP x2 210.
      
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=196915Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      49ad712a
  2. 20 10月, 2018 1 次提交
  3. 27 9月, 2018 2 次提交
  4. 09 8月, 2018 1 次提交
    • H
      platform/x86: Add ACPI i2c-multi-instantiate pseudo driver · e64e8498
      Hans de Goede 提交于
      On systems with ACPI instantiated i2c-clients, normally there is 1 fw_node
      per i2c-device and that fw-node contains 1 I2cSerialBus resource for that 1
      i2c-device.
      
      But in some rare cases the manufacturer has decided to describe multiple
      i2c-devices in a single ACPI fwnode with multiple I2cSerialBus resources.
      
      An earlier attempt to fix this in the i2c-core resulted in a lot of extra
      code to support this corner-case.
      
      This commit introduces a new i2c-multi-instantiate driver which fixes this
      in a different way. This new driver can be built as a module which will
      only loaded on affected systems.
      
      This driver will instantiate a new i2c-client per I2cSerialBus resource,
      using the driver_data from the acpi_device_id it is binding to to tell it
      which chip-type (and optional irq-resource) to use when instantiating.
      
      Note this driver depends on a platform device being instantiated for the
      ACPI fwnode, see the i2c_multi_instantiate_ids list of ACPI device-ids in
      drivers/acpi/scan.c: acpi_device_enumeration_by_parent().
      Acked-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: NWolfram Sang <wsa@the-dreams.de>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e64e8498
  5. 02 7月, 2018 1 次提交
  6. 10 3月, 2018 2 次提交
  7. 03 3月, 2018 2 次提交
  8. 01 2月, 2018 1 次提交
  9. 21 12月, 2017 1 次提交
  10. 27 11月, 2017 2 次提交
  11. 04 11月, 2017 3 次提交
  12. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  13. 20 9月, 2017 1 次提交
  14. 15 6月, 2017 1 次提交
  15. 07 6月, 2017 1 次提交
  16. 15 5月, 2017 1 次提交
    • H
      platform/x86: peaq-wmi: Add new peaq-wmi driver · 13bb0fd5
      Hans de Goede 提交于
      PEAQ is a new European OEM, I've bought one of their 2-in-1 x86 devices,
      which is actually quite a nice device. Under Windows it has Dolby
      software for "better" sound and you can select different equalizer
      presets using a special button.
      
      This WMI interface for this button is not really nice, as it does not do
      notifies (it really does not I triple checked), but since I had already
      figured out the entire WMI interface for this I decided to go the full
      mile anyway and implement a WMI based input driver for this using
      input_polldev since, well, we need to poll.
      
      This commit adds support for this button making it report KEY_SOUND
      input events. KEY_SOUND is already used in various places to switch
      sound into theatre mode and things like that so it seems appropriate
      here.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
      Reviewed-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      [dvhart: minor declaration ordering and commit log typo fixes]
      Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
      13bb0fd5
  17. 18 4月, 2017 1 次提交
  18. 07 3月, 2017 1 次提交
  19. 14 2月, 2017 1 次提交
  20. 04 2月, 2017 1 次提交
    • S
      platform/x86: Support Turbo Boost Max 3.0 for non HWP systems · 4ec567b8
      Srinivas Pandruvada 提交于
      On platforms supporting Intel Turbo Boost Max Technology 3.0, the
      maximum turbo frequencies (turbo ratio) of some cores in a CPU package
      may be higher than the other cores in the same package.  In that case,
      better performance can be achieved by making the scheduler prefer to run
      tasks on the CPUs with higher max turbo frequencies.
      
      On Intel® Broadwell Xeon systems, it is optional to turn on HWP
      (Hardware P-States). When HWP is not turned on, the BIOS doesn't
      present required CPPC (Collaborative Processor Performance Control)
      tables. This table is used to get the per CPU core maximum performance
      ratio and inform scheduler (in cpufreq/intel_pstate driver).
      
      On such systems the maximum performance ratio can be read via over
      clocking (OC) mailbox interface for each CPU. This interface is not
      architectural and can change for every model of processors.
      
      This driver reads maximum performance ratio of each CPU and set up
      the scheduler priority metrics. In this way scheduler can prefer CPU
      with higher performance to schedule tasks.
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      4ec567b8
  21. 27 1月, 2017 1 次提交
  22. 14 1月, 2017 1 次提交
  23. 19 12月, 2016 1 次提交
  24. 17 12月, 2016 3 次提交
  25. 23 10月, 2016 1 次提交
    • V
      platform/x86: Introduce support for Mellanox hotplug driver · 30488704
      Vadim Pasternak 提交于
      Enable system support for the Mellanox Technologies hotplug platform
      driver, which provides support for the next Mellanox basic systems:
      "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
      "msb7800", "msn2740", "msn2100" and also various number of derivative
      systems from the above basic types.
      This driver handles hot-plug events for the power suppliers, power
      cables and fans for the above systems.
      
      The Kconfig currently controlling compilation of this code is:
      driver/platform/x86:config MLX_CPLD_PLATFORM
                             tristate "Mellanox platform hotplug driver support"
      Signed-off-by: NVadim Pasternak <vadimp@mellanox.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      30488704
  26. 23 7月, 2016 1 次提交
  27. 28 5月, 2016 1 次提交
    • R
      platform/x86: Add PMC Driver for Intel Core SoC · b740d2e9
      Rajneesh Bhardwaj 提交于
      This patch adds the Power Management Controller driver as a PCI driver
      for Intel Core SoC architecture.
      
      This driver can utilize debugging capabilities and supported features
      as exposed by the Power Management Controller.
      
      Please refer to the below specification for more details on PMC features.
      http://www.intel.in/content/www/in/en/chipsets/100-series-chipset-datasheet-vol-2.html
      
      The current version of this driver exposes SLP_S0_RESIDENCY counter.
      This counter can be used for detecting fragile SLP_S0 signal related
      failures and take corrective actions when PCH SLP_S0 signal is not
      asserted after kernel freeze as part of suspend to idle flow
      (echo freeze > /sys/power/state).
      
      Intel Platform Controller Hub (PCH) asserts SLP_S0 signal when it
      detects favorable conditions to enter its low power mode. As a
      pre-requisite the SoC should be in deepest possible Package C-State
      and devices should be in low power mode. For example, on Skylake SoC
      the deepest Package C-State is Package C10 or PC10. Suspend to idle
      flow generally leads to PC10 state but PC10 state may not be sufficient
      for realizing the platform wide power potential which SLP_S0 signal
      assertion can provide.
      
      SLP_S0 signal is often connected to the Embedded Controller (EC) and the
      Power Management IC (PMIC) for other platform power management related
      optimizations.
      
      In general, SLP_S0 assertion == PC10 + PCH low power mode + ModPhy Lanes
      power gated + PLL Idle.
      
      As part of this driver, a mechanism to read the SLP_S0_RESIDENCY is exposed
      as an API and also debugfs features are added to indicate SLP_S0 signal
      assertion residency in microseconds.
      
      echo freeze > /sys/power/state
      wake the system
      cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec
      Signed-off-by: NRajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
      Signed-off-by: NVishwanath Somayaji <vishwanath.somayaji@intel.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      b740d2e9
  28. 24 3月, 2016 1 次提交
  29. 20 1月, 2016 4 次提交