Lines Matching refs:val_bytes

791 	map->format.val_bytes = DIV_ROUND_UP(config->val_bits, 8);
1636 for (i = 0; i < val_len / map->format.val_bytes; i++) {
1647 int val_bytes = map->format.val_bytes;
1650 i = noinc ? val_len - val_bytes : 0;
1651 for (; i < val_len; i += val_bytes) {
1653 offset = noinc ? 0 : regmap_get_offset(map, i / val_bytes);
1670 int val_num = val_len / map->format.val_bytes;
1677 win_residue, val_len / map->format.val_bytes);
1680 map->format.val_bytes, noinc);
1686 val += win_residue * map->format.val_bytes;
1687 val_len -= win_residue * map->format.val_bytes;
1708 if (val != work_val && val_len == map->format.val_bytes) {
1709 memcpy(work_val, val, map->format.val_bytes);
1743 map->format.reg_bytes + map->format.val_bytes);
1774 trace_regmap_hw_write_start(map, reg, val_len / map->format.val_bytes);
1814 trace_regmap_hw_write_done(map, reg, val_len / map->format.val_bytes);
1902 map->format.val_bytes,
1999 size_t val_bytes = map->format.val_bytes;
2000 size_t val_count = val_len / val_bytes;
2011 chunk_regs = map->max_raw_write / val_bytes;
2014 chunk_bytes = chunk_regs * val_bytes;
2057 if (val_len % map->format.val_bytes)
2101 if (val_len % map->format.val_bytes)
2211 size_t val_bytes = map->format.val_bytes;
2225 switch (val_bytes) {
2227 ival = *(u8 *)(val + (i * val_bytes));
2230 ival = *(u16 *)(val + (i * val_bytes));
2233 ival = *(u32 *)(val + (i * val_bytes));
2237 ival = *(u64 *)(val + (i * val_bytes));
2256 wval = kmemdup(val, val_count * val_bytes, map->alloc_flags);
2260 for (i = 0; i < val_count * val_bytes; i += val_bytes)
2263 ret = regmap_raw_write(map, reg, wval, val_bytes * val_count);
2286 size_t val_bytes = map->format.val_bytes;
2289 size_t pair_size = reg_bytes + pad_bytes + val_bytes;
2310 u8 += val_bytes;
2596 if (val_len % map->format.val_bytes)
2629 noinc ? 1 : val_len / map->format.val_bytes);
2637 trace_regmap_hw_read_start(map, reg, val_len / map->format.val_bytes);
2643 trace_regmap_hw_read_done(map, reg, val_len / map->format.val_bytes);
2667 ret = _regmap_raw_read(map, reg, work_val, map->format.val_bytes, false);
2747 size_t val_bytes = map->format.val_bytes;
2748 size_t val_count = val_len / val_bytes;
2754 if (val_len % map->format.val_bytes)
2776 chunk_regs = map->max_raw_read / val_bytes;
2779 chunk_bytes = chunk_regs * val_bytes;
2808 map->format.format_val(val + (i * val_bytes), v, 0);
2850 if (val_len % map->format.val_bytes)
2955 size_t val_bytes = map->format.val_bytes;
2964 ret = regmap_raw_read(map, reg, val, val_bytes * val_count);
2968 for (i = 0; i < val_count * val_bytes; i += val_bytes)
2988 switch (map->format.val_bytes) {
3251 return map->format.val_bytes;