Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp604801pxy; Thu, 22 Apr 2021 09:11:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwdkAjDcxCumQSN5nYoU5vDQv+srfY82AFW2W60j1nO9Dwgwk2w4XJLUvxorVq2Rva59F7 X-Received: by 2002:aa7:cc03:: with SMTP id q3mr4912018edt.366.1619107870789; Thu, 22 Apr 2021 09:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619107870; cv=none; d=google.com; s=arc-20160816; b=I8RzCBQgtnegK4zlABbmjQp1WCknq/hXhcGDzIjF3wwHt2s0mjCZ7Kkex1Fy1bdhBi u2483gVJbINl66CHvcuqQF5b+fdBs781KVtGo7WV126idxUxgBnSiDYjTKG/2uCBMSKS Og3/G9nPuXc+gUNT8VSm0H5VFfECyLE+UsFAiydnAyHYEBcW6zdkHL0yyMSu6+VABD35 QLswR4sRT29OGw14nVr31MhWBbVRkBUuUD7dq5B8/ISDNtT6yeGK79qU6Lw+NiLSKkAV yfnpPZQEg1IJqFpjqXJ5aaLKWa7+MIFRB7KesD+TfOCBQyx+g4KtNQOlxWhBYC64KJVU VvFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :dkim-signature; bh=hpPPG/oOk4La4MLBYmxeGSZRqb4rLTeasnxxz8zTebY=; b=Zk5oVc/wWq3a+RRrsMIKUsdMJJxsU5XwHJ3c7bhJDC2HK3z3YHAUvuk+8gP+AijqCQ KzrGOlTKGHHFebWClGHvGQbRbvgbCMo8+sXEfF9g6AfBl+CUt7mDouW1LBka87KRPlsr nFRw6mArD8ErvtLpGdXkIYpAdofLDi+TqDWCsP2SoIMSHxPHfw6v0Vja/zvESUDCeRCY 8LDFLSnL8oCRlBVE6ls+sQJ8vjmYJG/WziF4xaiAw5PmxBC7HnDIvpq0tD+Z3CoOtHXW 1yUq/ZtRy0G1nJevhINZYno9zpXe7D+HSpy+SPLh3GgSQd0pjI9xuyfdplgw5LiyEuG9 THMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DXg1L5sN; 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 p4si2374274edq.332.2021.04.22.09.10.46; Thu, 22 Apr 2021 09:11:10 -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=@gmail.com header.s=20161025 header.b=DXg1L5sN; 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 S236496AbhDVQI5 (ORCPT + 99 others); Thu, 22 Apr 2021 12:08:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232670AbhDVQI5 (ORCPT ); Thu, 22 Apr 2021 12:08:57 -0400 Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44041C06174A; Thu, 22 Apr 2021 09:08:22 -0700 (PDT) Received: by mail-oi1-x232.google.com with SMTP id v6so18489146oiv.3; Thu, 22 Apr 2021 09:08:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hpPPG/oOk4La4MLBYmxeGSZRqb4rLTeasnxxz8zTebY=; b=DXg1L5sN+rRdJVX/5t7Ky/nAi9Q7Cb1s2ztV3tmZBYuJzwiamhnvPlg+r41NTLB0Vk qHOwsEq2wk4LNWjP5iTfV0xcsxmIdz3+bGPfysqb3glPBtqzc2EvCJLpA01qO9yFT/zL ETTxnWObj7EccGWG3IdVWvEAFGNk3aCrEX+xuFCrgEYCxhHKxp00OXpgmo2v9PsLWfOZ t7nbGhprflHuuFrY4Sp5mbsno3HzviBI4iAbbQ7juy60qwfdxXvPHfP1/Br/wjDG7VYK WJhqRw+o5AEOR0ePGmEwYB7u/i/d9PvH0RX0412XKcAwHtnDZOM2UchhoSyKjz6Rno7C 8JtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=hpPPG/oOk4La4MLBYmxeGSZRqb4rLTeasnxxz8zTebY=; b=lwNy654L1MTNHEjgpNNfP9PeRCpRgtIJXut2DSkHO/X6snnhg+n3gZmB+NBqLp98e9 66ny04rl21eHaoJzZJF1DdYDq8DjBq9CXHP1hQSS8gCXWmnhLYqoKcVkWUiMVlllwSEx UddC8RVIYLifnBy8Ik1yIUyBwrQIWkVIxK9hqZmQtH0yXGfqHaEZwNbjPVwSMJbAWYBF KiL/Wyn3OkK9p6+6NOnbDglQzkWEbA6WGdMOX/g8pHuI3JhPifgRoL0oonwi8aQ06JKb Le+sRnUhKmy5M9CiBGC32Cc5IoJKUgUi+Ew+2LU31mzSxWUcdQxnONh6Ht9xVBGVIBub yu7w== X-Gm-Message-State: AOAM532/vt6GmELEg+ivLRQbpp5wwS/v7vv+Y3rbLJhoO1/13cfJ4oJ+ q4VA6tenMh39eUXPQEuXqEA= X-Received: by 2002:aca:1a0b:: with SMTP id a11mr473914oia.167.1619107701670; Thu, 22 Apr 2021 09:08:21 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id p22sm738119otf.25.2021.04.22.09.08.20 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Apr 2021 09:08:21 -0700 (PDT) Sender: Guenter Roeck Date: Thu, 22 Apr 2021 09:08:19 -0700 From: Guenter Roeck To: Arnd Bergmann Cc: Alessandro Zummo , Alexandre Belloni , Lee Jones , Matti Vaittinen , Arnd Bergmann , Linus Walleij , Claudius Heine , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [v2] rtc: bd70528: fix BD71815 watchdog dependency Message-ID: <20210422160819.GA104045@roeck-us.net> References: <20210422151545.2403356-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210422151545.2403356-1-arnd@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 22, 2021 at 05:15:21PM +0200, 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 Reviewed-by: Guenter Roeck > --- > 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. > -- > 2.29.2 >