diff mbox series

[17/18] gpio: gpiolib-acpi: Export acpi_get_gpiod()

Message ID 20201130133129.1024662-18-djrscally@gmail.com
State New
Headers show
Series None | expand

Commit Message

Daniel Scally Nov. 30, 2020, 1:31 p.m. UTC
I need to be able to translate GPIO resources in an acpi_device's _CRS
into gpio_descs. Those are represented in _CRS as a pathname to a GPIO
device plus the pin's index number: this function is perfect for that
purpose.

Signed-off-by: Daniel Scally <djrscally@gmail.com>
---
Changes since RFC v3:

	- Patch introduced

 drivers/gpio/gpiolib-acpi.c | 3 ++-
 include/linux/acpi.h        | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)

Comments

kernel test robot Nov. 30, 2020, 6:04 p.m. UTC | #1
Hi Daniel,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on driver-core/driver-core-testing pm/linux-next v5.10-rc6 next-20201130]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Daniel-Scally/Add-functionality-to-ipu3-cio2-driver-allowing-software_node-connections-to-sensors-on-platforms-designed-for-Windows/20201130-214014
base:   git://linuxtv.org/media_tree.git master
config: ia64-defconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/eb1854ac694a8e59c0ea703e46fe2ee7e3118b42
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Daniel-Scally/Add-functionality-to-ipu3-cio2-driver-allowing-software_node-connections-to-sensors-on-platforms-designed-for-Windows/20201130-214014
        git checkout eb1854ac694a8e59c0ea703e46fe2ee7e3118b42
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ia64-linux-ld: drivers/usb/core/hub.o: in function `acpi_get_gpiod':
>> (.text+0x3060): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/hcd.o: in function `acpi_get_gpiod':
   (.text+0x7480): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/message.o: in function `acpi_get_gpiod':
   (.text+0x3f20): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/driver.o: in function `acpi_get_gpiod':
   (.text+0x1c00): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/config.o: in function `acpi_get_gpiod':
   config.c:(.text+0x3420): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/file.o: in function `acpi_get_gpiod':
   (.text+0xe00): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/sysfs.o: in function `acpi_get_gpiod':
   sysfs.c:(.text+0x28c0): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/endpoint.o: in function `acpi_get_gpiod':
   endpoint.c:(.text+0x7a0): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/devio.o: in function `acpi_get_gpiod':
   devio.c:(.text+0xcae0): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/notify.o: in function `acpi_get_gpiod':
   (.text+0xc0): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/generic.o: in function `acpi_get_gpiod':
   (.text+0xa60): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/quirks.o: in function `acpi_get_gpiod':
   quirks.c:(.text+0xac0): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/devices.o: in function `acpi_get_gpiod':
   devices.c:(.text+0x1ca0): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/port.o: in function `acpi_get_gpiod':
   port.c:(.text+0xcc0): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/hcd-pci.o: in function `acpi_get_gpiod':
   (.text+0x1240): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
   ia64-linux-ld: drivers/usb/core/usb-acpi.o: in function `acpi_get_gpiod':
   (.text+0x900): multiple definition of `acpi_get_gpiod'; drivers/usb/core/usb.o:(.text+0x2020): first defined here
--
   ia64-linux-ld: drivers/video/fbdev/core/fbmon.o: in function `acpi_get_gpiod':
>> (.text+0x4a0): multiple definition of `acpi_get_gpiod'; drivers/video/fbdev/core/fbmem.o:(.text+0x4b20): first defined here
   ia64-linux-ld: drivers/video/fbdev/core/fbcmap.o: in function `acpi_get_gpiod':
   (.text+0x960): multiple definition of `acpi_get_gpiod'; drivers/video/fbdev/core/fbmem.o:(.text+0x4b20): first defined here
   ia64-linux-ld: drivers/video/fbdev/core/fbsysfs.o: in function `acpi_get_gpiod':
   (.text+0x1400): multiple definition of `acpi_get_gpiod'; drivers/video/fbdev/core/fbmem.o:(.text+0x4b20): first defined here
   ia64-linux-ld: drivers/video/fbdev/core/modedb.o: in function `acpi_get_gpiod':
   (.text+0x22e0): multiple definition of `acpi_get_gpiod'; drivers/video/fbdev/core/fbmem.o:(.text+0x4b20): first defined here
   ia64-linux-ld: drivers/video/fbdev/core/fbcvt.o: in function `acpi_get_gpiod':
   fbcvt.c:(.text+0x0): multiple definition of `acpi_get_gpiod'; drivers/video/fbdev/core/fbmem.o:(.text+0x4b20): first defined here
   ia64-linux-ld: drivers/video/fbdev/core/fb_defio.o: in function `acpi_get_gpiod':
   (.text+0xf40): multiple definition of `acpi_get_gpiod'; drivers/video/fbdev/core/fbmem.o:(.text+0x4b20): first defined here
   ia64-linux-ld: drivers/video/fbdev/core/fbcon.o: in function `acpi_get_gpiod':
   (.text+0xcfa0): multiple definition of `acpi_get_gpiod'; drivers/video/fbdev/core/fbmem.o:(.text+0x4b20): first defined here
   ia64-linux-ld: drivers/video/fbdev/core/bitblit.o: in function `acpi_get_gpiod':
   (.text+0x29a0): multiple definition of `acpi_get_gpiod'; drivers/video/fbdev/core/fbmem.o:(.text+0x4b20): first defined here
   ia64-linux-ld: drivers/video/fbdev/core/softcursor.o: in function `acpi_get_gpiod':
   (.text+0x800): multiple definition of `acpi_get_gpiod'; drivers/video/fbdev/core/fbmem.o:(.text+0x4b20): first defined here
--
   ia64-linux-ld: drivers/acpi/processor_idle.o: in function `acpi_get_gpiod':
