Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2994387pxv; Mon, 12 Jul 2021 06:57:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlKx53i2OLWxYVp5ofmMRNY6IlJVTSheVTgHuTy/xR372d/p5Mh0tU55UFqP+r9dDIvruS X-Received: by 2002:a05:6e02:1d9b:: with SMTP id h27mr4460118ila.23.1626098274075; Mon, 12 Jul 2021 06:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626098274; cv=none; d=google.com; s=arc-20160816; b=ciQGDs/9Yt4n9sANr0uT8EkHnXlsCuMO8/RjNjh+OEKNGSaaxj9+DlDTrM4PO401CB fTu6AuhhWq8q4zny52yO50Dq3sdg7VelEAVtvjDpIONb2RL9okAXgmwEF7/aMOXjLbU3 mpTnRECpBhBdj+meiyj8vgxcQhhVXX+a/+deRGTdHcb+Du99eaV+17A3GaskkG9O0/xQ CqDp21pl6Q7ksnOe1j/8KCzyqOLVYsw16T7s4FuiNlMsOtQgyS3EwbmwomALKVLJxbvY lFDBkqHyGe86HyL06qD+X9urTrbYL/h2GB+qmhPRckgzDQAxaeK/yACpdyKg1zVYvAX1 nAqA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=sd9Wcz/QMtZE0mm9Z+JsQ4znaJrnaPqRYCaJddEDaYo=; b=Lu9M9a5h2t9S/JdIxcplYI+W8UWP64+nIfekwqdOSSlv2L4oF4NaDg3oNnLv94K8CV TV/+SJO7YPwoHuZWqNcizJSzfzI3qSFGFX0/85nymKkhOlz/CEYQlAMD2nDPpJflnVvL 8i7KHOoEx9m7grFr5lzle0yaV6MKctzvYe7GJpaUDRf6Dn7HeKZxkBS1NwyekhBq2n6o RQqhEI3V4xUNIX8xTaqdv1xnTXprmwhvLe4Kbjg0d3oauF8+0x+6D3pSWLatYvgitfrH O5tU35+ui+3imeKxoDughixSGSGOTi2DS2e49bg0/EXRV/SSJvRtnDIxYH9Shy1TMRyn Fqkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=odfjbn5G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 12si18663079ilz.15.2021.07.12.06.57.41; Mon, 12 Jul 2021 06:57:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@gmail.com header.s=20161025 header.b=odfjbn5G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233949AbhGLN7m (ORCPT + 99 others); Mon, 12 Jul 2021 09:59:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231721AbhGLN7l (ORCPT ); Mon, 12 Jul 2021 09:59:41 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B3D7C0613DD for ; Mon, 12 Jul 2021 06:56:53 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id a127so16456393pfa.10 for ; Mon, 12 Jul 2021 06:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sd9Wcz/QMtZE0mm9Z+JsQ4znaJrnaPqRYCaJddEDaYo=; b=odfjbn5GCbGSlPqua3Ful+3k9w4wUiOERTrPn1KBK9B+zP546xqFkJ7QuXOx+k+Wua a2gR0nhdFbw5dL3pnP/diggI4Cze9/23cGTxQKQLp2r/gi+PNqgAmorpbfBvpzIPnJLZ iAReBzJLy7nL6/M/Lrno7/9SCZO9pRto0tXvdzNm8IqrhKdPOisFGY6VX2pq8e+75NjS Iof3JiUvmHgS0v9+1erm/RgtpM/3vMudAxHGf9x/7Pkom20zq+nQNbT3YP+8dN0I9sMC tD05JA3b3o2kKE3vO8M4rcCtBNTAw+TrDtc/PKWMH7TNtikiB03GpnYX+s+wV7A0ch2B Ryog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sd9Wcz/QMtZE0mm9Z+JsQ4znaJrnaPqRYCaJddEDaYo=; b=g/bRay8vdb+M8+V0Il7Wh+SuemLoCNwE6tcPyNzHGx7GMS24n0N5hyBoH/kj1/qr7/ WtNpo1XRg5PdmIOYbQXwj3vM6Eu/9cRfN7saSpL9fHhoPMjlaAQAUgyvnUJIGUCOxVVX esvK7QIHFfwLBj3UxvOBxG0E1BAOZNSx04ZISai8p6RQs4hqmn4ED84dzImeTYU1qm7k qw7yyun0U2IjXqKsFaVPClW9P+VQAqlpW4/6s1xZK+LhwZ8bS+2Ae6xqmkN2eo9F4vEg /e7Rwjw6/o079BVJsaqGzFOPsMISFLACT4/ix3HQD42X1MGvVZhjtlZlKcq3t2Pu5zpp GafQ== X-Gm-Message-State: AOAM5329N/0uESJ8Vt+PN6G1b+FI+zze6spEfwSU8x7VvVHOMPgqgE/c wwEvgcYHsCRPfHnzRj4B9kg= X-Received: by 2002:a63:da04:: with SMTP id c4mr53548344pgh.348.1626098213184; Mon, 12 Jul 2021 06:56:53 -0700 (PDT) Received: from localhost.lan ([2400:4070:175b:7500::7a7]) by smtp.gmail.com with ESMTPSA id 133sm16973141pfx.39.2021.07.12.06.56.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 06:56:52 -0700 (PDT) Received: from localhost (localhost [IPv6:::1]) by localhost.lan (Postfix) with ESMTPSA id 7C1F79008F9; Mon, 12 Jul 2021 13:56:50 +0000 (GMT) Date: Mon, 12 Jul 2021 13:56:49 +0000 From: Vincent Pelletier To: Adam Thomson Cc: Support Opensource , Liam Girdwood , Mark Brown , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5] regulator: da9063: Add support for full-current mode. Message-ID: <20210712135649.45983c5f@gmail.com> In-Reply-To: References: <9d5decc6d5b15702d0e1039f8c9bda51d9a4d630.1625740324.git.plr.vincent@gmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Thanks for the review. On Mon, 12 Jul 2021 10:42:26 +0000, Adam Thomson wrote: > On 08 July 2021 11:33, Vincent Pelletier wrote: > > + if (ret < 0) > > + /* attempt to restore original overdrive state, ignore failure- > > + * on-failure > > + */ > > + regmap_update_bits(regl->hw->regmap, > > DA9063_REG_CONFIG_H, > > + overdrive_mask, orig_overdrive); > > If I2C is failing here I'm not sure this is going to go through and you have > bigger problems. Not sure if it's really worth trying to roll-back at this point > but maybe Mark has another view. Personally I'd be tempted to just ditch this > and just always set the OD bit in this function, rather than trying an roll-back. > Will be much simpler code. What I have in mind here is regulator_set_current_limit_regmap rejecting the change not because of a bus issue, but rather because of an unusable min_uA..max_uA range. I add this to the error handling path comment to make the intent clearer. But your remark indeed fully applies in the case of da9063_buck_set_limit_clear_overdrive. I will keep the roll-back codepath for the next patch iteration, but I will drop it if the consensus is against its presence. Regards, -- Vincent Pelletier GPG fingerprint 983A E8B7 3B91 1598 7A92 3845 CAC9 3691 4257 B0C1