Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp5013977pxy; Tue, 27 Apr 2021 18:41:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDZO+g2HMRfIdaUGKT4CQaqOvrv5p4PI5xZs/O8n8KAse0CrOcy0PKD/WHuRulaZiTogBk X-Received: by 2002:a17:907:2bd7:: with SMTP id gv23mr14971379ejc.321.1619574071713; Tue, 27 Apr 2021 18:41:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619574071; cv=none; d=google.com; s=arc-20160816; b=B4Q9fiaKPUrtD4FJs8DWG/Uklp2qyXt0qzNoUDXT7vInH6+40f1w1QYI4gpox9zLrU 5k5gu5T61AYiEpMwJwXWr9blaOBV4ms4usmr9Ls8xFoD+1y6XjwbrRDRIvcuka/jGq45 ZDD8a0oTjhqSahXiFxrb0ITGHVA+/ENusjgzVEbiAjgxp5887NpxeA09QvVVMbJG8M5b tMVvql0uO6sG2qSXgxO+r5+8E+cXUhaYDjwbaMZhKTscjXO6JUdm+yh2ykskT7nq/+RA khOmg3ew5RLzj90dJU/Xo3+GGzp2LDoQR1F21alPOCu7ekX1oKdiGTmF4i/I8VzlJNG2 +sig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=j0YMlGzHf/h6mz2607RywJBcwp3+uuEe5/I39C4Plt4=; b=uylff881rBn12Ydkkxmr2IR3z+RlaDfdxnT2KO9VqLR8Irj+4xBGUjFzo/s0cWhxTF cs909u0BarQmssd9tRWy3d4CKnWCgRLLA8SrQYojqJkxUiYlm+wrW+o4whyRL7lx7Iun qvQQteFH6Y22+m8E2FcvX3iHHSDdA8vXhetlydHxIwRgyPoErNSSp4fe5DujO0dvYfTO gw6QJH2BmG+70dPkEGKbkG91fnzxhYfnBnol5nkZpqqObaV7dNUMAWxCw8FI0R5G0Ep+ NcuGKGA7vX5Sprc00PFKwBCRp3kZe8ApXEIeskrBcreI6gw585/EsESIS27S72dnP21v NElw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=WXmy1DnT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u16si1593779eje.91.2021.04.27.18.40.46; Tue, 27 Apr 2021 18:41:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=WXmy1DnT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237965AbhD1Bki (ORCPT + 99 others); Tue, 27 Apr 2021 21:40:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230425AbhD1Bkh (ORCPT ); Tue, 27 Apr 2021 21:40:37 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13027C061574; Tue, 27 Apr 2021 18:39:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=j0YMlGzHf/h6mz2607RywJBcwp3+uuEe5/I39C4Plt4=; b=WXmy1DnTJDqIRSAOvxtbULE6M7 8kCQWqcYQETvbNwhJmVY1v7B+irbL5ezKWxXEr6OpRVNARMubEalpLzLrumXzTacTdx++gWDspJXQ DRYfkAuaB01eqLv0/kdZM8gnUjB9H+LKgD9R2rn8DggtzXDhnmsbouiqk35MoStzacFLvjt8IjgRo 6oK5ZJvN6PEQzl6Y+9Y+We9mkD4FKkdeBpu0j+w1B36jCCqfxvXBE12MgfAcxCknnKdAXUszjXqbK x9zyXEf89Wk6knV2uvuwVlTGA2fBsV6W9kWRRGtjpPtgH3jtqdFhC1j7CsXR7HqzjmmU6/1CfvHy0 VAhy7+RA==; Received: from [2601:1c0:6280:3f0::df68] by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lbZAu-007hVE-Ps; Wed, 28 Apr 2021 01:39:43 +0000 Subject: Re: [PATCH] [v2] rtc: bd70528: fix BD71815 watchdog dependency To: Arnd Bergmann , Alessandro Zummo , Alexandre Belloni , Lee Jones , Matti Vaittinen Cc: Arnd Bergmann , Linus Walleij , Guenter Roeck , Claudius Heine , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210422151545.2403356-1-arnd@kernel.org> From: Randy Dunlap Message-ID: <5bb5dc13-2637-c6b7-b681-c16eaf8af53c@infradead.org> Date: Tue, 27 Apr 2021 18:39:32 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210422151545.2403356-1-arnd@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/22/21 8:15 AM, Arnd Bergmann wrote: > From: Arnd Bergmann > > The added Kconfig dependency is slightly incorrect, which can > lead to a link failure when the watchdog is a loadable module: > > arm-linux-gnueabi-ld: drivers/rtc/rtc-bd70528.o: in function `bd70528_set_rtc_based_timers': > rtc-bd70528.c:(.text+0x6cc): undefined reference to `bd70528_wdt_set' > arm-linux-gnueabi-ld: drivers/rtc/rtc-bd70528.o: in function `bd70528_set_time': > rtc-bd70528.c:(.text+0xaa0): undefined reference to `bd70528_wdt_lock' > arm-linux-gnueabi-ld: rtc-bd70528.c:(.text+0xab8): undefined reference to `bd70528_wdt_unlock' > arm-linux-gnueabi-ld: drivers/rtc/rtc-bd70528.o: in function `bd70528_alm_enable': > rtc-bd70528.c:(.text+0xfc0): undefined reference to `bd70528_wdt_lock' > arm-linux-gnueabi-ld: rtc-bd70528.c:(.text+0x1030): undefined reference to `bd70528_wdt_unlock' > > The problem is that it allows to be built-in if MFD_ROHM_BD71828 > is built-in, even when the watchdog is a loadable module. > > Rework this so that having the watchdog as a loadable module always > forces the rtc to be a module as well instead of built-in, > regardless of bd71828. > > Fixes: c56dc069f268 ("rtc: bd70528: Support RTC on ROHM BD71815") > Signed-off-by: Arnd Bergmann > --- > v2: Fix as suggested by Guenter Roeck, reword description > --- > drivers/rtc/Kconfig | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig > index d8c13fded164..914497abeef9 100644 > --- a/drivers/rtc/Kconfig > +++ b/drivers/rtc/Kconfig > @@ -502,7 +502,8 @@ config RTC_DRV_M41T80_WDT > > config RTC_DRV_BD70528 > tristate "ROHM BD70528, BD71815 and BD71828 PMIC RTC" > - depends on MFD_ROHM_BD71828 || MFD_ROHM_BD70528 && (BD70528_WATCHDOG || !BD70528_WATCHDOG) > + depends on MFD_ROHM_BD71828 || MFD_ROHM_BD70528 > + depends on BD70528_WATCHDOG || !BD70528_WATCHDOG > help > If you say Y here you will get support for the RTC > block on ROHM BD70528, BD71815 and BD71828 Power Management IC. > Acked-by: Randy Dunlap # build-tested thanks. -- ~Randy