From patchwork Mon Jul 19 14:53:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 480018 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4283093jao; Mon, 19 Jul 2021 09:25:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyR/67ILfZktisAiEiiLG6VPR3nMYyCSW6c8YNg0xOhRosZNiq/aT9uqphQGPEpKZAhX+eL X-Received: by 2002:a17:906:6050:: with SMTP id p16mr18610108ejj.43.1626711824037; Mon, 19 Jul 2021 09:23:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626711824; cv=none; d=google.com; s=arc-20160816; b=O58bhOlWumVrDwYKHZj665DlbN7yV9PLYyypWUsTSW6wODremBn6PMvsoLgaXmpdKF 1h+9hAzf8Igd980CKc32q/bysgPG+lgA6i9+VSa2f3SJGhO6Z/Zb2v0t53A0lNQnqJFT hVedDj0fAssW6DkBSNhXmKfiWO2cbGk+fRSLGnlMxcZs1gLLG85PnmsgJrw7jemU0nUe olflZGvG1Kf3EoC8XUbcEyJLRZhDpi7H1+NJ93wy4AoRdUkmpGnnSy/E+HBIcfVQMC+7 HEdvdFMfvDbK/DyVEnULg/QmHfeSaxnmsD5vgflJ1D/s7kQx4DKDiMed6XU5/tSbmAwl 4Fmw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KrVQI0CrTvkS05W6GBhVDgmziNo5SFKtFNfRCL/f8Pg=; b=YK/6cQtraSjNzAfTiicwXGuJhDWOJFMO3StKKyTDXGZP8NLQMxCkV4/40epR9yoMNY WjISE/AEvQZogUkRL6klw+ZMuqtMJQ88g4dBxRdgRSLOkeNqWr7w7tm8QAJY/OnX+9jq TjoN51HnVWFqXJmhwbnLYlfyaSynAEkTDOyBeozJkezaOTZaT2EzOUSRKAvyNIPsxDep lTCiA5sS1cEZ+q8HBck2m35/GI/WYiWD1nzZIkIW0V8GQLJ9lskn/6fTLKqTq2P1OaCa MjzfP81YzAoDcGA29FGcWWnmdEDGivf4TzDhUYVJDTc+4XU1ytPZE5GiXS8KY0KXDpBz yYfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Pyc3bLfG; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id la14si22045543ejc.142.2021.07.19.09.23.43; Mon, 19 Jul 2021 09:23:44 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b=Pyc3bLfG; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347928AbhGSPlq (ORCPT + 12 others); Mon, 19 Jul 2021 11:41:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:59680 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348725AbhGSPf2 (ORCPT ); Mon, 19 Jul 2021 11:35:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 77E8E61621; Mon, 19 Jul 2021 16:14:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626711255; bh=DhNr/YIHnr2doWNV2z18T/NAGpuzYzIlt4aNAxgXud0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pyc3bLfG7XBA9ECKBOieMnTsuZXvytO8BUBO5sBJUUC9FcpEwFzytkz8E+wlnyjId eleLygUJaxiFHIKIFHxwYVU9bg7u0dyDQ3zl4WLpLCWGGm4xOuszqFnSoc0Y7ot6cM C+RsuU/z7c0T27ZF46yQ8vIolUKkuewFamAwshdA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Guenter Roeck , Matti Vaittinen , Alexandre Belloni , Sasha Levin , Randy Dunlap Subject: [PATCH 5.13 286/351] rtc: bd70528: fix BD71815 watchdog dependency Date: Mon, 19 Jul 2021 16:53:52 +0200 Message-Id: <20210719144954.495231762@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144944.537151528@linuxfoundation.org> References: <20210719144944.537151528@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit b0ddc5b170058a9ed3c9f031501d735a4eb8ee89 ] 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 Reviewed-by: Matti Vaittinen Acked-by: Randy Dunlap # build-tested Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210422151545.2403356-1-arnd@kernel.org Signed-off-by: Sasha Levin --- drivers/rtc/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.30.2 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.