Lines Matching refs:reg_field

1523 	struct iqs7211_reg_field_desc *reg_field;  in iqs7211_init_device()  local
1555 list_for_each_entry(reg_field, &iqs7211->reg_field_head, list) { in iqs7211_init_device()
1556 u16 new_val = reg_field->val; in iqs7211_init_device()
1558 if (reg_field->mask < U16_MAX) { in iqs7211_init_device()
1561 error = iqs7211_read_word(iqs7211, reg_field->addr, in iqs7211_init_device()
1566 new_val = old_val & ~reg_field->mask; in iqs7211_init_device()
1567 new_val |= reg_field->val; in iqs7211_init_device()
1573 error = iqs7211_write_word(iqs7211, reg_field->addr, new_val); in iqs7211_init_device()
1611 struct iqs7211_reg_field_desc *reg_field; in iqs7211_add_field() local
1616 list_for_each_entry(reg_field, &iqs7211->reg_field_head, list) { in iqs7211_add_field()
1617 if (reg_field->addr != new_field.addr) in iqs7211_add_field()
1620 reg_field->mask |= new_field.mask; in iqs7211_add_field()
1621 reg_field->val |= new_field.val; in iqs7211_add_field()
1625 reg_field = devm_kzalloc(&client->dev, sizeof(*reg_field), GFP_KERNEL); in iqs7211_add_field()
1626 if (!reg_field) in iqs7211_add_field()
1629 reg_field->addr = new_field.addr; in iqs7211_add_field()
1630 reg_field->mask = new_field.mask; in iqs7211_add_field()
1631 reg_field->val = new_field.val; in iqs7211_add_field()
1633 list_add(&reg_field->list, &iqs7211->reg_field_head); in iqs7211_add_field()
1657 struct iqs7211_reg_field_desc reg_field; in iqs7211_parse_props() local
1684 reg_field.addr = reg_addr; in iqs7211_parse_props()
1685 reg_field.mask = GENMASK(reg_shift + reg_width - 1, reg_shift); in iqs7211_parse_props()
1686 reg_field.val = val / val_pitch << reg_shift; in iqs7211_parse_props()
1688 error = iqs7211_add_field(iqs7211, reg_field); in iqs7211_parse_props()
1704 struct iqs7211_reg_field_desc reg_field; in iqs7211_parse_event() local
1724 reg_field.addr = dev_desc->gesture_angle; in iqs7211_parse_event()
1725 reg_field.mask = U8_MAX; in iqs7211_parse_event()
1726 reg_field.val = iqs7211_gesture_angle[val]; in iqs7211_parse_event()
1728 error = iqs7211_add_field(iqs7211, reg_field); in iqs7211_parse_event()
1946 struct iqs7211_reg_field_desc reg_field; in iqs7211_parse_alp() local
1968 reg_field.addr = dev_desc->alp_config; in iqs7211_parse_alp()
1969 reg_field.mask = GENMASK(IQS7211_NUM_CRX - 1, 0); in iqs7211_parse_alp()
1970 reg_field.val = 0; in iqs7211_parse_alp()
1980 reg_field.val |= BIT(pins[i]); in iqs7211_parse_alp()
1983 error = iqs7211_add_field(iqs7211, reg_field); in iqs7211_parse_alp()
2007 reg_field.addr = dev_desc->alp_config + 1; in iqs7211_parse_alp()
2008 reg_field.mask = GENMASK(dev_desc->num_ctx - 1, 0); in iqs7211_parse_alp()
2009 reg_field.val = 0; in iqs7211_parse_alp()
2018 reg_field.val |= BIT(pins[i]); in iqs7211_parse_alp()
2021 error = iqs7211_add_field(iqs7211, reg_field); in iqs7211_parse_alp()
2041 struct iqs7211_reg_field_desc reg_field; in iqs7211_parse_reg_grp() local
2057 reg_field.addr = dev_desc->kp_enable[reg_grp]; in iqs7211_parse_reg_grp()
2058 reg_field.mask = 0; in iqs7211_parse_reg_grp()
2059 reg_field.val = 0; in iqs7211_parse_reg_grp()
2068 reg_field.mask |= dev_desc->kp_events[i].enable; in iqs7211_parse_reg_grp()
2087 reg_field.val |= dev_desc->kp_events[i].enable; in iqs7211_parse_reg_grp()
2092 return iqs7211_add_field(iqs7211, reg_field); in iqs7211_parse_reg_grp()