summaryrefslogtreecommitdiffstats
path: root/drivers/platform
Commit message (Collapse)AuthorAgeFilesLines
* platform/x86: intel_pmc_ipc: Switch to use driver->dev_groupsMika Westerberg2020-01-221-10/+7
| | | | | | | | | | | The driver core provides support for adding additional attributes for devices via new ->dev_groups member of struct device_driver. Convert the driver to use that instead of adding the attributes manually. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_ipc: Propagate error from kstrtoul()Mika Westerberg2020-01-221-2/+3
| | | | | | | | | kstrtoul() already returns negative error if the input was not valid so return it directly. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_ipc: Use octal permissions in sysfs attributesMika Westerberg2020-01-221-5/+2
| | | | | | | | | | This is the current preferred way so replace the S_IWUSR with the corresponding octal value. While there move the attributes to follow directly their store functions. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_ipc: Get rid of unnecessary includesMika Westerberg2020-01-221-10/+0
| | | | | | | | | There is no point including headers that are not needed in the driver so drop them. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_ipc: Drop ipc_data_readb()Mika Westerberg2020-01-221-5/+0
| | | | | | | | This function is not used anywhere so drop it completely. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_ipc: Drop intel_pmc_gcr_read() and intel_pmc_gcr_write()Mika Westerberg2020-01-221-59/+0
| | | | | | | | These functions are not used anywhere so drop them completely. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_ipc: Make intel_pmc_ipc_raw_cmd() staticMika Westerberg2020-01-221-3/+2
| | | | | | | | | This function is not called outside of intel_pmc_ipc.c so we can make it static instead. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_ipc: Make intel_pmc_ipc_simple_command() staticMika Westerberg2020-01-221-2/+1
| | | | | | | | | This function is not called outside of intel_pmc_ipc.c so we can make it static instead. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_ipc: Make intel_pmc_gcr_update() staticMika Westerberg2020-01-221-2/+1
| | | | | | | | | This function is not called outside of intel_pmc_ipc.c so we can make it static instead. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_scu_ipc: Reformat kernel-doc comments of exported functionsMika Westerberg2020-01-221-57/+55
| | | | | | | | | | | | Format kernel-doc comments of the exported functions to follow the typical format that does not have tab indentation. Also capitalize parameter descriptions and add a missing period. No functional changes intended. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_scu_ipc: Drop intel_scu_ipc_raw_command()Mika Westerberg2020-01-221-63/+0
| | | | | | | | There is no user for this function so we can drop it from the driver. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_scu_ipc: Drop intel_scu_ipc_io[read|write][8|16]()Mika Westerberg2020-01-221-68/+0
| | | | | | | | There are no users for these so we can remove them. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_scu_ipc: Drop unused macrosMika Westerberg2020-01-221-5/+1
| | | | | | | | These macros are not used anywhere in the driver so drop them. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_scu_ipc: Sleeping is fine when pollingMika Westerberg2020-01-221-15/+14
| | | | | | | | | | | | | | There is no reason why the driver would need to block other threads from running the CPU while it is waiting for the SCU IPC to complete its work. For this reason switch the driver to use usleep_range() instead with a bit more relaxed polling loop. Also add constant for the timeout and use the same value for both polling and interrupt modes. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_scu_ipc: Drop intel_scu_ipc_i2c_cntrl()Mika Westerberg2020-01-221-87/+3
| | | | | | | | | | There are no existing users for this functionality so drop it from the driver completely. This also means we don't need to keep the struct intel_scu_ipc_pdata_t around anymore so remove that as well. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_scu_ipc: Remove Lincroft supportMika Westerberg2020-01-221-7/+0
| | | | | | | | | | Moorestown support was removed years ago with by the commit 1a8359e411eb ("x86/mid: Remove Intel Moorestown"). Lincroft is the CPU side chip of Moorestown and not supported anymore so remove the code from the driver. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_scu_ipc: Add constants for register offsetsMika Westerberg2020-01-221-9/+11
| | | | | | | | | This makes the code more readable. These are taken from intel_pmc_ipc.c which implements the same thing. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_scu_ipc: Fix interrupt supportMika Westerberg2020-01-221-13/+8
| | | | | | | | | | | Currently the driver has disabled interrupt support for Tangier but actually interrupt works just fine if the command is not written twice in a row. Also we need to ack the interrupt in the handler. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: stable@vger.kernel.org Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_scu_ipcutil: Remove default y from KconfigMika Westerberg2020-01-221-1/+0
| | | | | | | | | This driver is by no means essential for system to boot up so remove default y from it. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Take a copy of ddataMika Westerberg2020-01-221-2/+3
| | | | | | | | | | | | | The driver gets driver_data from memory that is marked as const (which is probably put to read-only memory) and it then modifies it. This likely causes some sort of fault to happen. Fix this by taking a copy of the structure. Fixes: c94a8ff14de3 ("platform/x86: intel_mid_powerbtn: make mid_pb_ddata const") Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: asus-nb-wmi: Support left round button on N56VBPaul Cercueil2020-01-201-0/+1
| | | | | | | | | The N56VB laptop has a round button located on the left side above the keyboard. Map it to F13 since it does not have any predeterminated purpose. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: ISST: Allow additional core-power mailbox commandsSrinivas Pandruvada2020-01-201-0/+3
| | | | | | | | To discover core-power capability, some new mailbox commands are added. Allow those commands to execute. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: mlx-platform: Add support for next generation systemsVadim Pasternak2020-01-131-0/+180
| | | | | | | | | | | | | | Add support for new Mellanox system types of basic class VMOD0010, containing new Mellanox systems equipped with new switch device Spectrum 3 (32x400GbE/64x200G/128x100G Ethernet switch). These are the Top of the Rack 1U/2U/4U systems, equipped with Mellanox Comex card and with the switch board with Mellanox Spectrum-3 device. This class of devices can be equipped with two PS units for 1U/2U or with four PS units for 4U systems. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/mellanox: mlxreg-hotplug: Add support for new capability registerVadim Pasternak2020-01-131-0/+14
| | | | | | | | | | | | | | Add support for capability register, which is used for detection of the actual number of interrupt capable components within the particular group, supported by the specific system. Such components could be for example the number of power units and interrupts related to these units. The motivation is to avoid adding a new code in the future in order to distinct between the systems type supported different number of the components like power supplies, FANs, ASICs, line cards. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: mlx-platform: Add support for new capability registerVadim Pasternak2020-01-131-0/+7
| | | | | | | | | | | | Add support for capability register, which contains information about the number of PS units equipped on the system and about minimum I2C frequency supported by the all system's I2C devices. Utilization of this register allows to avoid necessity of providing new system description, in case it differs in number of PS units or in minimal I2C frequency. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: mlx-platform: Add support for new system typeVadim Pasternak2020-01-131-1/+238
| | | | | | | | | | | | Add support for new Mellanox system types of basic class VMOD0009, containing Mellanox systems equipped with the switch devices Spectrum 1 (32x100GbE Ethernet switch) and Switch-IB/Switch-IB2 (36x100Gbe InfiniBand switch). These are the Top of the Rack system, equipped with Mellanox Comex card. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: mlx-platform: Set system mux configuration based on system typeVadim Pasternak2020-01-131-12/+32
| | | | | | | | | | Separate assignment for systems mux configuration based on system type, instead of setting the same configuration for the all. The motivation is to allow introduction of new systems types with the different mux topology. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: mlx-platform: Add more definitions for system attributesVadim Pasternak2020-01-131-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new attributes for "next-generation" type systems: - Reset cause indication, when system reset has been caused by the platform reset request through CPLD, by AC power failure, by software power off request through CPLD. by signal asserted by SOC through ACPI register. It introduces more reset causes, which can be monitored after the reboots. - Setting and removing system VPD (EEPROM) hardware write protection. It allows to access VPD during production cycle and prevents VPD corruption on system in field. - Voltage regulator devices configuration update status and version. It allows to monitor configuration update status and current active version for such sort of devices. - PCIe ASIC reset disable - when set ASIC will go down upon PCIe root complex reset, otherwise ASIC will stay up during PCIe root complex reset. - System configuration Ids to provide system static topology identification, like system's static I2C topology, number and type of FPGA devices within the system and so on. Add the existing attribute for "iio" bank selection for system type "msn21xx". All the above attributes are exposed through "sysfs" by "mlxreg-io" driver. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: mlx-platform: Cosmetic changesVadim Pasternak2020-01-131-5/+5
| | | | | | | Remove redundant semicolons at the end of few functions. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: Add support for Uncore frequency controlSrinivas Pandruvada2020-01-133-0/+449
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some server users set limits on the uncore frequency using MSR 620H, while running latency sensitive workloads. Here uncore frequency controls RING/LLC(last-level cache) clocks. But MSR control is not always possible from the user space, so this driver provides a sysfs interface to set max and min frequency limits. This MSR 620H is a die scoped in multi-die system or package scoped in non multi-die systems. When this driver is loaded, a new directory is created under /sys/devices/system/cpu. For example on a two package Skylake server: $cd /sys/devices/system/cpu/intel_uncore_frequency $ls package_00_die_00 package_01_die_00 $ls package_00_die_00 max_freq_khz min_freq_khz initial_max_freq_khz initial_min_freq_khz $grep . * max_freq_khz:2400000 min_freq_khz:1200000 initial_max_freq_khz:2400000 initial_min_freq_khz:1200000 Here, initial_max_freq_khz and initial_min_freq_khz are read only attributes to show power up or initial values of max and min frequencies respectively. Other attributes are read-write, so that users can modify. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0Jian-Hong Pan2020-01-131-7/+1
| | | | | | | | | | | Some of ASUS laptops like UX431FL keyboard backlight cannot be set to brightness 0. According to ASUS' information, the brightness should be 0x80 ~ 0x83. This patch fixes it by following the logic. Fixes: e9809c0b9670 ("asus-wmi: add keyboard backlight support") Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com> Reviewed-by: Daniel Drake <drake@endlessm.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_atomisp2_pm: Spelling fixesAndy Shevchenko2020-01-102-9/+8
| | | | | | | | Fix ambiguous spelling in the comments. While here, update two lines to fit one. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_atomisp2_pm: Refactor timeout loopAndy Shevchenko2020-01-101-9/+5
| | | | | | | | | | | | | | | | | | | | | The timeout loop look more naturally when done like unsigned long timeout = ...; ... do { ... if (cond) return %OK; sleep(...); } while (time_before(timeout)); ...print timeout error... return %ERROR; It also saves LOCs. Convert the driver to this format of timeout loop. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: asus_wmi: Set throttle thermal policy to defaultLeonid Maksymchuk2020-01-101-0/+11
| | | | | | | | | | | | ASUS TUF FX705DY/FX505DY starts in silent mode and under heavy CPU load it overheats and drops CPU frequency to 399MHz and stays at it until reboot [1]. Set throttle thermal policy to default to avoid overheating and throttlig. [1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=203733 Signed-off-by: Leonid Maksymchuk <leonmaxx@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: asus_wmi: Support throttle thermal policyLeonid Maksymchuk2020-01-101-0/+113
| | | | | | | | | | | | | | Throttle thermal policy ACPI device is used to control CPU cooling and throttling. This patch adds sysfs entry for setting current mode and Fn+F5 hotkey that switches to next. Policy modes: * 0x00 - default * 0x01 - overboost * 0x02 - silent Signed-off-by: Leonid Maksymchuk <leonmaxx@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: touchscreen_dmi: Fix indentation in several placesAndy Shevchenko2020-01-101-41/+21
| | | | | | | | | | 1. Put on one line PROPERTY_ENTRY_STRING("firmware-name", ...) lines. In most cases this doesn't over the limit, the rest is pretty much obvious from reading point of view. 2. Put on one line DMI_MATCH() parameters, we already have over the limit lines. 3. Reduce indentation of function parameters. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: touchscreen_dmi: Add info for the PiPO W11 tabletTim Josten2020-01-101-0/+28
| | | | | | | | Add touchscreen info for the PiPO W11 tablet. Signed-off-by: Tim Josten <timjosten@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_core: update Comet Lake platform driverHarry Pan2020-01-101-0/+2
| | | | | | | Adding new CML CPU model ID into platform driver support list. Signed-off-by: Harry Pan <harry.pan@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: GPD pocket fan: Allow somewhat lower/higher temperature limitsHans de Goede2020-01-101-1/+1
| | | | | | | | | | | | Allow the user to configure the fan to turn on / speed-up at lower thresholds then before (20 degrees Celcius as minimum instead of 40) and likewise also allow the user to delay the fan speeding-up till the temperature hits 90 degrees Celcius (was 70). Cc: Jason Anderson <jasona.594@gmail.com> Reported-by: Jason Anderson <jasona.594@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: GPD pocket fan: Use default values when wrong modparams are givenHans de Goede2020-01-101-6/+19
| | | | | | | | | | | | | | | | | | | Use our default values when wrong module-parameters are given, instead of refusing to load. Refusing to load leaves the fan at the BIOS default setting, which is "Off". The CPU's thermal throttling should protect the system from damage, but not-loading is really not the best fallback in this case. This commit fixes this by re-setting module-parameter values to their defaults if they are out of range, instead of failing the probe with -EINVAL. Cc: stable@vger.kernel.org Cc: Jason Anderson <jasona.594@gmail.com> Reported-by: Jason Anderson <jasona.594@gmail.com> Fixes: 594ce6db326e ("platform/x86: GPD pocket fan: Use a min-speed of 2 while charging") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/mellanox: fix potential deadlock in the tmfifo driverLiming Sun2020-01-101-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes the potential deadlock caused by the console Rx and Tx processing at the same time. Rx and Tx both take the console and tmfifo spinlock but in different order which causes potential deadlock. The fix is to use different tmfifo spinlock for Rx and Tx since they protect different resources and it's safe to split the lock. Below is the reported call trace when copying/pasting large string in the console. Rx: _raw_spin_lock_irqsave (hvc lock) __hvc_poll hvc_poll in_intr vring_interrupt mlxbf_tmfifo_rxtx_one_desc (tmfifo lock) mlxbf_tmfifo_rxtx mlxbf_tmfifo_work_rxtx Tx: _raw_spin_lock_irqsave (tmfifo lock) mlxbf_tmfifo_virtio_notify virtqueue_notify virtqueue_kick put_chars hvc_push hvc_write (hvc lock) ... do_tty_write tty_write Fixes: 1357dfd7261f ("platform/mellanox: Add TmFifo driver for Mellanox BlueField Soc") Cc: <stable@vger.kernel.org> # 5.4+ Reviewed-by: David Woods <dwoods@mellanox.com> Signed-off-by: Liming Sun <lsun@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel-ips: Use the correct style for SPDX License IdentifierNishad Kamdar2020-01-102-2/+2
| | | | | | | | | | | | | | | This patch corrects the SPDX License Identifier style in header files related to x86 Platform Specific Drivers. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_telemetry_debugfs: Respect error code of ↵Andy Shevchenko2020-01-101-6/+8
| | | | | | | | | kstrtou32_from_user() kstrtou32_from_user() may return different error codes on certain circumstances. Respect all possible values. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_core: Fix spelling of MHz unitAndy Shevchenko2020-01-101-1/+1
| | | | | | Fix spelling of MHz unit in a comment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_core: Fix indentation in function definitionsAndy Shevchenko2020-01-101-4/+5
| | | | | | | There are two problematic places where indentation is not good to a reader and maintainer. Fix them here. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_core: Put more stuff under #ifdef DEBUG_FSAndy Shevchenko2020-01-101-5/+5
| | | | | | | There is a function which is solely used for DebugFS interface, do not build it otherwise. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_core: Respect error code of kstrtou32_from_user()Andy Shevchenko2020-01-101-6/+6
| | | | | | | | | kstrtou32_from_user() may return different error codes on certain circumstances. Respect all possible values. While here, move it out of the lock: there is no data access that lock guards. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_telemetry_pltdrv: use devm_platform_ioremap_resource()Andy Shevchenko2020-01-101-54/+10
| | | | | | | | Use devm_platform_ioremap_resource() to simplify the code a bit. While here, drop initialized but unused ssram_base_addr and ssram_size members. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_core: Add Intel Elkhart Lake supportGayatri Kammela2019-12-201-5/+6
| | | | | | | | | | | | | | | | | | | | Add Intel Elkhart Lake to the list of the platforms that driver supports for the PMC device. Just like Ice Lake and Tiger Lake, Elkhart Lake can also reuse all the Cannon Lake PCH IPs. Also, it uses the same PCH IPs of Tiger Lake, no additional effort is needed to enable but to simply reuse them. Cc: Peter Zijlstra <peterz@infradead.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Kan Liang <kan.liang@intel.com> Cc: David E. Box <david.e.box@intel.com> Cc: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com> Cc: Tony Luck <tony.luck@intel.com> Reviewed-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_core: Add Intel Tiger Lake supportGayatri Kammela2019-12-202-2/+46
| | | | | | | | | | | | | | | | | | | | Add Intel Tiger Lake to the list of the platforms that driver supports for the PMC device. Just like Ice Lake, Tiger Lake can also reuse all the Cannon Lake PCH IPs. Since Tiger Lake has almost the same number of PCH IPs as Ice Lake, reuse Ice Lake's PPFEAR_NUM_ENTRIES instead of defining a new macro. Cc: Peter Zijlstra <peterz@infradead.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Kan Liang <kan.liang@intel.com> Cc: David E. Box <david.e.box@intel.com> Cc: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com> Cc: Tony Luck <tony.luck@intel.com> Reviewed-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>