Skip to content

Commit

Permalink
lirc-rpi: Also support pinctrl-bcm2835 in non-DT mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Elwell authored and popcornmix committed Jan 7, 2015
1 parent 411b3f0 commit b531b19
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions drivers/staging/media/lirc/lirc_rpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,21 @@ static int init_port(void)
int i, nlow, nhigh, ret, irq;
struct device_node *node;

node = lirc_rpi_dev->dev.of_node;

gpiochip = gpiochip_find("bcm2708_gpio", is_right_chip);

if (!gpiochip)
return -ENODEV;
/*
* Because of the lack of a setpull function, only support
* pinctrl-bcm2835 if using device tree.
*/
if (!gpiochip && node)
gpiochip = gpiochip_find("pinctrl-bcm2835", is_right_chip);

node = lirc_rpi_dev->dev.of_node;
if (!gpiochip) {
pr_err(LIRC_DRIVER_NAME ": gpio chip not found!\n");
return -ENODEV;
}

if (node) {
struct device_node *pins_node;
Expand Down

0 comments on commit b531b19

Please sign in to comment.