/linux-4.1.27/drivers/gpio/ |
D | gpio-generic.c | 127 static unsigned long bgpio_pin2mask(struct bgpio_chip *bgc, unsigned int pin) in bgpio_pin2mask() argument 132 static unsigned long bgpio_pin2mask_be(struct bgpio_chip *bgc, in bgpio_pin2mask_be() argument 135 return 1 << (bgc->bits - 1 - pin); in bgpio_pin2mask_be() 140 struct bgpio_chip *bgc = to_bgpio_chip(gc); in bgpio_get() local 142 return !!(bgc->read_reg(bgc->reg_dat) & bgc->pin2mask(bgc, gpio)); in bgpio_get() 147 struct bgpio_chip *bgc = to_bgpio_chip(gc); in bgpio_set() local 148 unsigned long mask = bgc->pin2mask(bgc, gpio); in bgpio_set() 151 spin_lock_irqsave(&bgc->lock, flags); in bgpio_set() 154 bgc->data |= mask; in bgpio_set() 156 bgc->data &= ~mask; in bgpio_set() [all …]
|
D | gpio-moxart.c | 44 struct bgpio_chip *bgc = to_bgpio_chip(chip); in moxart_gpio_get() local 45 u32 ret = bgc->read_reg(bgc->reg_dir); in moxart_gpio_get() 48 return !!(bgc->read_reg(bgc->reg_set) & BIT(offset)); in moxart_gpio_get() 50 return !!(bgc->read_reg(bgc->reg_dat) & BIT(offset)); in moxart_gpio_get() 57 struct bgpio_chip *bgc; in moxart_gpio_probe() local 61 bgc = devm_kzalloc(dev, sizeof(*bgc), GFP_KERNEL); in moxart_gpio_probe() 62 if (!bgc) in moxart_gpio_probe() 70 ret = bgpio_init(bgc, dev, 4, base + GPIO_DATA_IN, in moxart_gpio_probe() 78 bgc->gc.label = "moxart-gpio"; in moxart_gpio_probe() 79 bgc->gc.request = moxart_gpio_request; in moxart_gpio_probe() [all …]
|
D | gpio-dwapb.c | 69 struct bgpio_chip bgc; member 87 to_dwapb_gpio_port(struct bgpio_chip *bgc) in to_dwapb_gpio_port() argument 89 return container_of(bgc, struct dwapb_gpio_port, bgc); in to_dwapb_gpio_port() 94 struct bgpio_chip *bgc = &gpio->ports[0].bgc; in dwapb_read() local 97 return bgc->read_reg(reg_base + offset); in dwapb_read() 103 struct bgpio_chip *bgc = &gpio->ports[0].bgc; in dwapb_write() local 106 bgc->write_reg(reg_base + offset, val); in dwapb_write() 111 struct bgpio_chip *bgc = to_bgpio_chip(gc); in dwapb_gpio_to_irq() local 112 struct dwapb_gpio_port *port = to_dwapb_gpio_port(bgc); in dwapb_gpio_to_irq() 122 if (gpio_get_value(gpio->ports[0].bgc.gc.base + offs)) in dwapb_toggle_trigger() [all …]
|
D | gpio-clps711x.c | 22 struct bgpio_chip *bgc; in clps711x_gpio_probe() local 29 bgc = devm_kzalloc(&pdev->dev, sizeof(*bgc), GFP_KERNEL); in clps711x_gpio_probe() 30 if (!bgc) in clps711x_gpio_probe() 46 err = bgpio_init(bgc, &pdev->dev, 1, dat, NULL, NULL, in clps711x_gpio_probe() 50 err = bgpio_init(bgc, &pdev->dev, 1, dat, NULL, NULL, in clps711x_gpio_probe() 61 bgc->gc.ngpio = 3; in clps711x_gpio_probe() 67 bgc->gc.base = id * 8; in clps711x_gpio_probe() 68 bgc->gc.owner = THIS_MODULE; in clps711x_gpio_probe() 69 platform_set_drvdata(pdev, bgc); in clps711x_gpio_probe() 71 return gpiochip_add(&bgc->gc); in clps711x_gpio_probe() [all …]
|
D | gpio-grgpio.c | 66 struct bgpio_chip bgc; member 97 struct bgpio_chip *bgc = to_bgpio_chip(gc); in grgpio_gc_to_priv() local 99 return container_of(bgc, struct grgpio_priv, bgc); in grgpio_gc_to_priv() 105 struct bgpio_chip *bgc = &priv->bgc; in grgpio_set_imask() local 106 unsigned long mask = bgc->pin2mask(bgc, offset); in grgpio_set_imask() 109 spin_lock_irqsave(&bgc->lock, flags); in grgpio_set_imask() 115 bgc->write_reg(priv->regs + GRGPIO_IMASK, priv->imask); in grgpio_set_imask() 117 spin_unlock_irqrestore(&bgc->lock, flags); in grgpio_set_imask() 166 spin_lock_irqsave(&priv->bgc.lock, flags); in grgpio_irq_set_type() 168 ipol = priv->bgc.read_reg(priv->regs + GRGPIO_IPOL) & ~mask; in grgpio_irq_set_type() [all …]
|
D | gpio-ge.c | 58 struct bgpio_chip *bgc; in gef_gpio_probe() local 62 bgc = devm_kzalloc(&pdev->dev, sizeof(*bgc), GFP_KERNEL); in gef_gpio_probe() 63 if (!bgc) in gef_gpio_probe() 70 ret = bgpio_init(bgc, &pdev->dev, 4, regs + GEF_GPIO_IN, in gef_gpio_probe() 79 bgc->gc.label = devm_kstrdup(&pdev->dev, pdev->dev.of_node->full_name, in gef_gpio_probe() 81 if (!bgc->gc.label) { in gef_gpio_probe() 86 bgc->gc.base = -1; in gef_gpio_probe() 87 bgc->gc.ngpio = (u16)(uintptr_t)of_id->data; in gef_gpio_probe() 88 bgc->gc.of_gpio_n_cells = 2; in gef_gpio_probe() 89 bgc->gc.of_node = pdev->dev.of_node; in gef_gpio_probe() [all …]
|
D | gpio-xgene-sb.c | 48 struct bgpio_chip bgc; member 55 struct bgpio_chip *bgc = to_bgpio_chip(gc); in to_xgene_gpio_sb() local 57 return container_of(bgc, struct xgene_gpio_sb, bgc); in to_xgene_gpio_sb() 60 static void xgene_gpio_set_bit(struct bgpio_chip *bgc, void __iomem *reg, u32 gpio, int val) in xgene_gpio_set_bit() argument 64 data = bgc->read_reg(reg); in xgene_gpio_set_bit() 69 bgc->write_reg(reg, data); in xgene_gpio_set_bit() 99 ret = bgpio_init(&priv->bgc, &pdev->dev, 4, in xgene_gpio_sb_probe() 106 priv->bgc.gc.to_irq = apm_gpio_sb_to_irq; in xgene_gpio_sb_probe() 107 priv->bgc.gc.ngpio = XGENE_MAX_GPIO_DS; in xgene_gpio_sb_probe() 119 xgene_gpio_set_bit(&priv->bgc, regs + MPA_GPIO_SEL_LO, in xgene_gpio_sb_probe() [all …]
|
D | gpio-74xx-mmio.c | 24 struct bgpio_chip bgc; member 83 struct bgpio_chip *bgc = to_bgpio_chip(gc); in to_74xx_gpio() local 85 return container_of(bgc, struct mmio_74xx_gpio_priv, bgc); in to_74xx_gpio() 134 err = bgpio_init(&priv->bgc, &pdev->dev, in mmio_74xx_gpio_probe() 140 priv->bgc.gc.direction_input = mmio_74xx_dir_in; in mmio_74xx_gpio_probe() 141 priv->bgc.gc.direction_output = mmio_74xx_dir_out; in mmio_74xx_gpio_probe() 142 priv->bgc.gc.get_direction = mmio_74xx_get_direction; in mmio_74xx_gpio_probe() 143 priv->bgc.gc.ngpio = MMIO_74XX_BIT_CNT(priv->flags); in mmio_74xx_gpio_probe() 144 priv->bgc.gc.owner = THIS_MODULE; in mmio_74xx_gpio_probe() 148 return gpiochip_add(&priv->bgc.gc); in mmio_74xx_gpio_probe() [all …]
|
D | gpio-mxs.c | 67 struct bgpio_chip bgc; member 96 val = gpio_get_value(port->bgc.gc.base + d->hwirq); in mxs_gpio_set_irq_type() 223 struct bgpio_chip *bgc = to_bgpio_chip(gc); in mxs_gpio_to_irq() local 225 container_of(bgc, struct mxs_gpio_port, bgc); in mxs_gpio_to_irq() 232 struct bgpio_chip *bgc = to_bgpio_chip(gc); in mxs_gpio_get_direction() local 234 container_of(bgc, struct mxs_gpio_port, bgc); in mxs_gpio_get_direction() 326 err = bgpio_init(&port->bgc, &pdev->dev, 4, in mxs_gpio_probe() 334 port->bgc.gc.to_irq = mxs_gpio_to_irq; in mxs_gpio_probe() 335 port->bgc.gc.get_direction = mxs_gpio_get_direction; in mxs_gpio_probe() 336 port->bgc.gc.base = port->id * 32; in mxs_gpio_probe() [all …]
|
D | gpio-ep93xx.c | 31 struct bgpio_chip bgc[8]; member 321 static int ep93xx_gpio_add_bank(struct bgpio_chip *bgc, struct device *dev, in ep93xx_gpio_add_bank() argument 328 err = bgpio_init(bgc, dev, 1, data, NULL, NULL, dir, NULL, 0); in ep93xx_gpio_add_bank() 332 bgc->gc.label = bank->label; in ep93xx_gpio_add_bank() 333 bgc->gc.base = bank->base; in ep93xx_gpio_add_bank() 336 bgc->gc.set_debounce = ep93xx_gpio_set_debounce; in ep93xx_gpio_add_bank() 337 bgc->gc.to_irq = ep93xx_gpio_to_irq; in ep93xx_gpio_add_bank() 340 return gpiochip_add(&bgc->gc); in ep93xx_gpio_add_bank() 360 struct bgpio_chip *bgc = &ep93xx_gpio->bgc[i]; in ep93xx_gpio_probe() local 363 if (ep93xx_gpio_add_bank(bgc, &pdev->dev, in ep93xx_gpio_probe()
|
D | gpio-mxc.c | 67 struct bgpio_chip bgc; member 175 u32 gpio = port->bgc.gc.base + gpio_idx; in gpio_set_irq_type() 396 struct bgpio_chip *bgc = to_bgpio_chip(gc); in mxc_gpio_to_irq() local 398 container_of(bgc, struct mxc_gpio_port, bgc); in mxc_gpio_to_irq() 450 err = bgpio_init(&port->bgc, &pdev->dev, 4, in mxc_gpio_probe() 457 port->bgc.gc.to_irq = mxc_gpio_to_irq; in mxc_gpio_probe() 458 port->bgc.gc.base = (pdev->id < 0) ? of_alias_get_id(np, "gpio") * 32 : in mxc_gpio_probe() 461 err = gpiochip_add(&port->bgc.gc); in mxc_gpio_probe() 488 gpiochip_remove(&port->bgc.gc); in mxc_gpio_probe() 490 bgpio_remove(&port->bgc); in mxc_gpio_probe()
|
/linux-4.1.27/drivers/irqchip/ |
D | irq-atmel-aic5.c | 91 struct irq_chip_generic *bgc = dgc->gc[0]; in aic5_mask() local 98 irq_gc_lock(bgc); in aic5_mask() 102 irq_gc_unlock(bgc); in aic5_mask() 109 struct irq_chip_generic *bgc = dgc->gc[0]; in aic5_unmask() local 116 irq_gc_lock(bgc); in aic5_unmask() 120 irq_gc_unlock(bgc); in aic5_unmask() 162 struct irq_chip_generic *bgc = dgc->gc[0]; in aic5_suspend() local 167 irq_gc_lock(bgc); in aic5_suspend() 173 irq_reg_writel(bgc, i + gc->irq_base, AT91_AIC5_SSR); in aic5_suspend() 175 irq_reg_writel(bgc, 1, AT91_AIC5_IECR); in aic5_suspend() [all …]
|
/linux-4.1.27/include/linux/ |
D | basic_mmio_gpio.h | 47 unsigned long (*pin2mask)(struct bgpio_chip *bgc, unsigned int pin); 67 int bgpio_remove(struct bgpio_chip *bgc); 68 int bgpio_init(struct bgpio_chip *bgc, struct device *dev,
|
/linux-4.1.27/drivers/video/fbdev/ |
D | imsttfb.c | 994 __u32 Bpp, line_pitch, bgc, dx, dy, width, height; in imsttfb_fillrect() local 996 bgc = rect->color; in imsttfb_fillrect() 997 bgc |= (bgc << 8); in imsttfb_fillrect() 998 bgc |= (bgc << 16); in imsttfb_fillrect() 1017 write_reg_le32(par->dc_regs, CLR, bgc); in imsttfb_fillrect()
|