Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352308
b: refs/heads/master
c: 8f1ca26
h: refs/heads/master
v: v3
  • Loading branch information
Hauke Mehrtens authored and John W. Linville committed Jan 30, 2013
1 parent 68c15df commit 2d6a761
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6ca2e10f795111a90a4efabb07717258669e03d
refs/heads/master: 8f1ca2683225afa21b827ff620a6225c390771a9
11 changes: 11 additions & 0 deletions trunk/drivers/bcma/driver_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ static void bcma_gpio_free(struct gpio_chip *chip, unsigned gpio)
bcma_chipco_gpio_pullup(cc, 1 << gpio, 0);
}

static int bcma_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
{
struct bcma_drv_cc *cc = bcma_gpio_get_cc(chip);

if (cc->core->bus->hosttype == BCMA_HOSTTYPE_SOC)
return bcma_core_irq(cc->core);
else
return -EINVAL;
}

int bcma_gpio_init(struct bcma_drv_cc *cc)
{
struct gpio_chip *chip = &cc->gpio;
Expand All @@ -85,6 +95,7 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
chip->set = bcma_gpio_set_value;
chip->direction_input = bcma_gpio_direction_input;
chip->direction_output = bcma_gpio_direction_output;
chip->to_irq = bcma_gpio_to_irq;
chip->ngpio = 16;
/* There is just one SoC in one device and its GPIO addresses should be
* deterministic to address them more easily. The other buses could get
Expand Down
9 changes: 7 additions & 2 deletions trunk/include/linux/bcma/bcma_driver_mips.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,18 @@ struct bcma_drv_mips {
#ifdef CONFIG_BCMA_DRIVER_MIPS
extern void bcma_core_mips_init(struct bcma_drv_mips *mcore);
extern void bcma_core_mips_early_init(struct bcma_drv_mips *mcore);

extern unsigned int bcma_core_irq(struct bcma_device *core);
#else
static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore) { }
static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore) { }

static inline unsigned int bcma_core_irq(struct bcma_device *core)
{
return 0;
}
#endif

extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore);

extern unsigned int bcma_core_irq(struct bcma_device *core);

#endif /* LINUX_BCMA_DRIVER_MIPS_H_ */

0 comments on commit 2d6a761

Please sign in to comment.