platform/x86: Introduce support for Mellanox hotplug driver
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: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-21 00:28:01 +08:00
|
|
|
/*
|
2018-01-18 02:21:53 +08:00
|
|
|
* Copyright (c) 2017 Mellanox Technologies. All rights reserved.
|
|
|
|
* Copyright (c) 2017 Vadim Pasternak <vadimp@mellanox.com>
|
platform/x86: Introduce support for Mellanox hotplug driver
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: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-21 00:28:01 +08:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2018-01-18 02:21:53 +08:00
|
|
|
#ifndef __LINUX_PLATFORM_DATA_MLXREG_H
|
|
|
|
#define __LINUX_PLATFORM_DATA_MLXREG_H
|
platform/x86: Introduce support for Mellanox hotplug driver
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: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-21 00:28:01 +08:00
|
|
|
|
|
|
|
/**
|
2018-01-18 02:21:53 +08:00
|
|
|
* struct mlxreg_hotplug_device - I2C device data:
|
platform/x86: Introduce support for Mellanox hotplug driver
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: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-21 00:28:01 +08:00
|
|
|
* @adapter: I2C device adapter;
|
|
|
|
* @client: I2C device client;
|
|
|
|
* @brdinfo: device board information;
|
2018-01-23 10:43:27 +08:00
|
|
|
* @nr: I2C device adapter number, to which device is to be attached;
|
platform/x86: Introduce support for Mellanox hotplug driver
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: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-21 00:28:01 +08:00
|
|
|
*
|
|
|
|
* Structure represents I2C hotplug device static data (board topology) and
|
|
|
|
* dynamic data (related kernel objects handles).
|
|
|
|
*/
|
2018-01-18 02:21:53 +08:00
|
|
|
struct mlxreg_hotplug_device {
|
platform/x86: Introduce support for Mellanox hotplug driver
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: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-21 00:28:01 +08:00
|
|
|
struct i2c_adapter *adapter;
|
|
|
|
struct i2c_client *client;
|
|
|
|
struct i2c_board_info brdinfo;
|
2018-01-23 10:43:27 +08:00
|
|
|
int nr;
|
platform/x86: Introduce support for Mellanox hotplug driver
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: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-21 00:28:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2018-01-18 02:21:53 +08:00
|
|
|
* struct mlxreg_hotplug_platform_data - device platform data:
|
platform/x86: Introduce support for Mellanox hotplug driver
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: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-21 00:28:01 +08:00
|
|
|
* @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.
|
|
|
|
*/
|
2018-01-18 02:21:53 +08:00
|
|
|
struct mlxreg_hotplug_platform_data {
|
platform/x86: Introduce support for Mellanox hotplug driver
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: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-21 00:28:01 +08:00
|
|
|
u16 top_aggr_offset;
|
|
|
|
u8 top_aggr_mask;
|
|
|
|
u8 top_aggr_psu_mask;
|
|
|
|
u16 psu_reg_offset;
|
|
|
|
u8 psu_mask;
|
|
|
|
u8 psu_count;
|
2018-01-18 02:21:53 +08:00
|
|
|
struct mlxreg_hotplug_device *psu;
|
platform/x86: Introduce support for Mellanox hotplug driver
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: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-21 00:28:01 +08:00
|
|
|
u8 top_aggr_pwr_mask;
|
|
|
|
u16 pwr_reg_offset;
|
|
|
|
u8 pwr_mask;
|
|
|
|
u8 pwr_count;
|
2018-01-18 02:21:53 +08:00
|
|
|
struct mlxreg_hotplug_device *pwr;
|
platform/x86: Introduce support for Mellanox hotplug driver
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: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-21 00:28:01 +08:00
|
|
|
u8 top_aggr_fan_mask;
|
|
|
|
u16 fan_reg_offset;
|
|
|
|
u8 fan_mask;
|
|
|
|
u8 fan_count;
|
2018-01-18 02:21:53 +08:00
|
|
|
struct mlxreg_hotplug_device *fan;
|
platform/x86: Introduce support for Mellanox hotplug driver
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: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-21 00:28:01 +08:00
|
|
|
};
|
|
|
|
|
2018-01-18 02:21:53 +08:00
|
|
|
#endif /* __LINUX_PLATFORM_DATA_MLXREG_H */
|