mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
platform-drivers-x86 for v4.16-1
New model support added for Dell, Ideapad, Acer, Asus, Thinkpad, and GPD laptops. Improvements to the common intel-vbtn driver, including tablet mode, rotate, and front button support. Intel CPU support added for Cannonlake and platform support for Dollar Cove power button. Overhaul of the mellanox platform driver, creating a new platform/mellanox directory for the newly multi-architecture regmap interface. Significant Intel PMC update with CannonLake support, Coffeelake update, CPUID enumeration, module support, new read64 API, refactoring and cleanups. Revert the apple-gmux iGP IO lock, addressing reported issues with non-binary drivers, leaving Nvidia binary driver users to comment out conflicting code. Miscellaneous fixes and cleanups. Previously merged during the 4.15-rc cycle: -e20a8e771d
platform/x86: dell-laptop: Fix keyboard max lighting for Dell Latitude E6410 -9cd5cf3710
platform/x86: asus-wireless: send an EV_SYN/SYN_REPORT between state changes -91c73e8092
platform/x86: dell-wmi: check for kmalloc() errors -9a1a625918
platform/x86: wmi: Call acpi_wmi_init() later The following is an automated git shortlog grouped by driver: ACPI / LPIT: - Export lpit_read_residency_count_address() Input: - add KEY_ROTATE_LOCK_TOGGLE MAINTAINERS: - Update tree for platform-drivers-x86 x86/cpu: - Add Cannonlake to Intel family acer-wireless: - Add Acer Wireless Radio Control driver intel_chtdc_ti_pwrbtn: - Add support for Dollar Cove TI power button GPD pocket fan: - Add driver for GPD pocket custom fan controller - Stop work on suspend - Use a min-speed of 2 while charging - Set speed to max on get_temp failure apple-gmux: - Revert: lock iGP IO to protect from vgaarb changes alienware-wmi: - lightbar LED support for Dell Inspiron 5675 asus-nb-wmi: - Support ALS on the Zenbook UX430UQ dell-laptop: - Allocate buffer on heap rather than globally - Add 2-in-1 devices to the DMI whitelist - Filter out spurious keyboard backlight change events - make some local functions static - Use bool in struct quirk_entry for true/false fields dell-smbios: - Correct notation for filtering dell-wmi: - Add an event created by Dell Latitude 5495 Kconfig - have ACPI_CMPC use depends instead of select for INPUT ideapad-laptop: - Add Y720-15IKB to no_hw_rfkill - add lenovo RESCUER R720-15IKBN to no_hw_rfkill_list - Use __func__ instead of write_ec_cmd in pr_err - Remove unnecessary else intel-hid: - add a DMI quirk to support Wacom MobileStudio Pro intel-vbtn: - Replace License by SDPX identifier - Remove redundant inclusions - Support tablet mode switch - Simplify autorelease logic - support panel front button - support KEY_ROTATE_LOCK_TOGGLE - Support separate press/release events - support SW_TABLET_MODE intel_int0002_vgpio: - Remove IRQF_NO_THREAD irq flag intel_pmc_core: - Special case for Coffeelake - Add CannonLake PCH support - Read base address from LPIT - Remove unused header file - Convert to ICPU macro - Substitute PCI with CPUID enumeration - Refactor debugfs entries - Update Kconfig - Fix file permission warnings - Change driver to a module - Fix kernel doc for pmc_dev - Remove unused variable - Remove unused EXPORTED API intel_pmc_ipc: - Add read64 API intel_telemetry: - Remove redundancies - Improve S0ix logs - Fix suspend stats mlx-platform: - Fix an ERR_PTR vs NULL issue - Add hotplug device unregister to error path - fix module aliases - Add IO access verification callbacks - Document pdev_hotplug field - Allow compilation for 32 bit arch platform/mellanox: - mlxreg-hotplug: Add check for negative adapter number - mlxreg-hotplug: Enable building for ARM - mlxreg-hotplug: Modify to use a regmap interface - Group create/destroy with attribute functions - Rename i2c bus to nr - mlxreg-hotplug: Remove unused wait.h include - Move Mellanox platform hotplug driver to platform/mellanox pmc_atom: - introduce DEFINE_SHOW_ATTRIBUTE() macro samsung-laptop: - Grammar s/are can/can/ silead_dmi: - Add Teclast X3 Plus tablet support - Add entry for newer BIOS for Trekstor Surftab 7.0 - Add entry for the Teclast X98 Plus II - Add entry for the Trekstor Primebook C13 - Add entry for the Chuwi Vi8 tablet - add entry for Chuwi Hi8 tablet - Add support for the Onda oBook 20 Plus tablet - Add touchscreen info for SurfTab twin 10.1 thinkpad_acpi: - suppress warning about palm detection - Accept flat mode for type 4 multi mode status -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJaegMmAAoJEKbMaAwKp364TvUH/3D9qNtsbXpZuc3ZMNHjIysU hdW6hOVfBN0Rk049mjw7nWv/udhWZ/6ChJDlXHX0ZugtNGnRnzbdtWGg4y38pDF1 LRuKjWfDeyMeJ11itD2xcxEaE6YsseWCKGZJ5D3T+sN4+1jgS4RLAa9cUJMl8QAo xZsT1MKpmGuj5eTLf5GgOVL2yfMZhZHabt3kGRY0eQqNqZBgpJw/GQNI1l6v4nAH MHPA7Gtj4HXHK8jGviZXpD9tg/iwahiUjGugG4HcxbMcpJ96a8CGyeaXmq2FlfNC /PpmVvhVVqzLuXKWAI+DZFLAiwIvPpxzVfOKF2Lty5Rejxf7pdmHq7aCNcALys0= =cKm9 -----END PGP SIGNATURE----- Merge tag 'platform-drivers-x86-v4.16-1' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform-driver updates from Darren Hart: "New model support added for Dell, Ideapad, Acer, Asus, Thinkpad, and GPD laptops. Improvements to the common intel-vbtn driver, including tablet mode, rotate, and front button support. Intel CPU support added for Cannonlake and platform support for Dollar Cove power button. Overhaul of the mellanox platform driver, creating a new platform/mellanox directory for the newly multi-architecture regmap interface. Significant Intel PMC update with CannonLake support, Coffeelake update, CPUID enumeration, module support, new read64 API, refactoring and cleanups. Revert the apple-gmux iGP IO lock, addressing reported issues with non-binary drivers, leaving Nvidia binary driver users to comment out conflicting code. Miscellaneous fixes and cleanups" * tag 'platform-drivers-x86-v4.16-1' of git://git.infradead.org/linux-platform-drivers-x86: (81 commits) platform/x86: mlx-platform: Fix an ERR_PTR vs NULL issue platform/x86: intel_pmc_core: Special case for Coffeelake platform/x86: intel_pmc_core: Add CannonLake PCH support x86/cpu: Add Cannonlake to Intel family platform/x86: intel_pmc_core: Read base address from LPIT ACPI / LPIT: Export lpit_read_residency_count_address() platform/x86: intel-vbtn: Replace License by SDPX identifier platform/x86: intel-vbtn: Remove redundant inclusions platform/x86: intel-vbtn: Support tablet mode switch platform/x86: dell-laptop: Allocate buffer on heap rather than globally platform/x86: intel_pmc_core: Remove unused header file platform/x86: mlx-platform: Add hotplug device unregister to error path platform/x86: mlx-platform: fix module aliases platform/mellanox: mlxreg-hotplug: Add check for negative adapter number platform/x86: mlx-platform: Add IO access verification callbacks platform/x86: mlx-platform: Document pdev_hotplug field platform/x86: mlx-platform: Allow compilation for 32 bit arch platform/mellanox: mlxreg-hotplug: Enable building for ARM platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface platform/mellanox: Group create/destroy with attribute functions ...
This commit is contained in:
commit
cbd7b8a76b
38 changed files with 2293 additions and 1103 deletions
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
* include/linux/platform_data/mlxcpld-hotplug.h
|
||||
* Copyright (c) 2016 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2016 Vadim Pasternak <vadimp@mellanox.com>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the names of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of the
|
||||
* GNU General Public License ("GPL") version 2 as published by the Free
|
||||
* Software Foundation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_PLATFORM_DATA_MLXCPLD_HOTPLUG_H
|
||||
#define __LINUX_PLATFORM_DATA_MLXCPLD_HOTPLUG_H
|
||||
|
||||
/**
|
||||
* struct mlxcpld_hotplug_device - I2C device data:
|
||||
* @adapter: I2C device adapter;
|
||||
* @client: I2C device client;
|
||||
* @brdinfo: device board information;
|
||||
* @bus: I2C bus, where device is attached;
|
||||
*
|
||||
* Structure represents I2C hotplug device static data (board topology) and
|
||||
* dynamic data (related kernel objects handles).
|
||||
*/
|
||||
struct mlxcpld_hotplug_device {
|
||||
struct i2c_adapter *adapter;
|
||||
struct i2c_client *client;
|
||||
struct i2c_board_info brdinfo;
|
||||
u16 bus;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct mlxcpld_hotplug_platform_data - device platform data:
|
||||
* @top_aggr_offset: offset of top aggregation interrupt register;
|
||||
* @top_aggr_mask: top aggregation interrupt common mask;
|
||||
* @top_aggr_psu_mask: top aggregation interrupt PSU mask;
|
||||
* @psu_reg_offset: offset of PSU interrupt register;
|
||||
* @psu_mask: PSU interrupt mask;
|
||||
* @psu_count: number of equipped replaceable PSUs;
|
||||
* @psu: pointer to PSU devices data array;
|
||||
* @top_aggr_pwr_mask: top aggregation interrupt power mask;
|
||||
* @pwr_reg_offset: offset of power interrupt register
|
||||
* @pwr_mask: power interrupt mask;
|
||||
* @pwr_count: number of power sources;
|
||||
* @pwr: pointer to power devices data array;
|
||||
* @top_aggr_fan_mask: top aggregation interrupt FAN mask;
|
||||
* @fan_reg_offset: offset of FAN interrupt register;
|
||||
* @fan_mask: FAN interrupt mask;
|
||||
* @fan_count: number of equipped replaceable FANs;
|
||||
* @fan: pointer to FAN devices data array;
|
||||
*
|
||||
* Structure represents board platform data, related to system hotplug events,
|
||||
* like FAN, PSU, power cable insertion and removing. This data provides the
|
||||
* number of hot-pluggable devices and hardware description for event handling.
|
||||
*/
|
||||
struct mlxcpld_hotplug_platform_data {
|
||||
u16 top_aggr_offset;
|
||||
u8 top_aggr_mask;
|
||||
u8 top_aggr_psu_mask;
|
||||
u16 psu_reg_offset;
|
||||
u8 psu_mask;
|
||||
u8 psu_count;
|
||||
struct mlxcpld_hotplug_device *psu;
|
||||
u8 top_aggr_pwr_mask;
|
||||
u16 pwr_reg_offset;
|
||||
u8 pwr_mask;
|
||||
u8 pwr_count;
|
||||
struct mlxcpld_hotplug_device *pwr;
|
||||
u8 top_aggr_fan_mask;
|
||||
u16 fan_reg_offset;
|
||||
u8 fan_mask;
|
||||
u8 fan_count;
|
||||
struct mlxcpld_hotplug_device *fan;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_PLATFORM_DATA_MLXCPLD_HOTPLUG_H */
|
144
include/linux/platform_data/mlxreg.h
Normal file
144
include/linux/platform_data/mlxreg.h
Normal file
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
* Copyright (c) 2017 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2017 Vadim Pasternak <vadimp@mellanox.com>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the names of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of the
|
||||
* GNU General Public License ("GPL") version 2 as published by the Free
|
||||
* Software Foundation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_PLATFORM_DATA_MLXREG_H
|
||||
#define __LINUX_PLATFORM_DATA_MLXREG_H
|
||||
|
||||
#define MLXREG_CORE_LABEL_MAX_SIZE 32
|
||||
|
||||
/**
|
||||
* struct mlxreg_hotplug_device - I2C device data:
|
||||
*
|
||||
* @adapter: I2C device adapter;
|
||||
* @client: I2C device client;
|
||||
* @brdinfo: device board information;
|
||||
* @nr: I2C device adapter number, to which device is to be attached;
|
||||
*
|
||||
* Structure represents I2C hotplug device static data (board topology) and
|
||||
* dynamic data (related kernel objects handles).
|
||||
*/
|
||||
struct mlxreg_hotplug_device {
|
||||
struct i2c_adapter *adapter;
|
||||
struct i2c_client *client;
|
||||
struct i2c_board_info *brdinfo;
|
||||
int nr;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct mlxreg_core_data - attributes control data:
|
||||
*
|
||||
* @label: attribute label;
|
||||
* @label: attribute register offset;
|
||||
* @reg: attribute register;
|
||||
* @mask: attribute access mask;
|
||||
* @mode: access mode;
|
||||
* @bit: attribute effective bit;
|
||||
* @np - pointer to node platform associated with attribute;
|
||||
* @hpdev - hotplug device data;
|
||||
* @health_cntr: dynamic device health indication counter;
|
||||
* @attached: true if device has been attached after good health indication;
|
||||
*/
|
||||
struct mlxreg_core_data {
|
||||
char label[MLXREG_CORE_LABEL_MAX_SIZE];
|
||||
u32 reg;
|
||||
u32 mask;
|
||||
u32 bit;
|
||||
umode_t mode;
|
||||
struct device_node *np;
|
||||
struct mlxreg_hotplug_device hpdev;
|
||||
u8 health_cntr;
|
||||
bool attached;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct mlxreg_core_item - same type components controlled by the driver:
|
||||
*
|
||||
* @data: component data;
|
||||
* @aggr_mask: group aggregation mask;
|
||||
* @reg: group interrupt status register;
|
||||
* @mask: group interrupt mask;
|
||||
* @cache: last status value for elements fro the same group;
|
||||
* @count: number of available elements in the group;
|
||||
* @ind: element's index inside the group;
|
||||
* @inversed: if 0: 0 for signal status is OK, if 1 - 1 is OK;
|
||||
* @health: true if device has health indication, false in other case;
|
||||
*/
|
||||
struct mlxreg_core_item {
|
||||
struct mlxreg_core_data *data;
|
||||
u32 aggr_mask;
|
||||
u32 reg;
|
||||
u32 mask;
|
||||
u32 cache;
|
||||
u8 count;
|
||||
u8 ind;
|
||||
u8 inversed;
|
||||
u8 health;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct mlxreg_core_platform_data - platform data:
|
||||
*
|
||||
* @led_data: led private data;
|
||||
* @regmap: register map of parent device;
|
||||
* @counter: number of led instances;
|
||||
*/
|
||||
struct mlxreg_core_platform_data {
|
||||
struct mlxreg_core_data *data;
|
||||
void *regmap;
|
||||
int counter;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct mlxreg_core_hotplug_platform_data - hotplug platform data:
|
||||
*
|
||||
* @items: same type components with the hotplug capability;
|
||||
* @irq: platform interrupt number;
|
||||
* @regmap: register map of parent device;
|
||||
* @counter: number of the components with the hotplug capability;
|
||||
* @cell: location of top aggregation interrupt register;
|
||||
* @mask: top aggregation interrupt common mask;
|
||||
* @cell_low: location of low aggregation interrupt register;
|
||||
* @mask_low: low aggregation interrupt common mask;
|
||||
*/
|
||||
struct mlxreg_core_hotplug_platform_data {
|
||||
struct mlxreg_core_item *items;
|
||||
int irq;
|
||||
void *regmap;
|
||||
int counter;
|
||||
u32 cell;
|
||||
u32 mask;
|
||||
u32 cell_low;
|
||||
u32 mask_low;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_PLATFORM_DATA_MLXREG_H */
|
Loading…
Add table
Add a link
Reference in a new issue