Lines Matching +full:bcm63xx +full:- +full:gpio
1 // SPDX-License-Identifier: GPL-2.0+
5 * Derived from linux/arch/mips/bcm63xx/gpio.c:
7 * Copyright (C) 2008-2011 Florian Fainelli <florian@openwrt.org>
13 #include <asm/gpio.h>
25 return !!(readl_be(priv->reg_data) & BIT(offset)); in bcm6345_gpio_get_value()
34 setbits_be32(priv->reg_data, BIT(offset)); in bcm6345_gpio_set_value()
36 clrbits_be32(priv->reg_data, BIT(offset)); in bcm6345_gpio_set_value()
56 return bcm6345_gpio_set_direction(priv->reg_dirout, offset, 1); in bcm6345_gpio_direction_input()
66 return bcm6345_gpio_set_direction(priv->reg_dirout, offset, 0); in bcm6345_gpio_direction_output()
73 if (readl_be(priv->reg_dirout) & BIT(offset)) in bcm6345_gpio_get_function()
92 priv->reg_dirout = dev_remap_addr_index(dev, 0); in bcm6345_gpio_probe()
93 if (!priv->reg_dirout) in bcm6345_gpio_probe()
94 return -EINVAL; in bcm6345_gpio_probe()
96 priv->reg_data = dev_remap_addr_index(dev, 1); in bcm6345_gpio_probe()
97 if (!priv->reg_data) in bcm6345_gpio_probe()
98 return -EINVAL; in bcm6345_gpio_probe()
100 uc_priv->gpio_count = dev_read_u32_default(dev, "ngpios", 32); in bcm6345_gpio_probe()
101 uc_priv->bank_name = dev->name; in bcm6345_gpio_probe()
107 { .compatible = "brcm,bcm6345-gpio" },
112 .name = "bcm6345-gpio",