platform/x86: mlx-platform: Add support for fan capability registers
Provide support for the fan capability registers for the next generation systems of types MQM87xx, MSN34xx, MSN37xx. These new registers provide configuration for tachometers and fan drawers connectivity. Use these registers for next generation led, fan and hotplug structures in order to distinguish between the systems which have minor configuration differences. This reduces the amount of code used to describe such systems. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Darren Hart (VMware)

vecāks
946e4e02b1
revīzija
83cdb2c111
@@ -495,7 +495,9 @@ static int mlxreg_hotplug_set_irq(struct mlxreg_hotplug_priv_data *priv)
|
||||
{
|
||||
struct mlxreg_core_hotplug_platform_data *pdata;
|
||||
struct mlxreg_core_item *item;
|
||||
int i, ret;
|
||||
struct mlxreg_core_data *data;
|
||||
u32 regval;
|
||||
int i, j, ret;
|
||||
|
||||
pdata = dev_get_platdata(&priv->pdev->dev);
|
||||
item = pdata->items;
|
||||
@@ -507,6 +509,25 @@ static int mlxreg_hotplug_set_irq(struct mlxreg_hotplug_priv_data *priv)
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Verify if hardware configuration requires to disable
|
||||
* interrupt capability for some of components.
|
||||
*/
|
||||
data = item->data;
|
||||
for (j = 0; j < item->count; j++, data++) {
|
||||
/* Verify if the attribute has capability register. */
|
||||
if (data->capability) {
|
||||
/* Read capability register. */
|
||||
ret = regmap_read(priv->regmap,
|
||||
data->capability, ®val);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
if (!(regval & data->bit))
|
||||
item->mask &= ~BIT(j);
|
||||
}
|
||||
}
|
||||
|
||||
/* Set group initial status as mask and unmask group event. */
|
||||
if (item->inversed) {
|
||||
item->cache = item->mask;
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user