From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF548C433E0 for ; Tue, 23 Mar 2021 13:48:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95B85619B3 for ; Tue, 23 Mar 2021 13:48:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231189AbhCWNrd (ORCPT ); Tue, 23 Mar 2021 09:47:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:52318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229929AbhCWNrS (ORCPT ); Tue, 23 Mar 2021 09:47:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AD45F6198C; Tue, 23 Mar 2021 13:47:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616507238; bh=wD/B/xKbW2tuyo74fJsKiZyXFeGvnaD7QOI+wgfl9pk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Nq9tvCpDgQ1sai5Z6lh8JLchXCQR5/7LdyGK+Z0NlN+t7lyzXiti6RLKxUpNBGev4 1Sj6D82hf6TZLBWvEI/l2rsGOF+IyOGZy2+G8wr0n8NI+KHuOrKmLZIOh5CEsg3Azz u6m9dl56vFSMK/tAMkZS+4cc4Ep8gMCZpRBXrRps= Date: Tue, 23 Mar 2021 14:47:15 +0100 From: Greg KH To: Ray Chi Cc: Sebastian Reichel , naresh.kamboju@linaro.org, Kyle Tso , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Badhri Jagan Sridharan Subject: Re: [PATCH] usb: dwc3: fix build error when POWER_SUPPLY is not enabled Message-ID: References: <20210308133146.3168995-1-raychi@google.com> <20210309185807.ka4iljasq5cmpmil@earth.universe> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Fri, Mar 12, 2021 at 09:57:56PM +0800, Ray Chi wrote: > Hi Sebastian, > > Sorry for the late reply. > > On Wed, Mar 10, 2021 at 2:58 AM Sebastian Reichel wrote: > > > > Hi, > > > > On Mon, Mar 08, 2021 at 09:31:46PM +0800, Ray Chi wrote: > > > Fix build error when CONFIG_POWER_SUPPLY is not enabled. > > > > > > The build error occurs in mips (cavium_octeon_defconfig). > > > > > > mips-linux-gnu-ld: drivers/usb/dwc3/core.o: in function `dwc3_remove': > > > drivers/usb/dwc3/core.c:1657: undefined reference to `power_supply_put' > > > mips-linux-gnu-ld: drivers/usb/dwc3/core.o: in function `dwc3_get_properties': > > > drivers/usb/dwc3/core.c:1270: undefined reference to `power_supply_get_by_name' > > > mips-linux-gnu-ld: drivers/usb/dwc3/core.o: in function `dwc3_probe': > > > drivers/usb/dwc3/core.c:1632: undefined reference to `power_supply_put' > > > > > > Fixes: 59fa3def35de ("usb: dwc3: add a power supply for current control") > > > Reported-by: Naresh Kamboju > > > Signed-off-by: Ray Chi > > > --- > > > > While I'm fine with merging this after fixing up the subject, the > > original patch for dwc3 [0] looks completly incorrect to me. > > > > First of all it uses wrong scale (power-supply uses uA, not mA), > > so you are charging 1000x slower than expected. Then the patchset > > introduces a new DT property to get the power-supply device, but > > does not update the DT binding documentation and does not Cc the > > DT binding maintainer. > > Yes, it should use uA and send this information, and I will update a > patch to fix it and add the DT binding documentation. So should I revert what we currently have in my usb-next tree, or do you have a fix for this? thanks, greg k-h