Searched refs:bit_per_gpio (Results 1 – 2 of 2) sorted by relevance
/openbmc/u-boot/drivers/gpio/ |
H A D | hsdk-creg-gpio.c | 26 u8 bit_per_gpio; member 32 u8 reg_shift = oft * hcg->bit_per_gpio + hcg->shift; in hsdk_creg_gpio_set_value() 35 reg &= ~(GENMASK(hcg->bit_per_gpio - 1, 0) << reg_shift); in hsdk_creg_gpio_set_value() 65 val >>= oft * hcg->bit_per_gpio + hcg->shift; in hsdk_creg_gpio_get_value() 66 val &= GENMASK(hcg->bit_per_gpio - 1, 0); in hsdk_creg_gpio_get_value() 81 u32 shift, bit_per_gpio, activate, deactivate, gpio_count; in hsdk_creg_gpio_probe() local 87 bit_per_gpio = dev_read_u32_default(dev, "gpio-bit-per-line", 1); in hsdk_creg_gpio_probe() 96 if (!bit_per_gpio) { in hsdk_creg_gpio_probe() 110 if ((gpio_count * bit_per_gpio + shift) > 32) { in hsdk_creg_gpio_probe() 112 uc_priv->bank_name, gpio_count * bit_per_gpio + shift); in hsdk_creg_gpio_probe() [all …]
|
/openbmc/linux/drivers/gpio/ |
H A D | gpio-creg-snps.c | 20 u8 bit_per_gpio[MAX_GPIO]; member 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() 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() 99 reg_len += hcg->layout->shift[i] + hcg->layout->bit_per_gpio[i]; in creg_gpio_validate() 114 .bit_per_gpio = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } 122 .bit_per_gpio = { 2 }
|