Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp43604rwd; Mon, 12 Jun 2023 09:53:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ66+LmXD7VIQpSV4yoDNACq6RBMYr6lL/VhCMkyFtY0APb208nS9kfUi061x8leVyHMRw0w X-Received: by 2002:a05:6a20:e19b:b0:10c:5324:dba with SMTP id ks27-20020a056a20e19b00b0010c53240dbamr10182050pzb.28.1686588782437; Mon, 12 Jun 2023 09:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686588782; cv=none; d=google.com; s=arc-20160816; b=DNtHF7h7jjsEXgnm+1LnE5rlowSOIptui1zrA7/FTcYv0K9Esp+VMmRKnDy5PBTiqa MqN8qQ9hgNnx0FWR0rOa8OvXbyNnrNJggNJ9IxLeIDjPaaOykwFTT12T/QVcyNUgev/k VB2UiwRjyQjJepY+foi+tgdYncZczjVqgTyymtzaZLNn0faeBqlA7+jmpf8I7EdBjofC dp6QW9MIcom6UUjilvoGXF96hE0YFYOIRAfiJ9EN/rRG3kMVvnVMxIDYW5b5DHt7U4Gh 6dHlqxrg2IOpajJntEHOX2WniliQvLohuW35d32LOS946Rqn07uNj9vI4FB9Z5sxYdYY RUDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rYcn3RNmCkhTMoTm2euN2KhPgjvs1X0oq7hvMFkzhzM=; b=CPhWkxIzroXHNYdEnRNV0bV+dtEgeyGM16tkHHyxht0GWO8tWsaDNBqQljrXV8a+oZ XohJF1TQd/uxC4S+MhnZ8rCrmuuecjl+ZtzOvgV62cX4zJLmaLAhYgW0QyURlkV9IEaj jsfRKO2+F69dXlRKRmvnt1rDsPktuFGwCIfD0F8RH5JEy7TVbhPSLNaYJbJ7m30F2d3J bgDf5T6GptPH4CS3LLQOWmWQ/e5CJoJSUTfKOFJGm/rSipXO6hA6I1NQ74rEUUvo2Ppk nTOtwBmHt30sV31WWDN45PEleA6fCDIqetNn5Q63qFv1DntL7iYrP7oIo4SCS76DOuoF iixQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Q0x12Hn0; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i7-20020a636d07000000b00544c0bf5ff9si7125731pgc.44.2023.06.12.09.52.46; Mon, 12 Jun 2023 09:53:02 -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=@bootlin.com header.s=gm1 header.b=Q0x12Hn0; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231370AbjFLQKt (ORCPT + 99 others); Mon, 12 Jun 2023 12:10:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbjFLQKr (ORCPT ); Mon, 12 Jun 2023 12:10:47 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D48710C9; Mon, 12 Jun 2023 09:10:43 -0700 (PDT) X-GND-Sasl: alexandre.belloni@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1686586242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rYcn3RNmCkhTMoTm2euN2KhPgjvs1X0oq7hvMFkzhzM=; b=Q0x12Hn0KgaIHzqIKKUftOfcxtwwKuV3aZW/89yjqTkPUOCBiDkmr9OW8lBFgi8kmWuDsW eOdLaEHc2z0LCN+txJpzfdk0KREfJQw5GPd5lmc6xqPE42zQOZ0TGHAKowz9T6WKZs2AXp W8oLVolX/1d81v5JTk7HBVt4YiAwcWKv4pEJBSQodQ1w5wgpbnNGXhSBkwnoTlemQu7pu3 FM8vpmLGgrJ9WRs3zQIyl6HOPMxSt6Kj3MVkTZCcwvWyAzec0NhB9ugNt7EbYy6hK7V7Sv +WG8QZ9YzS/HaK+xIqIiNRhtaoSwocPpM2bxZY44mEVHMTPFRpdWDrqMjX1Pdg== X-GND-Sasl: alexandre.belloni@bootlin.com X-GND-Sasl: alexandre.belloni@bootlin.com X-GND-Sasl: alexandre.belloni@bootlin.com X-GND-Sasl: alexandre.belloni@bootlin.com X-GND-Sasl: alexandre.belloni@bootlin.com X-GND-Sasl: alexandre.belloni@bootlin.com X-GND-Sasl: alexandre.belloni@bootlin.com X-GND-Sasl: alexandre.belloni@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 0A02B60010; Mon, 12 Jun 2023 16:10:40 +0000 (UTC) Date: Mon, 12 Jun 2023 18:10:40 +0200 From: Alexandre Belloni To: Andy Shevchenko Cc: Rasmus Villemoes , Alessandro Zummo , 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: <202306121610404abc8cbc@mail.local> 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: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,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 12/06/2023 18:48:49+0300, Andy Shevchenko wrote: > 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). > register width is in the driver: static const struct regmap_config regmap_config = { .reg_bits = 8, .val_bits = 8, .use_single_write = true, }; > > +} > > -- > With Best Regards, > Andy Shevchenko > > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com