pinctrl-meson.c (206c59d1d7d42bcafc1d7f1e476e87e4427e2345) | pinctrl-meson.c (323de9efdf3e75d1dfb48003a52e59d6d9d4c7a5) |
---|---|
1/* 2 * Pin controller and GPIO driver for Amlogic Meson SoCs 3 * 4 * Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * version 2 as published by the Free Software Foundation. --- 555 unchanged lines hidden (view full) --- 564 domain->chip.label = domain->data->name; 565 domain->chip.dev = pc->dev; 566 domain->chip.request = meson_gpio_request; 567 domain->chip.free = meson_gpio_free; 568 domain->chip.direction_input = meson_gpio_direction_input; 569 domain->chip.direction_output = meson_gpio_direction_output; 570 domain->chip.get = meson_gpio_get; 571 domain->chip.set = meson_gpio_set; | 1/* 2 * Pin controller and GPIO driver for Amlogic Meson SoCs 3 * 4 * Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * version 2 as published by the Free Software Foundation. --- 555 unchanged lines hidden (view full) --- 564 domain->chip.label = domain->data->name; 565 domain->chip.dev = pc->dev; 566 domain->chip.request = meson_gpio_request; 567 domain->chip.free = meson_gpio_free; 568 domain->chip.direction_input = meson_gpio_direction_input; 569 domain->chip.direction_output = meson_gpio_direction_output; 570 domain->chip.get = meson_gpio_get; 571 domain->chip.set = meson_gpio_set; |
572 domain->chip.base = domain->data->pin_base; | 572 domain->chip.base = -1; |
573 domain->chip.ngpio = domain->data->num_pins; 574 domain->chip.can_sleep = false; 575 domain->chip.of_node = domain->of_node; 576 domain->chip.of_gpio_n_cells = 2; 577 578 ret = gpiochip_add(&domain->chip); 579 if (ret) { 580 dev_err(pc->dev, "can't add gpio chip %s\n", --- 152 unchanged lines hidden (view full) --- 733 pc->desc.owner = THIS_MODULE; 734 pc->desc.pctlops = &meson_pctrl_ops; 735 pc->desc.pmxops = &meson_pmx_ops; 736 pc->desc.confops = &meson_pinconf_ops; 737 pc->desc.pins = pc->data->pins; 738 pc->desc.npins = pc->data->num_pins; 739 740 pc->pcdev = pinctrl_register(&pc->desc, pc->dev, pc); | 573 domain->chip.ngpio = domain->data->num_pins; 574 domain->chip.can_sleep = false; 575 domain->chip.of_node = domain->of_node; 576 domain->chip.of_gpio_n_cells = 2; 577 578 ret = gpiochip_add(&domain->chip); 579 if (ret) { 580 dev_err(pc->dev, "can't add gpio chip %s\n", --- 152 unchanged lines hidden (view full) --- 733 pc->desc.owner = THIS_MODULE; 734 pc->desc.pctlops = &meson_pctrl_ops; 735 pc->desc.pmxops = &meson_pmx_ops; 736 pc->desc.confops = &meson_pinconf_ops; 737 pc->desc.pins = pc->data->pins; 738 pc->desc.npins = pc->data->num_pins; 739 740 pc->pcdev = pinctrl_register(&pc->desc, pc->dev, pc); |
741 if (!pc->pcdev) { | 741 if (IS_ERR(pc->pcdev)) { |
742 dev_err(pc->dev, "can't register pinctrl device"); | 742 dev_err(pc->dev, "can't register pinctrl device"); |
743 return -EINVAL; | 743 return PTR_ERR(pc->pcdev); |
744 } 745 746 ret = meson_gpiolib_register(pc); 747 if (ret) { 748 pinctrl_unregister(pc->pcdev); 749 return ret; 750 } 751 --- 15 unchanged lines hidden --- | 744 } 745 746 ret = meson_gpiolib_register(pc); 747 if (ret) { 748 pinctrl_unregister(pc->pcdev); 749 return ret; 750 } 751 --- 15 unchanged lines hidden --- |