Lines Matching full:item

160 	struct mlxreg_core_item *item;  in mlxreg_hotplug_attr_show()  local
166 item = pdata->items + nr; in mlxreg_hotplug_attr_show()
167 data = item->data + index; in mlxreg_hotplug_attr_show()
173 if (item->health) { in mlxreg_hotplug_attr_show()
176 /* Bit = 0 : functional if item->inversed is true. */ in mlxreg_hotplug_attr_show()
177 if (item->inversed) in mlxreg_hotplug_attr_show()
192 struct mlxreg_core_item *item; in mlxreg_hotplug_attr_init() local
199 item = pdata->items; in mlxreg_hotplug_attr_init()
202 for (i = 0; i < pdata->counter; i++, item++) { in mlxreg_hotplug_attr_init()
203 if (item->capability) { in mlxreg_hotplug_attr_init()
209 ret = regmap_read(priv->regmap, item->capability, in mlxreg_hotplug_attr_init()
214 item->mask = GENMASK((regval & item->mask) - 1, 0); in mlxreg_hotplug_attr_init()
217 data = item->data; in mlxreg_hotplug_attr_init()
219 /* Go over all unmasked units within item. */ in mlxreg_hotplug_attr_init()
220 mask = item->mask; in mlxreg_hotplug_attr_init()
222 for_each_set_bit(j, &mask, item->count) { in mlxreg_hotplug_attr_init()
279 struct mlxreg_core_item *item) in mlxreg_hotplug_work_helper() argument
287 * Validate if item related to received signal type is valid. in mlxreg_hotplug_work_helper()
293 if (unlikely(!item)) { in mlxreg_hotplug_work_helper()
295 item->reg, item->mask); in mlxreg_hotplug_work_helper()
301 ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_MASK_OFF, in mlxreg_hotplug_work_helper()
307 ret = regmap_read(priv->regmap, item->reg, &regval); in mlxreg_hotplug_work_helper()
312 regval &= item->mask; in mlxreg_hotplug_work_helper()
313 asserted = item->cache ^ regval; in mlxreg_hotplug_work_helper()
314 item->cache = regval; in mlxreg_hotplug_work_helper()
317 data = item->data + bit; in mlxreg_hotplug_work_helper()
319 if (item->inversed) in mlxreg_hotplug_work_helper()
324 if (item->inversed) in mlxreg_hotplug_work_helper()
332 ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_EVENT_OFF, in mlxreg_hotplug_work_helper()
338 ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_MASK_OFF, in mlxreg_hotplug_work_helper()
339 item->mask); in mlxreg_hotplug_work_helper()
348 struct mlxreg_core_item *item) in mlxreg_hotplug_health_work_helper() argument
350 struct mlxreg_core_data *data = item->data; in mlxreg_hotplug_health_work_helper()
354 for (i = 0; i < item->count; i++, data++) { in mlxreg_hotplug_health_work_helper()
368 if (item->cache == regval) in mlxreg_hotplug_health_work_helper()
399 item->cache = regval; in mlxreg_hotplug_health_work_helper()
450 struct mlxreg_core_item *item; in mlxreg_hotplug_work_handler() local
458 item = pdata->items; in mlxreg_hotplug_work_handler()
488 for (i = 0; i < pdata->counter; i++, item++) { in mlxreg_hotplug_work_handler()
489 if (aggr_asserted & item->aggr_mask) { in mlxreg_hotplug_work_handler()
490 if (item->health) in mlxreg_hotplug_work_handler()
491 mlxreg_hotplug_health_work_helper(priv, item); in mlxreg_hotplug_work_handler()
493 mlxreg_hotplug_work_helper(priv, item); in mlxreg_hotplug_work_handler()
529 struct mlxreg_core_item *item; in mlxreg_hotplug_set_irq() local
535 item = pdata->items; in mlxreg_hotplug_set_irq()
537 for (i = 0; i < pdata->counter; i++, item++) { in mlxreg_hotplug_set_irq()
539 ret = regmap_write(priv->regmap, item->reg + in mlxreg_hotplug_set_irq()
548 data = item->data; in mlxreg_hotplug_set_irq()
549 for (j = 0; j < item->count; j++, data++) { in mlxreg_hotplug_set_irq()
559 item->mask &= ~BIT(j); in mlxreg_hotplug_set_irq()
564 if (item->inversed) { in mlxreg_hotplug_set_irq()
565 item->cache = item->mask; in mlxreg_hotplug_set_irq()
566 ret = regmap_write(priv->regmap, item->reg + in mlxreg_hotplug_set_irq()
568 item->mask); in mlxreg_hotplug_set_irq()
602 struct mlxreg_core_item *item; in mlxreg_hotplug_unset_irq() local
607 item = pdata->items; in mlxreg_hotplug_unset_irq()
621 for (i = 0; i < pdata->counter; i++, item++) { in mlxreg_hotplug_unset_irq()
622 data = item->data; in mlxreg_hotplug_unset_irq()
631 count = item->count; in mlxreg_hotplug_unset_irq()