tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git devel head: 3259f0fcbe56de2aef72948e47c8512debed8fe4 commit: 12e7347d00f5a896b77e670a66aec02da811433e [65/67] gpio: Break out code to get a descriptor from a DT node config: i386-randconfig-x019-201801 (attached as .config) compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 reproduce: git checkout 12e7347d00f5a896b77e670a66aec02da811433e # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): drivers//gpio/gpiolib.c: In function 'fwnode_get_named_gpiod': >> drivers//gpio/gpiolib.c:3786:47: error: incompatible type for argument 2 of 'acpi_gpio_update_gpiod_flags' ret = acpi_gpio_update_gpiod_flags(&dflags, info.flags); ^~~~ In file included from drivers//gpio/gpiolib.c:31:0: drivers//gpio/gpiolib.h:130:5: note: expected 'struct acpi_gpio_info *' but argument is of type 'enum gpiod_flags' int acpi_gpio_update_gpiod_flags(enum gpiod_flags *flags, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/acpi_gpio_update_gpiod_flags +3786 drivers//gpio/gpiolib.c 3739 3740 /** 3741 * fwnode_get_named_gpiod - obtain a GPIO from firmware node 3742 * @fwnode: handle of the firmware node 3743 * @propname: name of the firmware property representing the GPIO 3744 * @index: index of the GPIO to obtain for the consumer 3745 * @dflags: GPIO initialization flags 3746 * @label: label to attach to the requested GPIO 3747 * 3748 * This function can be used for drivers that get their configuration 3749 * from opaque firmware. 3750 * 3751 * The function properly finds the corresponding GPIO using whatever is the 3752 * underlying firmware interface and then makes sure that the GPIO 3753 * descriptor is requested before it is returned to the caller. 3754 * 3755 * Returns: 3756 * On successful request the GPIO pin is configured in accordance with 3757 * provided @dflags. 3758 * 3759 * In case of error an ERR_PTR() is returned. 3760 */ 3761 struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode, 3762 const char *propname, int index, 3763 enum gpiod_flags dflags, 3764 const char *label) 3765 { 3766 struct gpio_desc *desc = ERR_PTR(-ENODEV); 3767 unsigned long lflags = 0; 3768 int ret; 3769 3770 if (!fwnode) 3771 return ERR_PTR(-EINVAL); 3772 3773 if (is_of_node(fwnode)) { 3774 desc = gpiod_get_from_of_node(to_of_node(fwnode), 3775 propname, index, 3776 dflags, 3777 label); 3778 return desc; 3779 } else if (is_acpi_node(fwnode)) { 3780 struct acpi_gpio_info info; 3781 3782 desc = acpi_node_get_gpiod(fwnode, propname, index, &info); 3783 if (IS_ERR(desc)) 3784 return desc; 3785 > 3786 ret = acpi_gpio_update_gpiod_flags(&dflags, info.flags); 3787 3788 if (info.polarity == GPIO_ACTIVE_LOW) 3789 lflags |= GPIO_ACTIVE_LOW; 3790 } 3791 3792 /* Currently only ACPI takes this path */ 3793 ret = gpiod_request(desc, label); 3794 if (ret) 3795 return ERR_PTR(ret); 3796 3797 ret = gpiod_configure_flags(desc, propname, lflags, dflags); 3798 if (ret < 0) { 3799 gpiod_put(desc); 3800 return ERR_PTR(ret); 3801 } 3802 3803 return desc; 3804 } 3805 EXPORT_SYMBOL_GPL(fwnode_get_named_gpiod); 3806 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip