Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1997541ioo; Mon, 23 May 2022 07:54:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ9kazkVVe0fsQB+pee1M0rzf4W0+Fx0UTkNnR/wspXnEuyTwnOO0gTmsjz8hMXEU5xwMY X-Received: by 2002:a17:90b:17c5:b0:1dc:e0a6:340b with SMTP id me5-20020a17090b17c500b001dce0a6340bmr26905972pjb.34.1653317666381; Mon, 23 May 2022 07:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653317666; cv=none; d=google.com; s=arc-20160816; b=EGplJuOZ68xhsGpW677km4ZjWoQ1Q3fDc0nB9qVPsKDlmEds1Sioh5tSWJUfLOuUj6 K5JVFAXGQ63s+v7ixoKSU6tgt7kYSLqKVNRg/WRSjmOnZuszLp5s+pOVJ1MVPJdw4QCI twMYUWHqcIqqOYGeJ3T/W/1JWzkbaJzzNRTL5DyZ76om3xOTgZaMNpWANaeAl/8EvMKf Ek+N5bDDCL63HYl8iwfFdXRuSuilkkgZVT4i4DPlS3HFljZeDWhThpsvlAcNCRzUg2Qm z8J7Z3uRpBdrmMFnORNoIHcbm+fGlB8ZbAXgskghg+Lsgg404hQ65jmZ/lenqWfCmB8D BxXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from; bh=0QlpPJk7A91a3B6NcsgR8Zus1Ria7YOP4KG3R0eTXUM=; b=ojVigerciBPOpZD7CxQMQamCrA3oinE6GujCummRRqvbbix5M9PN6ivTYtCIAm1yua FJye23osu56M75AdENce3wUG2a72VO34mR9JCuuxjPSDjQKAJaQbq5PEyAZE23Xlnmg7 uDVZnfIwUBEX8fSzCmlKIxkDPvT/LF7UxAXd5AIUoG5+bWTeDhhJYT681OrjpNok6hg4 sq/mwVNNx1aYEqBLsDmesiSkQvu3BQOBhvNLBS61Gm4ZqafcXE4h5wP/OvWBm5SsyeB/ T6/9OkkSUzKRhUS8FRzjK8lYiIe+DA/c4rBdKqApXH0UgupQ8Jf6JCLjDYUGQzzTjyRJ xo1w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b19-20020a170902d41300b00161d4849aa6si9048839ple.390.2022.05.23.07.54.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 07:54:26 -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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BE0175AEE9; Mon, 23 May 2022 07:54:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237356AbiEWOyT (ORCPT + 99 others); Mon, 23 May 2022 10:54:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237309AbiEWOyQ (ORCPT ); Mon, 23 May 2022 10:54:16 -0400 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DFA3424AF; Mon, 23 May 2022 07:54:15 -0700 (PDT) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 96B5A200002; Mon, 23 May 2022 14:54:10 +0000 (UTC) From: Quentin Schulz Cc: a.zummo@towertech.it, alexandre.belloni@bootlin.com, linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, foss+kernel@0leil.net, Quentin Schulz Subject: [PATCH] rtc: isl1208: do not advertise update interrupt feature if no interrupt specified Date: Mon, 23 May 2022 16:53:20 +0200 Message-Id: <20220523145320.123713-1-foss+kernel@0leil.net> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Quentin Schulz If an ISL1208 device does not have an interrupt line routed, the feature shouldn't be advertised (it is by default in rtc core) or it'll confuse userspace requesting that feature (such as hwclock from util-linux). Signed-off-by: Quentin Schulz --- drivers/rtc/rtc-isl1208.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c index 182dfa6055155..f448a525333e1 100644 --- a/drivers/rtc/rtc-isl1208.c +++ b/drivers/rtc/rtc-isl1208.c @@ -880,10 +880,14 @@ isl1208_probe(struct i2c_client *client, const struct i2c_device_id *id) if (rc) return rc; - if (client->irq > 0) + if (client->irq > 0) { rc = isl1208_setup_irq(client, client->irq); - if (rc) - return rc; + if (rc) + return rc; + + } else { + clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, isl1208->rtc->features); + } if (evdet_irq > 0 && evdet_irq != client->irq) rc = isl1208_setup_irq(client, evdet_irq); -- 2.36.1