summaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-15 13:31:25 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-15 13:31:25 -0800
commite18bf801f1501e15830db5fa927a6e2832d49d7b (patch)
tree6880011bae0d372770c43fdbb7bcedf959d6d868 /include/linux/platform_data
parent8600b697cd4787ac3ce053d48ca7301836fd0c55 (diff)
parentcb2bf25145e0d2abef20f47dd2ae55bff97fd9cb (diff)
downloadlinux-0-day-e18bf801f1501e15830db5fa927a6e2832d49d7b.tar.gz
linux-0-day-e18bf801f1501e15830db5fa927a6e2832d49d7b.tar.xz
Merge tag 'platform-drivers-x86-v4.10-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86
Pull x86 platform driver updates from Darrent Hart: "Introduce one new driver for Mellanox platforms. Add support for various new models to existing drivers via quirks, hotkeys, etc. Significant updates to intel_pmc_core in support of Kabylake and Sunrise Point PCH power management debug. Some cleanup and refactoring across various drivers. Detailed summary: dell-laptop: - Use brightness_set_blocking for kbd_led_level_set thinkpad_acpi: - Initialize local in_tablet_mode and type - Fix old style declaration GCC warning - Adding new hotkey ID for Lenovo thinkpad - Add support for X1 Yoga (2016) Tablet Mode - Move tablet detection into separate function asus-nb-wmi: - Add X45U quirk - Make use of dmi->ident asus-wmi: - Set specified XUSB2PR value for X550LB intel_mid_thermal: - Fix suspend handlers unused warning intel-vbtn: - Switch to use devm_input_allocate_device dell-wmi: - Add events created by Dell Rugged 2-in-1s - Adjust wifi catcher to emit KEY_WLAN intel_pmc_core: - Add KBL CPUID support - Add LTR IGNORE debug feature - Add MPHY PLL clock gating status - ModPhy core lanes pg status - Add PCH IP Power Gating Status - Fix PWRMBASE mask and mmio reg len acer-wmi: - Only supports AMW0_GUID1 on acer family mlx-platform: - Introduce support for Mellanox hotplug driver platform/x86: - Use ACPI_FAILURE at appropriate places" * tag 'platform-drivers-x86-v4.10-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (22 commits) platform/x86: thinkpad_acpi: Initialize local in_tablet_mode and type platform/x86: dell-laptop: Use brightness_set_blocking for kbd_led_level_set platform/x86: thinkpad_acpi: Fix old style declaration GCC warning platform/x86: thinkpad_acpi: Adding new hotkey ID for Lenovo thinkpad platform/x86: thinkpad_acpi: Add support for X1 Yoga (2016) Tablet Mode platform/x86: thinkpad_acpi: Move tablet detection into separate function platform/x86: asus-nb-wmi.c: Add X45U quirk platform/x86: asus-nb-wmi: Make use of dmi->ident platform/x86: asus-wmi: Set specified XUSB2PR value for X550LB platform/x86: intel_mid_thermal: Fix suspend handlers unused warning platform/x86: intel-vbtn: Switch to use devm_input_allocate_device platform/x86: Use ACPI_FAILURE at appropriate places platform/x86: dell-wmi: Add events created by Dell Rugged 2-in-1s platform/x86: dell-wmi: Adjust wifi catcher to emit KEY_WLAN platform/x86: intel_pmc_core: Add KBL CPUID support platform/x86: intel_pmc_core: Add LTR IGNORE debug feature platform/x86: intel_pmc_core: Add MPHY PLL clock gating status platform/x86: intel_pmc_core: ModPhy core lanes pg status platform/x86: intel_pmc_core: Add PCH IP Power Gating Status platform/x86: intel_pmc_core: Fix PWRMBASE mask and mmio reg len ...
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/mlxcpld-hotplug.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/include/linux/platform_data/mlxcpld-hotplug.h b/include/linux/platform_data/mlxcpld-hotplug.h
new file mode 100644
index 0000000000000..e4cfcffaa6f49
--- /dev/null
+++ b/include/linux/platform_data/mlxcpld-hotplug.h
@@ -0,0 +1,99 @@
+/*
+ * 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 */