From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B72272236EB; Thu, 12 Dec 2024 17:45:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734025516; cv=none; b=DBY/Un6q79pt+kbWFb7Jyom7ZU+BsXoil8KMO2QuauVeomJSGB2JImFRnOVl0LRHSW/yd9A3Ph1/uwSv3M/I4WqpGQs4YzMnd+DZjqySfCAN4ja1M+/E1G6nsKRQsJSk1KcNdVCWT6l/quDhQ2WoTOATxGItNuTVf8DHs08xbmE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734025516; c=relaxed/simple; bh=bgHN0nwzEpQ+YA+aRGr9A37VtU5cvCqzoa/gQRAgPXc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ExCOf6EmMEkHkUw9buoznyJq3gPB53y9xNU6bkTcZEaqN82BXdc7ZLQozxDsoVcuJCnH4oeXXVVXsj0HH9w/LarqvGzkr0qCAb1w7H9kpBQKqabzn3Tp7p2qoNDNLTnlCnHpTVwLtc+LegzCoLxRDsW0j+JRJoi6g7fB6ddfHl8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EE0BFV/z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EE0BFV/z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3292FC4CECE; Thu, 12 Dec 2024 17:45:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1734025516; bh=bgHN0nwzEpQ+YA+aRGr9A37VtU5cvCqzoa/gQRAgPXc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EE0BFV/z2w4+cFzUGucIhi6SzPA2AzPgc8COfIzLN8SEPI4uib6lD3fvALYUqtr6l PKKreg5cZPUDzPv2266S33yBR+ligdwo/+N4asLrvwvYfohCOr32yzmu/PMKjdlVKW Jk7FB9WlK76aAmWcu0q9kAEcNZDaCGtT5vXvWXIU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Maxime Chevallier , Alexandre Belloni , Sasha Levin Subject: [PATCH 5.4 195/321] rtc: ab-eoz9: dont fail temperature reads on undervoltage notification Date: Thu, 12 Dec 2024 16:01:53 +0100 Message-ID: <20241212144237.683478442@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241212144229.291682835@linuxfoundation.org> References: <20241212144229.291682835@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Maxime Chevallier [ Upstream commit e0779a0dcf41a6452ac0a169cd96863feb5787c7 ] The undervoltage flags reported by the RTC are useful to know if the time and date are reliable after a reboot. Although the threshold VLOW1 indicates that the thermometer has been shutdown and time compensation is off, it doesn't mean that the temperature readout is currently impossible. As the system is running, the RTC voltage is now fully established and we can read the temperature. Fixes: 67075b63cce2 ("rtc: add AB-RTCMC-32.768kHz-EOZ9 RTC support") Signed-off-by: Maxime Chevallier Link: https://lore.kernel.org/r/20241122101031.68916-3-maxime.chevallier@bootlin.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin --- drivers/rtc/rtc-ab-eoz9.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/rtc/rtc-ab-eoz9.c b/drivers/rtc/rtc-ab-eoz9.c index d690985caa4cf..1d6a626fdf933 100644 --- a/drivers/rtc/rtc-ab-eoz9.c +++ b/drivers/rtc/rtc-ab-eoz9.c @@ -281,13 +281,6 @@ static int abeoz9z3_temp_read(struct device *dev, if (ret < 0) return ret; - if ((val & ABEOZ9_REG_CTRL_STATUS_V1F) || - (val & ABEOZ9_REG_CTRL_STATUS_V2F)) { - dev_err(dev, - "thermometer might be disabled due to low voltage\n"); - return -EINVAL; - } - switch (attr) { case hwmon_temp_input: ret = regmap_read(regmap, ABEOZ9_REG_REG_TEMP, &val); -- 2.43.0