Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5755045rwd; Mon, 12 Jun 2023 09:10:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ57pagC3qZOcLcXRDzYgf+X+/Cp8nU9gao1zpfMocLzn9d6oyWYw6T75MoTFi4G/boh54K1 X-Received: by 2002:a2e:740a:0:b0:2b0:4c72:98ff with SMTP id p10-20020a2e740a000000b002b04c7298ffmr3021631ljc.7.1686586240047; Mon, 12 Jun 2023 09:10:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686586240; cv=none; d=google.com; s=arc-20160816; b=C+/AowQHcL6cEdUg+SVCTcxfLjC/qKsA6JaO6tMvgs7C0Yv8GpV7ataww7cCBJzbKc UpGqK4UC98HWvLIpLB9kWSqCREw1V/bGJjd2zyDIM0TWdpAAZTYI6FQb5ve+KzoYmbEf bj1/wvJqLtvKoLlh2w44JhXhBFAbhI9QrHfz/89qC6dH1hjnk8SAqtWIMgi3+9z9yJdy uESeE7Xbf2n3t0egboUI93zzibc+lxilDdrGUcOUqV3ljkSO++oJcBxt7NM2OjSpuyvw S+vpDCRfq6VQXez8vMWAg2GRJdcKR1ciOSa2bg8yZNpsQVBZwwthc3Z+EdldQOKfoMFR 7VTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=DHy/a8pcx6QLdH4jZQbAisX7/AHykLvoFkqwuBqB9f0=; b=eB5oRERNN5IyMmh27WGDP47ooazhAGwVZlkaiPQR8ezhlp5NX9ZgIEcwQihfEuG8Yd jLmP/LBlDvMN/QK8k3Yp6BGCKcr53Y7i7zVwb2ASzby7uk5oi1A6c2PoKjTEp/690Nqs hcgai1V4ZIBVT9j0tjuN7xduts4u0QfqqPRcLtVxj6InR4fVX2Mu95SpjQkRMPCatIOD vYmBkbgDJiZsJFdy8lji8yvfeFYF+X7Rvyhsv8N+L7XOqgecqe4VmFsxYLFg46b4oA/m 6KBnPuLAlwDX5gYVe/levzFx5pjAdYb+ggl97ynoBfLsUnl+u+mssUq3Soc1aNDgPCD3 5vqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nIUGiu9f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id la20-20020a170906ad9400b0096f3e73a193si5580469ejb.130.2023.06.12.09.10.15; Mon, 12 Jun 2023 09:10:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nIUGiu9f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236752AbjFLPs7 (ORCPT + 99 others); Mon, 12 Jun 2023 11:48:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232559AbjFLPsy (ORCPT ); Mon, 12 Jun 2023 11:48:54 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C647CA; Mon, 12 Jun 2023 08:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686584934; x=1718120934; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=W2HNM/FeZheU8WV1c9liGFrJzpMAfIbGq2q6Q46HIms=; b=nIUGiu9fkdYw8jEnSTdxSRQpgyRhll5VgBlFR2G3LKeZDKkKC5gIYNG4 tt6wpKb73QZpK1xr6oswMQJ/FZDBLMyHHuFo7t/7mEd/0CjQTdm0MANb9 2lTkJ5CWWxBhM+jqhFZ/RLOGt9aeh0aUYKF4BOsgHevcA5bhofNm1v3xz kc3lLKK3++eN0+XkKhLth0xm8YbBRWDrg30YFZNzR9oZlxpKJY6041RoI 72c0QPgbuK+q33Um7mOf4MN8e7i1vHl22hRKcBh1NvigoWu8PzzMAu5YZ gz0Ht05689vNzOjHQ77Tf3yfOO/jcXFUguubmza1BLEr9u+jbjDGXwNBr g==; X-IronPort-AV: E=McAfee;i="6600,9927,10739"; a="347735363" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="347735363" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2023 08:48:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10739"; a="741076865" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="741076865" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP; 12 Jun 2023 08:48:51 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1q8jmj-0039RP-1V; Mon, 12 Jun 2023 18:48:49 +0300 Date: Mon, 12 Jun 2023 18:48:49 +0300 From: Andy Shevchenko To: Rasmus Villemoes Cc: Alessandro Zummo , Alexandre Belloni , devicetree@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/8] rtc: isl12022: implement RTC_VL_READ and RTC_VL_CLR ioctls Message-ID: References: <20230612113059.247275-1-linux@rasmusvillemoes.dk> <20230612113059.247275-6-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230612113059.247275-6-linux@rasmusvillemoes.dk> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 12, 2023 at 01:30:55PM +0200, Rasmus Villemoes wrote: > Hook up support for reading the values of the SR_LBAT85 and SR_LBAT75 > bits. Translate the former to "battery low", and the latter to > "battery empty or not-present". ... > +static int isl12022_read_sr(struct regmap *regmap) > +{ > + int ret; > + u32 val; > + > + ret = regmap_read(regmap, ISL12022_REG_SR, &val); > + if (ret < 0) > + return ret; > + return val; Wondering if the bit 31 is in use with this register (note, I haven't checked the register width nor datasheet). > +} -- With Best Regards, Andy Shevchenko