Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5941171rwl; Wed, 22 Mar 2023 04:35:08 -0700 (PDT) X-Google-Smtp-Source: AK7set+hLqLmG2Y5+yoAaDD56d6/UXXX4ahpg8FTVJ2EqzdMJwT/bKUS9FO6Hfya5nMi2InH1kR8 X-Received: by 2002:a17:902:c40a:b0:1a0:4526:3535 with SMTP id k10-20020a170902c40a00b001a045263535mr3441680plk.57.1679484907738; Wed, 22 Mar 2023 04:35:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679484907; cv=none; d=google.com; s=arc-20160816; b=UZf9tZ9B55Yb6zrHwW0ysgOKXVC/NZQvqTLVymh57xPagMnKwypzfxpOikaJxX+DX7 NQa45+d3GdgeMXoDh7+EjXF+luRlXqoA66oCH09DsDkzcpfIjfyhzp/XIkP+vcWBvOwA /3BVDzNgZzkUfZvpsXO99jsXp9UOnS2P8coTTW5ioSI+f5tT3GtcC/2+VNjAORxBPJNg NwtEdxbMagJk1yCCWzc8kDrWyqmgWzvn4Ulsb7AGgYA4gfsAMhgHFVycDsRTdh9s9goQ Vn0mVKj0BcrJwKd356QVksCPF13zR8df9ZZNqGk9CoPCV2Gy1ZQ9zz56l/4J9wUasCbG SMww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=r2Dbz4G32SF4poM08TwTXMuNh7AYLe25TnYnBhygtr8=; b=i8iIVU2hlAE2MajbpqJkBNP8pzU/CN9HgKoovHh9p//YSB82HGbrs4uErebQ02HHTX VBEhODz0L1e+cuF/OraqjMutwWw514wsCYOLm4FYASThS+0Ucb7gkjgJF4VB+GEyyoLR k3tvmnH1vk1gB/NvqvCAPr3jWvVrWwcCbB4HtUJsZ/Aie9EC44+aPJi3n8gQD+69WTO7 edt/GrgspVe3sHukUFgqxtfNYMFaEkVkFipAHfGvm0KnCPhZF1xn9uASa7UFgsQ5ysGC BxqDJf2wGKmTgYOTs64zg9YspV1d6OhufMa562+libk0ggEJpVSswEn3SK5Xf0cwS/wn RD6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U9KJvy1B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b16-20020a170902d51000b0019adf805babsi17489421plg.500.2023.03.22.04.34.56; Wed, 22 Mar 2023 04:35:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U9KJvy1B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230328AbjCVLRQ (ORCPT + 99 others); Wed, 22 Mar 2023 07:17:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229620AbjCVLRO (ORCPT ); Wed, 22 Mar 2023 07:17:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A6C534F4B for ; Wed, 22 Mar 2023 04:17:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9AA666202A for ; Wed, 22 Mar 2023 11:17:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FE57C433D2; Wed, 22 Mar 2023 11:17:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679483833; bh=hxYlSbdZtdkYUaS/j6XHRDcBiXZlnQz/QqL+Bt8m+2k=; h=From:To:Cc:Subject:Date:From; b=U9KJvy1B/utPReWCd/fUqy5WoB93BhUvGfD8dAas9yAKCatpUlJj99pl89q46pL+V s9KU98lG8Sua9QeBTJ8lEGUsVBix+UrNadcA1tN3149AFk4jBZGv4w5LUpLawfzJe4 joQAuNPobXqSlBgC4gToGn8eRZjypzCfGbFpY3D2KmhH2OzbbT7BH7JavxSEpsnbhY UBAj5aBqajN9H6kZE5nKjo7CFVOR7qbV4dB1PBdaa4Iu0bRezl9MgZTWRdFiTfLzwo +JmXBvPqnLplDn+yEw5p08ejbGaS7d8WD/cBGEX1bIJC8AD2oPAAMPgccX9hLCGCn0 U/QCyMTCuaT8Q== From: Arnd Bergmann To: MyungJoo Ham , Chanwoo Choi , =?UTF-8?q?Alvin=20=C5=A0ipraga?= , Heikki Krogerus Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency Date: Wed, 22 Mar 2023 12:16:51 +0100 Message-Id: <20230322111708.1042312-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann When CONFIG_USB_ROLE_SWITCH=m, tusb320 cannot be built-in: ld.lld: error: undefined symbol: fwnode_usb_role_switch_get >>> referenced by extcon-usbc-tusb320.c >>> drivers/extcon/extcon-usbc-tusb320.o:(tusb320_probe) in archive vmlinux.a ld.lld: error: undefined symbol: usb_role_switch_set_role >>> referenced by extcon-usbc-tusb320.c >>> drivers/extcon/extcon-usbc-tusb320.o:(tusb320_state_update_handler) in archive vmlinux.a Add the appropriate Kconfig dependency to prevent this configuration but still allow the driver to be built-in when USB_ROLE_SWITCH is disabled. Fixes: 19685ae43489 ("extcon: usbc-tusb320: add usb_role_switch support") Signed-off-by: Arnd Bergmann --- drivers/extcon/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig index 290186e44e6b..0ef1971d22bb 100644 --- a/drivers/extcon/Kconfig +++ b/drivers/extcon/Kconfig @@ -185,6 +185,7 @@ config EXTCON_USBC_TUSB320 tristate "TI TUSB320 USB-C extcon support" depends on I2C && TYPEC select REGMAP_I2C + depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH help Say Y here to enable support for USB Type C cable detection extcon support using a TUSB320. -- 2.39.2