>> processor_idle.c:(.text+0x3000): multiple definition of `acpi_get_gpiod'; drivers/acpi/processor_driver.o:processor_driver.c:(.text+0xd20): first defined here
   ia64-linux-ld: drivers/acpi/processor_throttling.o: in function `acpi_get_gpiod':
   processor_throttling.c:(.text+0x27e0): multiple definition of `acpi_get_gpiod'; drivers/acpi/processor_driver.o:processor_driver.c:(.text+0xd20): first defined here
   ia64-linux-ld: drivers/acpi/processor_thermal.o: in function `acpi_get_gpiod':
   processor_thermal.c:(.text+0x2c0): multiple definition of `acpi_get_gpiod'; drivers/acpi/processor_driver.o:processor_driver.c:(.text+0xd20): first defined here
--
   ia64-linux-ld: drivers/gpu/drm/drm_crtc_helper.o: in function `acpi_get_gpiod':
>> (.text+0x22e0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_dp_helper.o: in function `acpi_get_gpiod':
   (.text+0x5460): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_dsc.o: in function `acpi_get_gpiod':
   (.text+0x1220): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_probe_helper.o: in function `acpi_get_gpiod':
   (.text+0x1340): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_plane_helper.o: in function `acpi_get_gpiod':
   (.text+0x920): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_dp_mst_topology.o: in function `acpi_get_gpiod':
   (.text+0xaa60): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_atomic_helper.o: in function `acpi_get_gpiod':
   (.text+0xed00): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_kms_helper_common.o: in function `acpi_get_gpiod':
   drm_kms_helper_common.c:(.text+0x0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_dp_dual_mode_helper.o: in function `acpi_get_gpiod':
   (.text+0x1280): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_simple_kms_helper.o: in function `acpi_get_gpiod':
   (.text+0xb60): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_modeset_helper.o: in function `acpi_get_gpiod':
   (.text+0x8a0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_scdc_helper.o: in function `acpi_get_gpiod':
   (.text+0x620): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_gem_framebuffer_helper.o: in function `acpi_get_gpiod':
   (.text+0x11c0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_atomic_state_helper.o: in function `acpi_get_gpiod':
   (.text+0x1b80): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_damage_helper.o: in function `acpi_get_gpiod':
   (.text+0x1380): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_self_refresh_helper.o: in function `acpi_get_gpiod':
   (.text+0xc00): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/bridge/panel.o: in function `acpi_get_gpiod':
   (.text+0xa20): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `acpi_get_gpiod':
   (.text+0x7d80): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_bridge_connector.o:(.text+0xb80): first defined here
--
   ia64-linux-ld: drivers/gpu/drm/drm_ioctl.o: in function `acpi_get_gpiod':
>> (.text+0x2540): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_drv.o: in function `acpi_get_gpiod':
   (.text+0x2940): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_sysfs.o: in function `acpi_get_gpiod':
   (.text+0xe40): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_crtc.o: in function `acpi_get_gpiod':
   (.text+0x1340): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_modes.o: in function `acpi_get_gpiod':
   (.text+0x4f60): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_edid.o: in function `acpi_get_gpiod':
   (.text+0xa7a0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_encoder_slave.o: in function `acpi_get_gpiod':
   (.text+0x760): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_modeset_lock.o: in function `acpi_get_gpiod':
   (.text+0x1a40): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_atomic.o: in function `acpi_get_gpiod':
   (.text+0x63c0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_bridge.o: in function `acpi_get_gpiod':
   (.text+0x2940): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_framebuffer.o: in function `acpi_get_gpiod':
   (.text+0x1260): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_connector.o: in function `acpi_get_gpiod':
   (.text+0x48a0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_blend.o: in function `acpi_get_gpiod':
   (.text+0x1100): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_encoder.o: in function `acpi_get_gpiod':
   (.text+0x520): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_mode_object.o: in function `acpi_get_gpiod':
   (.text+0xb20): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_property.o: in function `acpi_get_gpiod':
   (.text+0x17a0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_plane.o: in function `acpi_get_gpiod':
   (.text+0x1680): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_color_mgmt.o: in function `acpi_get_gpiod':
   (.text+0xb00): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_mode_config.o: in function `acpi_get_gpiod':
   (.text+0x1760): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_vblank.o: in function `acpi_get_gpiod':
   (.text+0x40c0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_lease.o: in function `acpi_get_gpiod':
   drm_lease.c:(.text+0x9a0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_writeback.o: in function `acpi_get_gpiod':
   (.text+0xec0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_client.o: in function `acpi_get_gpiod':
   (.text+0x1200): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_client_modeset.o: in function `acpi_get_gpiod':
   (.text+0x52a0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_atomic_uapi.o: in function `acpi_get_gpiod':
   (.text+0x1120): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_vblank_work.o: in function `acpi_get_gpiod':
   (.text+0xb20): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
   ia64-linux-ld: drivers/gpu/drm/drm_panel.o: in function `acpi_get_gpiod':
   (.text+0xa40): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/drm_file.o:(.text+0x19c0): first defined here
--
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_device.o: in function `acpi_get_gpiod':
>> radeon_device.c:(.text+0xe00): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_asic.o: in function `acpi_get_gpiod':
   radeon_asic.c:(.text+0x140): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_kms.o: in function `acpi_get_gpiod':
   radeon_kms.c:(.text+0x1d80): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_atombios.o: in function `acpi_get_gpiod':
   radeon_atombios.c:(.text+0x19c0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_agp.o: in function `acpi_get_gpiod':
   radeon_agp.c:(.text+0x0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/atombios_crtc.o: in function `acpi_get_gpiod':
   atombios_crtc.c:(.text+0xb200): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_combios.o: in function `acpi_get_gpiod':
   radeon_combios.c:(.text+0x2320): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/atom.o: in function `acpi_get_gpiod':
   atom.c:(.text+0xb440): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_fence.o: in function `acpi_get_gpiod':
   radeon_fence.c:(.text+0x1740): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_ttm.o: in function `acpi_get_gpiod':
   radeon_ttm.c:(.text+0x2d20): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_object.o: in function `acpi_get_gpiod':
   radeon_object.c:(.text+0x5a0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_gart.o: in function `acpi_get_gpiod':
   radeon_gart.c:(.text+0x0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_legacy_crtc.o: in function `acpi_get_gpiod':
   radeon_legacy_crtc.c:(.text+0x3440): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_legacy_encoders.o: in function `acpi_get_gpiod':
   radeon_legacy_encoders.c:(.text+0x7760): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_connectors.o: in function `acpi_get_gpiod':
   radeon_connectors.c:(.text+0x6380): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_encoders.o: in function `acpi_get_gpiod':
   radeon_encoders.c:(.text+0x0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_display.o: in function `acpi_get_gpiod':
   radeon_display.c:(.text+0x4580): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_cursor.o: in function `acpi_get_gpiod':
   radeon_cursor.c:(.text+0x1a80): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_i2c.o: in function `acpi_get_gpiod':
   radeon_i2c.c:(.text+0x6060): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_clocks.o: in function `acpi_get_gpiod':
   radeon_clocks.c:(.text+0x0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_fb.o: in function `acpi_get_gpiod':
   radeon_fb.c:(.text+0x360): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_gem.o: in function `acpi_get_gpiod':
   radeon_gem.c:(.text+0x60): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_ring.o: in function `acpi_get_gpiod':
   radeon_ring.c:(.text+0x0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_irq_kms.o: in function `acpi_get_gpiod':
   radeon_irq_kms.c:(.text+0x1e0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_cs.o: in function `acpi_get_gpiod':
   radeon_cs.c:(.text+0x2080): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_bios.o: in function `acpi_get_gpiod':
   radeon_bios.c:(.text+0x420): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_benchmark.o: in function `acpi_get_gpiod':
   radeon_benchmark.c:(.text+0xf80): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/r100.o: in function `acpi_get_gpiod':
   r100.c:(.text+0x1640): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/r300.o: in function `acpi_get_gpiod':
   r300.c:(.text+0x2b00): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/r420.o: in function `acpi_get_gpiod':
   r420.c:(.text+0x1e0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/rs400.o: in function `acpi_get_gpiod':
   rs400.c:(.text+0x0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/rs600.o: in function `acpi_get_gpiod':
   rs600.c:(.text+0x320): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/rs690.o: in function `acpi_get_gpiod':
   rs690.c:(.text+0x1400): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/rv515.o: in function `acpi_get_gpiod':
   rv515.c:(.text+0x1180): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/r520.o: in function `acpi_get_gpiod':
   r520.c:(.text+0x0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/r600.o: in function `acpi_get_gpiod':
   r600.c:(.text+0x26a0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/rv770.o: in function `acpi_get_gpiod':
   rv770.c:(.text+0x3500): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_test.o: in function `acpi_get_gpiod':
   radeon_test.c:(.text+0x1a20): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/r200.o: in function `acpi_get_gpiod':
   r200.c:(.text+0x0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_legacy_tv.o: in function `acpi_get_gpiod':
   radeon_legacy_tv.c:(.text+0x600): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/r600_cs.o: in function `acpi_get_gpiod':
   r600_cs.c:(.text+0x4bc0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_pm.o: in function `acpi_get_gpiod':
   radeon_pm.c:(.text+0x4660): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/atombios_dp.o: in function `acpi_get_gpiod':
   atombios_dp.c:(.text+0x13a0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/r600_hdmi.o: in function `acpi_get_gpiod':
   r600_hdmi.c:(.text+0x4a0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/dce3_1_afmt.o: in function `acpi_get_gpiod':
   dce3_1_afmt.c:(.text+0x0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/evergreen.o: in function `acpi_get_gpiod':
   evergreen.c:(.text+0x99a0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/evergreen_cs.o: in function `acpi_get_gpiod':
   evergreen_cs.c:(.text+0xe240): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/evergreen_hdmi.o: in function `acpi_get_gpiod':
   evergreen_hdmi.c:(.text+0x0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/radeon_trace_points.o: in function `acpi_get_gpiod':
   radeon_trace_points.c:(.text+0x0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/ni.o: in function `acpi_get_gpiod':
   ni.c:(.text+0x85c0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here
   ia64-linux-ld: drivers/gpu/drm/radeon/atombios_encoders.o: in function `acpi_get_gpiod':
   atombios_encoders.c:(.text+0x18e0): multiple definition of `acpi_get_gpiod'; drivers/gpu/drm/radeon/radeon_drv.o:radeon_drv.c:(.text+0xb80): first defined here

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Andy Shevchenko Nov. 30, 2020, 7:20 p.m. UTC | #2
On Mon, Nov 30, 2020 at 01:31:28PM +0000, Daniel Scally wrote:
> I need to be able to translate GPIO resources in an acpi_device's _CRS
> into gpio_descs. Those are represented in _CRS as a pathname to a GPIO
> device plus the pin's index number: this function is perfect for that
> purpose.

Destiny of this patch depends on the review of the next one.
diff mbox series

Patch

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index 834a12f3219e..cfadbc263475 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -111,7 +111,7 @@  static int acpi_gpiochip_find(struct gpio_chip *gc, void *data)
  * controller does not have GPIO chip registered at the moment. This is to
  * support probe deferral.
  */
-static struct gpio_desc *acpi_get_gpiod(char *path, int pin)
+struct gpio_desc *acpi_get_gpiod(char *path, int pin)
 {
 	struct gpio_chip *chip;
 	acpi_handle handle;
@@ -127,6 +127,7 @@  static struct gpio_desc *acpi_get_gpiod(char *path, int pin)
 
 	return gpiochip_get_desc(chip, pin);
 }
+EXPORT_SYMBOL_GPL(acpi_get_gpiod);
 
 static irqreturn_t acpi_gpio_irq_handler(int irq, void *data)
 {
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 39263c6b52e1..737115a93138 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -1066,6 +1066,7 @@  void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const c
 bool acpi_gpio_get_irq_resource(struct acpi_resource *ares,
 				struct acpi_resource_gpio **agpio);
 int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index);
+struct gpio_desc *acpi_get_gpiod(char *path, int pin);
 #else
 static inline bool acpi_gpio_get_irq_resource(struct acpi_resource *ares,
 					      struct acpi_resource_gpio **agpio)
@@ -1076,6 +1077,10 @@  static inline int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index)
 {
 	return -ENXIO;
 }
+struct gpio_desc *acpi_get_gpiod(char *path, int pin)
+{
+	return NULL;
+}
 #endif
 
 /* Device properties */