Lines Matching refs:item

212 	struct mlxreg_core_item *item;  in mlxreg_hotplug_attr_show()  local
218 item = pdata->items + nr; in mlxreg_hotplug_attr_show()
219 data = item->data + index; in mlxreg_hotplug_attr_show()
225 if (item->health) { in mlxreg_hotplug_attr_show()
229 if (item->inversed) in mlxreg_hotplug_attr_show()
255 struct mlxreg_core_item *item; in mlxreg_hotplug_attr_init() local
262 item = pdata->items; in mlxreg_hotplug_attr_init()
265 for (i = 0; i < pdata->count; i++, item++) { in mlxreg_hotplug_attr_init()
266 if (item->capability) { in mlxreg_hotplug_attr_init()
272 ret = regmap_read(priv->regmap, item->capability, in mlxreg_hotplug_attr_init()
277 item->mask = GENMASK((regval & item->mask) - 1, 0); in mlxreg_hotplug_attr_init()
280 data = item->data; in mlxreg_hotplug_attr_init()
283 mask = item->mask; in mlxreg_hotplug_attr_init()
285 count = item->ind ? item->ind : item->count; in mlxreg_hotplug_attr_init()
344 struct mlxreg_core_item *item) in mlxreg_hotplug_work_helper() argument
352 ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_MASK_OFF, in mlxreg_hotplug_work_helper()
358 ret = regmap_read(priv->regmap, item->reg, &regval); in mlxreg_hotplug_work_helper()
363 regval &= item->mask; in mlxreg_hotplug_work_helper()
364 asserted = item->cache ^ regval; in mlxreg_hotplug_work_helper()
365 item->cache = regval; in mlxreg_hotplug_work_helper()
369 pos = mlxreg_hotplug_item_label_index_get(item->mask, bit); in mlxreg_hotplug_work_helper()
373 data = item->data + pos; in mlxreg_hotplug_work_helper()
375 if (item->inversed) in mlxreg_hotplug_work_helper()
376 mlxreg_hotplug_device_destroy(priv, data, item->kind); in mlxreg_hotplug_work_helper()
378 mlxreg_hotplug_device_create(priv, data, item->kind); in mlxreg_hotplug_work_helper()
380 if (item->inversed) in mlxreg_hotplug_work_helper()
381 mlxreg_hotplug_device_create(priv, data, item->kind); in mlxreg_hotplug_work_helper()
383 mlxreg_hotplug_device_destroy(priv, data, item->kind); in mlxreg_hotplug_work_helper()
388 ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_EVENT_OFF, in mlxreg_hotplug_work_helper()
394 ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_MASK_OFF, in mlxreg_hotplug_work_helper()
395 item->mask); in mlxreg_hotplug_work_helper()
404 struct mlxreg_core_item *item) in mlxreg_hotplug_health_work_helper() argument
406 struct mlxreg_core_data *data = item->data; in mlxreg_hotplug_health_work_helper()
410 for (i = 0; i < item->count; i++, data++) { in mlxreg_hotplug_health_work_helper()
424 if (item->cache == regval) in mlxreg_hotplug_health_work_helper()
440 mlxreg_hotplug_device_create(priv, data, item->kind); in mlxreg_hotplug_health_work_helper()
450 mlxreg_hotplug_device_destroy(priv, data, item->kind); in mlxreg_hotplug_health_work_helper()
455 item->cache = regval; in mlxreg_hotplug_health_work_helper()
506 struct mlxreg_core_item *item; in mlxreg_hotplug_work_handler() local
514 item = pdata->items; in mlxreg_hotplug_work_handler()
544 for (i = 0; i < pdata->count; i++, item++) { in mlxreg_hotplug_work_handler()
545 if (aggr_asserted & item->aggr_mask) { in mlxreg_hotplug_work_handler()
546 if (item->health) in mlxreg_hotplug_work_handler()
547 mlxreg_hotplug_health_work_helper(priv, item); in mlxreg_hotplug_work_handler()
549 mlxreg_hotplug_work_helper(priv, item); in mlxreg_hotplug_work_handler()
585 struct mlxreg_core_item *item; in mlxreg_hotplug_set_irq() local
591 item = pdata->items; in mlxreg_hotplug_set_irq()
593 for (i = 0; i < pdata->count; i++, item++) { in mlxreg_hotplug_set_irq()
595 ret = regmap_write(priv->regmap, item->reg + in mlxreg_hotplug_set_irq()
604 data = item->data; in mlxreg_hotplug_set_irq()
605 for (j = 0; j < item->count; j++, data++) { in mlxreg_hotplug_set_irq()
615 item->mask &= ~BIT(j); in mlxreg_hotplug_set_irq()
620 if (item->inversed) { in mlxreg_hotplug_set_irq()
621 item->cache = item->mask; in mlxreg_hotplug_set_irq()
622 ret = regmap_write(priv->regmap, item->reg + in mlxreg_hotplug_set_irq()
624 item->mask); in mlxreg_hotplug_set_irq()
658 struct mlxreg_core_item *item; in mlxreg_hotplug_unset_irq() local
663 item = pdata->items; in mlxreg_hotplug_unset_irq()
677 for (i = 0; i < pdata->count; i++, item++) { in mlxreg_hotplug_unset_irq()
678 data = item->data; in mlxreg_hotplug_unset_irq()
687 count = item->count; in mlxreg_hotplug_unset_irq()
689 mlxreg_hotplug_device_destroy(priv, data, item->kind); in mlxreg_hotplug_unset_irq()