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->counter; 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
358 if (unlikely(!item)) { in mlxreg_hotplug_work_helper()
360 item->reg, item->mask); in mlxreg_hotplug_work_helper()
366 ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_MASK_OFF, in mlxreg_hotplug_work_helper()
372 ret = regmap_read(priv->regmap, item->reg, ®val); in mlxreg_hotplug_work_helper()
377 regval &= item->mask; in mlxreg_hotplug_work_helper()
378 asserted = item->cache ^ regval; in mlxreg_hotplug_work_helper()
379 item->cache = regval; in mlxreg_hotplug_work_helper()
383 pos = mlxreg_hotplug_item_label_index_get(item->mask, bit); in mlxreg_hotplug_work_helper()
387 data = item->data + pos; in mlxreg_hotplug_work_helper()
389 if (item->inversed) in mlxreg_hotplug_work_helper()
390 mlxreg_hotplug_device_destroy(priv, data, item->kind); in mlxreg_hotplug_work_helper()
392 mlxreg_hotplug_device_create(priv, data, item->kind); in mlxreg_hotplug_work_helper()
394 if (item->inversed) in mlxreg_hotplug_work_helper()
395 mlxreg_hotplug_device_create(priv, data, item->kind); in mlxreg_hotplug_work_helper()
397 mlxreg_hotplug_device_destroy(priv, data, item->kind); in mlxreg_hotplug_work_helper()
402 ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_EVENT_OFF, in mlxreg_hotplug_work_helper()
408 ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_MASK_OFF, in mlxreg_hotplug_work_helper()
409 item->mask); in mlxreg_hotplug_work_helper()
418 struct mlxreg_core_item *item) in mlxreg_hotplug_health_work_helper() argument
420 struct mlxreg_core_data *data = item->data; in mlxreg_hotplug_health_work_helper()
424 for (i = 0; i < item->count; i++, data++) { in mlxreg_hotplug_health_work_helper()
438 if (item->cache == regval) in mlxreg_hotplug_health_work_helper()
454 mlxreg_hotplug_device_create(priv, data, item->kind); in mlxreg_hotplug_health_work_helper()
464 mlxreg_hotplug_device_destroy(priv, data, item->kind); in mlxreg_hotplug_health_work_helper()
469 item->cache = regval; in mlxreg_hotplug_health_work_helper()
520 struct mlxreg_core_item *item; in mlxreg_hotplug_work_handler() local
528 item = pdata->items; in mlxreg_hotplug_work_handler()
558 for (i = 0; i < pdata->counter; i++, item++) { in mlxreg_hotplug_work_handler()
559 if (aggr_asserted & item->aggr_mask) { in mlxreg_hotplug_work_handler()
560 if (item->health) in mlxreg_hotplug_work_handler()
561 mlxreg_hotplug_health_work_helper(priv, item); in mlxreg_hotplug_work_handler()
563 mlxreg_hotplug_work_helper(priv, item); in mlxreg_hotplug_work_handler()
599 struct mlxreg_core_item *item; in mlxreg_hotplug_set_irq() local
605 item = pdata->items; in mlxreg_hotplug_set_irq()
607 for (i = 0; i < pdata->counter; i++, item++) { in mlxreg_hotplug_set_irq()
609 ret = regmap_write(priv->regmap, item->reg + in mlxreg_hotplug_set_irq()
618 data = item->data; in mlxreg_hotplug_set_irq()
619 for (j = 0; j < item->count; j++, data++) { in mlxreg_hotplug_set_irq()
629 item->mask &= ~BIT(j); in mlxreg_hotplug_set_irq()
634 if (item->inversed) { in mlxreg_hotplug_set_irq()
635 item->cache = item->mask; in mlxreg_hotplug_set_irq()
636 ret = regmap_write(priv->regmap, item->reg + in mlxreg_hotplug_set_irq()
638 item->mask); in mlxreg_hotplug_set_irq()
672 struct mlxreg_core_item *item; in mlxreg_hotplug_unset_irq() local
677 item = pdata->items; in mlxreg_hotplug_unset_irq()
691 for (i = 0; i < pdata->counter; i++, item++) { in mlxreg_hotplug_unset_irq()
692 data = item->data; in mlxreg_hotplug_unset_irq()
701 count = item->count; in mlxreg_hotplug_unset_irq()
703 mlxreg_hotplug_device_destroy(priv, data, item->kind); in mlxreg_hotplug_unset_irq()