Searched refs:hcg (Results 1 – 2 of 2) sorted by relevance
38 value = val ? hcg->layout->on[offset] : hcg->layout->off[offset]; in creg_gpio_set()45 reg = readl(hcg->regs); in creg_gpio_set()48 writel(reg, hcg->regs); in creg_gpio_set()87 if (hcg->layout->ngpio < 1 || hcg->layout->ngpio > MAX_GPIO) in creg_gpio_validate()99 reg_len += hcg->layout->shift[i] + hcg->layout->bit_per_gpio[i]; in creg_gpio_validate()139 struct creg_gpio *hcg; in creg_gpio_probe() local144 if (!hcg) in creg_gpio_probe()153 if (!hcg->layout) in creg_gpio_probe()166 hcg->gc.parent = dev; in creg_gpio_probe()168 hcg->gc.base = -1; in creg_gpio_probe()[all …]
32 u8 reg_shift = oft * hcg->bit_per_gpio + hcg->shift; in hsdk_creg_gpio_set_value()33 u32 reg = readl(hcg->regs); in hsdk_creg_gpio_set_value()36 reg |= ((val ? hcg->deactivate : hcg->activate) << reg_shift); in hsdk_creg_gpio_set_value()38 writel(reg, hcg->regs); in hsdk_creg_gpio_set_value()63 u32 val = readl(hcg->regs); in hsdk_creg_gpio_get_value()65 val >>= oft * hcg->bit_per_gpio + hcg->shift; in hsdk_creg_gpio_get_value()67 return (val == hcg->deactivate) ? 1 : 0; in hsdk_creg_gpio_get_value()138 hcg->shift = (u8)shift; in hsdk_creg_gpio_probe()139 hcg->bit_per_gpio = (u8)bit_per_gpio; in hsdk_creg_gpio_probe()140 hcg->activate = (u8)activate; in hsdk_creg_gpio_probe()[all …]