Lines Matching refs:item
213 struct mlxreg_core_item *item; in mlxreg_hotplug_attr_show() local
219 item = pdata->items + nr; in mlxreg_hotplug_attr_show()
220 data = item->data + index; in mlxreg_hotplug_attr_show()
226 if (item->health) { in mlxreg_hotplug_attr_show()
230 if (item->inversed) in mlxreg_hotplug_attr_show()
245 struct mlxreg_core_item *item; in mlxreg_hotplug_attr_init() local
252 item = pdata->items; in mlxreg_hotplug_attr_init()
255 for (i = 0; i < pdata->counter; i++, item++) { in mlxreg_hotplug_attr_init()
256 if (item->capability) { in mlxreg_hotplug_attr_init()
262 ret = regmap_read(priv->regmap, item->capability, in mlxreg_hotplug_attr_init()
267 item->mask = GENMASK((regval & item->mask) - 1, 0); in mlxreg_hotplug_attr_init()
270 data = item->data; in mlxreg_hotplug_attr_init()
273 mask = item->mask; in mlxreg_hotplug_attr_init()
275 for_each_set_bit(j, &mask, item->count) { in mlxreg_hotplug_attr_init()
332 struct mlxreg_core_item *item) in mlxreg_hotplug_work_helper() argument
346 if (unlikely(!item)) { in mlxreg_hotplug_work_helper()
348 item->reg, item->mask); in mlxreg_hotplug_work_helper()
354 ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_MASK_OFF, in mlxreg_hotplug_work_helper()
360 ret = regmap_read(priv->regmap, item->reg, ®val); in mlxreg_hotplug_work_helper()
365 regval &= item->mask; in mlxreg_hotplug_work_helper()
366 asserted = item->cache ^ regval; in mlxreg_hotplug_work_helper()
367 item->cache = regval; in mlxreg_hotplug_work_helper()
370 data = item->data + bit; in mlxreg_hotplug_work_helper()
372 if (item->inversed) in mlxreg_hotplug_work_helper()
373 mlxreg_hotplug_device_destroy(priv, data, item->kind); in mlxreg_hotplug_work_helper()
375 mlxreg_hotplug_device_create(priv, data, item->kind); in mlxreg_hotplug_work_helper()
377 if (item->inversed) in mlxreg_hotplug_work_helper()
378 mlxreg_hotplug_device_create(priv, data, item->kind); in mlxreg_hotplug_work_helper()
380 mlxreg_hotplug_device_destroy(priv, data, item->kind); in mlxreg_hotplug_work_helper()
385 ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_EVENT_OFF, in mlxreg_hotplug_work_helper()
391 ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_MASK_OFF, in mlxreg_hotplug_work_helper()
392 item->mask); in mlxreg_hotplug_work_helper()
401 struct mlxreg_core_item *item) in mlxreg_hotplug_health_work_helper() argument
403 struct mlxreg_core_data *data = item->data; in mlxreg_hotplug_health_work_helper()
407 for (i = 0; i < item->count; i++, data++) { in mlxreg_hotplug_health_work_helper()
421 if (item->cache == regval) in mlxreg_hotplug_health_work_helper()
437 mlxreg_hotplug_device_create(priv, data, item->kind); in mlxreg_hotplug_health_work_helper()
447 mlxreg_hotplug_device_destroy(priv, data, item->kind); in mlxreg_hotplug_health_work_helper()
452 item->cache = regval; in mlxreg_hotplug_health_work_helper()
503 struct mlxreg_core_item *item; in mlxreg_hotplug_work_handler() local
511 item = pdata->items; in mlxreg_hotplug_work_handler()
541 for (i = 0; i < pdata->counter; i++, item++) { in mlxreg_hotplug_work_handler()
542 if (aggr_asserted & item->aggr_mask) { in mlxreg_hotplug_work_handler()
543 if (item->health) in mlxreg_hotplug_work_handler()
544 mlxreg_hotplug_health_work_helper(priv, item); in mlxreg_hotplug_work_handler()
546 mlxreg_hotplug_work_helper(priv, item); in mlxreg_hotplug_work_handler()
582 struct mlxreg_core_item *item; in mlxreg_hotplug_set_irq() local
588 item = pdata->items; in mlxreg_hotplug_set_irq()
590 for (i = 0; i < pdata->counter; i++, item++) { in mlxreg_hotplug_set_irq()
592 ret = regmap_write(priv->regmap, item->reg + in mlxreg_hotplug_set_irq()
601 data = item->data; in mlxreg_hotplug_set_irq()
602 for (j = 0; j < item->count; j++, data++) { in mlxreg_hotplug_set_irq()
612 item->mask &= ~BIT(j); in mlxreg_hotplug_set_irq()
617 if (item->inversed) { in mlxreg_hotplug_set_irq()
618 item->cache = item->mask; in mlxreg_hotplug_set_irq()
619 ret = regmap_write(priv->regmap, item->reg + in mlxreg_hotplug_set_irq()
621 item->mask); in mlxreg_hotplug_set_irq()
655 struct mlxreg_core_item *item; in mlxreg_hotplug_unset_irq() local
660 item = pdata->items; in mlxreg_hotplug_unset_irq()
674 for (i = 0; i < pdata->counter; i++, item++) { in mlxreg_hotplug_unset_irq()
675 data = item->data; in mlxreg_hotplug_unset_irq()
684 count = item->count; in mlxreg_hotplug_unset_irq()
686 mlxreg_hotplug_device_destroy(priv, data, item->kind); in mlxreg_hotplug_unset_irq()