From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vadim Pasternak Subject: [PATCH v0 06/12] mlxsw: core: Add bus frequency capability flag for the bus type Date: Thu, 21 Jun 2018 15:28:00 +0000 Message-ID: <1529594883-20619-7-git-send-email-vadimp@mellanox.com> References: <1529594883-20619-1-git-send-email-vadimp@mellanox.com> Cc: netdev@vger.kernel.org, jiri@resnulli.us, Vadim Pasternak To: davem@davemloft.net Return-path: Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:54685 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933323AbeFUNca (ORCPT ); Thu, 21 Jun 2018 09:32:30 -0400 In-Reply-To: <1529594883-20619-1-git-send-email-vadimp@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: Add low frequency bus capability in order to allow core functionality separation based on bus type. Driver could run over PCIe, which is considered as high frequency bus or I2C , which is considered as low frequency bus. In the last case time setting, for example, for thermal polling interval, should be increased. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.h | 1 + drivers/net/ethernet/mellanox/mlxsw/i2c.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.h b/drivers/net/ethernet/mellanox/mlxsw/core.h index 552cfa2..95e6190 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core.h +++ b/drivers/net/ethernet/mellanox/mlxsw/core.h @@ -371,6 +371,7 @@ struct mlxsw_bus_info { struct mlxsw_fw_rev fw_rev; u8 vsd[MLXSW_CMD_BOARDINFO_VSD_LEN]; u8 psid[MLXSW_CMD_BOARDINFO_PSID_LEN]; + bool low_frequency; }; struct mlxsw_hwmon; diff --git a/drivers/net/ethernet/mellanox/mlxsw/i2c.c b/drivers/net/ethernet/mellanox/mlxsw/i2c.c index 25f9915..384b337 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/i2c.c +++ b/drivers/net/ethernet/mellanox/mlxsw/i2c.c @@ -536,6 +536,7 @@ static int mlxsw_i2c_probe(struct i2c_client *client, mlxsw_i2c->bus_info.device_kind = id->name; mlxsw_i2c->bus_info.device_name = client->name; mlxsw_i2c->bus_info.dev = &client->dev; + mlxsw_i2c->bus_info.low_frequency = true; mlxsw_i2c->dev = &client->dev; err = mlxsw_core_bus_device_register(&mlxsw_i2c->bus_info, -- 2.1.4