Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp802566pxb; Fri, 22 Apr 2022 11:27:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxT27FdnouxZBFJPUkn/0OMJCQaNC6Cv95GHmcn76smKSXamkOp/xNnrf3yIckZiydrrmWg X-Received: by 2002:a17:90a:8418:b0:1d2:7c69:e3bf with SMTP id j24-20020a17090a841800b001d27c69e3bfmr17633382pjn.44.1650652037898; Fri, 22 Apr 2022 11:27:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650652037; cv=none; d=google.com; s=arc-20160816; b=rsFzSNMcFEcUB7Vk9ml+5/SWcuBPmSpwUP95zJIhdMKwuBaaJ0R4mkvJbhC+iK0VOq NQILN5d9++8EJLeeO5nchnG+S1NfVabOqwo9t+yFmZRDMoLHZ14Wwom6qm4tRtQ42kKq PUn67z2H47UcLrqb83pBMBUzl8xNQdRuzh8Mwqnn/zzHatn1jxiu3BxLfWeoopiKuMsn h+yLL2iYoWVnIbv4wl+xk7/jV28tAWfSxmgevwSJ5+3cSWFNR/OhMHsrFqpUVXz7Kb0g SpFka4iNHQoNZH4uH8yWu0TiGx6LIqtNY6sRJoqTL3QzcNEVY+Ytz28zIffbnnCQ23y+ /l7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CYXJydei8LbsYPXfuRXE5dNuf/6tGUDfV1sRVYeSrz8=; b=zAcE6GHknHRjSHA1xDrFRC8/WGxu4ATvkId08fj8EgOE9w7DAKO9pjTLnGaPtkE2IF +ONzqXXMZ5FJICvCJKmyJQrqpLGKJ9/GMOVNRQBv+W7bq+prKG82iRGdhqmkqIIlSEy6 S4Tdlfz4xgcDvWX1mQ+LJFEWCgkf7ssMUkB0vVyCN6+1m62FNgmYW4uSfgObRoEYsac+ iwta/4KdlRHWSdTSth1GRTwzCBZown+nnqQG9Lo3pente+xQMbuODftKPDrPmk3XN+qt bcfDUMkAJzqZMohsyFO3ZQ6vQzjczm+WvU+MFwSSTZQqZe8gOifUYmPvgqElJvK+kTTy acmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HRPLN2c+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id y16-20020a17090aa41000b001bd14e0308fsi7958126pjp.103.2022.04.22.11.27.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 11:27:17 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HRPLN2c+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1FA1EE886D; Fri, 22 Apr 2022 10:55:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351380AbiDTJJ2 (ORCPT + 99 others); Wed, 20 Apr 2022 05:09:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351352AbiDTJJ0 (ORCPT ); Wed, 20 Apr 2022 05:09:26 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C84C612756; Wed, 20 Apr 2022 02:06:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650445600; x=1681981600; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=uf3MUfIrMG7NSD6MLuF40FAUsLWXCYmgBZwz5nCggiw=; b=HRPLN2c+ZFkwho5c3pPTyUFilYVZMWOyZksjSB+IdFiRrLariD1Q2vTu 2DXWpzRANm3YuoCe9iIHjojy4GqXJyA7++mDQk4vy6mLPVsNsYhJUB1ar XqPZr9LxQJZ8yYEfFzIVoZ5Wagy/SqgUshXqDQEw/SO7PJ5vbu4/XlVJ1 YD5m3U/JZdKDwPrKNE7uAIYVjXg6rbIpc6WvqczgrZ7ZFVlO/An6P/Rq8 Y6ji3Ow9tETniJA6NLT1vPunht6VD230NfyOnESgnwaz0jahugq0gT6Bs yi4n/xwM8F6iD3FAP7C13wsE1NeDXnG2U8opbG1tayMM1VfVKWLL1rmGH g==; X-IronPort-AV: E=McAfee;i="6400,9594,10322"; a="326880507" X-IronPort-AV: E=Sophos;i="5.90,275,1643702400"; d="scan'208";a="326880507" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2022 02:06:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,275,1643702400"; d="scan'208";a="702568859" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 20 Apr 2022 02:06:37 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Wed, 20 Apr 2022 12:06:36 +0300 Date: Wed, 20 Apr 2022 12:06:36 +0300 From: Heikki Krogerus To: Ren Zhijie Cc: gregkh@linuxfoundation.org, cy_huang@richtek.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] usb: typec: rt1719: Fix build error without CONFIG_POWER_SUPPLY Message-ID: References: <20220418082425.41566-1-renzhijie2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220418082425.41566-1-renzhijie2@huawei.com> X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE 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 Mon, Apr 18, 2022 at 04:24:25PM +0800, Ren Zhijie kirjoitti: > Building without CONFIG_POWER_SUPPLY will fail: > > drivers/usb/typec/rt1719.o: In function `rt1719_psy_set_property': > rt1719.c:(.text+0x10a): undefined reference to `power_supply_get_drvdata' > drivers/usb/typec/rt1719.o: In function `rt1719_psy_get_property': > rt1719.c:(.text+0x2c8): undefined reference to `power_supply_get_drvdata' > drivers/usb/typec/rt1719.o: In function `devm_rt1719_psy_register': > rt1719.c:(.text+0x3e9): undefined reference to `devm_power_supply_register' > drivers/usb/typec/rt1719.o: In function `rt1719_irq_handler': > rt1719.c:(.text+0xf9f): undefined reference to `power_supply_changed' > drivers/usb/typec/rt1719.o: In function `rt1719_update_pwr_opmode.part.9': > rt1719.c:(.text+0x657): undefined reference to `power_supply_changed' > drivers/usb/typec/rt1719.o: In function `rt1719_attach': > rt1719.c:(.text+0x83e): undefined reference to `power_supply_changed' > > Add POWER_SUPPLY dependency to Kconfig. > > Reported-by: Hulk Robot > Fixes: 25d29b980912 ("usb: typec: rt1719: Add support for Richtek RT1719") > Signed-off-by: Ren Zhijie Reviewed-by: Heikki Krogerus > --- > drivers/usb/typec/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/typec/Kconfig b/drivers/usb/typec/Kconfig > index 8f921213b17d..ba24847fb245 100644 > --- a/drivers/usb/typec/Kconfig > +++ b/drivers/usb/typec/Kconfig > @@ -56,6 +56,7 @@ config TYPEC_RT1719 > tristate "Richtek RT1719 Sink Only Type-C controller driver" > depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH > depends on I2C > + depends on POWER_SUPPLY > select REGMAP_I2C > help > Say Y or M here if your system has Richtek RT1719 sink only > -- > 2.17.1 -- heikki