Lines Matching full:layout
27 const struct creg_layout *layout; member
33 const struct creg_layout *layout = hcg->layout; in creg_gpio_set() local
38 value = val ? hcg->layout->on[offset] : hcg->layout->off[offset]; in creg_gpio_set()
40 reg_shift = layout->shift[offset]; in creg_gpio_set()
42 reg_shift += layout->bit_per_gpio[i] + layout->shift[i]; in creg_gpio_set()
46 reg &= ~(GENMASK(layout->bit_per_gpio[i] - 1, 0) << reg_shift); in creg_gpio_set()
62 const struct creg_layout *layout = hcg->layout; in creg_gpio_validate_pg() local
64 if (layout->bit_per_gpio[i] < 1 || layout->bit_per_gpio[i] > 8) in creg_gpio_validate_pg()
68 if (GENMASK(31, layout->bit_per_gpio[i]) & layout->on[i]) in creg_gpio_validate_pg()
72 if (GENMASK(31, layout->bit_per_gpio[i]) & layout->off[i]) in creg_gpio_validate_pg()
75 if (layout->on[i] == layout->off[i]) in creg_gpio_validate_pg()
87 if (hcg->layout->ngpio < 1 || hcg->layout->ngpio > MAX_GPIO) in creg_gpio_validate()
90 if (ngpios < 1 || ngpios > hcg->layout->ngpio) { in creg_gpio_validate()
91 dev_err(dev, "ngpios must be in [1:%u]\n", hcg->layout->ngpio); in creg_gpio_validate()
95 for (i = 0; i < hcg->layout->ngpio; i++) { in creg_gpio_validate()
99 reg_len += hcg->layout->shift[i] + hcg->layout->bit_per_gpio[i]; in creg_gpio_validate()
152 hcg->layout = match->data; in creg_gpio_probe()
153 if (!hcg->layout) in creg_gpio_probe()