Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp55324rwl; Thu, 23 Mar 2023 12:35:52 -0700 (PDT) X-Google-Smtp-Source: AK7set9sDdey5sj1dgufqlHak/s5hIludFqdF7f/d/BHcsv1yuxsuusC3H8ZFm8ZC+aBYJgTYQa7 X-Received: by 2002:a05:6a20:b288:b0:dd:9848:a1a8 with SMTP id ei8-20020a056a20b28800b000dd9848a1a8mr711906pzb.16.1679600152146; Thu, 23 Mar 2023 12:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679600152; cv=none; d=google.com; s=arc-20160816; b=CaERwUo25QhJs76ur0p8Fn7vvHNv9R1kWSM6ONta9mK2jGOX8KFOmOsZ9UgqkoG4Rn vbRghmgEG6S7ecgvq83vqoFBj1slUeae+qcpiqLVhmNA5QyM6U7Z31rQiQPS851Elgqz gtxNxwypSFQOX/OlLkQZr1O5FVNO3O1NxHcUGnEd5mQXIYEumPhSHuNPgwm5yE2kRddx lGQJJ2V6RP+ZQNc9IWjxoiXWLeVtJEc/YY4lCDXY0bZ8eq3mfcLuNz+qkBvEWUBmngnn ylJzPzp3NHaEHDV/mfrKwA12y1wEPM4yqjw1YXcb9k4aI5bdtgnRuMKtup2BRYK22QUR TDSg== 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=Eiy0jwgBZdGjvoP8ZBOj+/dd3JzAbNmzrXq0dSQ7n8w=; b=KtBE8dN4y6srdcR07tsMZNjwfViWmwWQugyAkUKlyKvIGy4NJHXEZ1SvXWkpOGS8cH 7vriHwpTw7JlCDeAtnP7f5xXkWF8oXX3ojq79BavjBzQ83bouRuig1xHZ2q2JOPi97V/ LvNvDId1nrj6B5ENBZ19Qy951g5KfDNLfHfAGS7xDgEd1vpL5KPBeMPSpht3lU7cNq6b ECf1T+bREdEIwxxptG8Jot8cHYAoeR6hvqD/dsqWH/SsWeEpbZs/gHkCFabb3XVeHCEQ p9tcQJDrmmTjibLNL4ApZv7kt60Q+ttii5LTfwu87V5wpokzsNnm+30F8us9EjXueRO4 nWUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ucw.cz header.s=gen1 header.b=c8OPTMYU; 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=ucw.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q83-20020a632a56000000b0050f79f0651fsi12331862pgq.95.2023.03.23.12.35.39; Thu, 23 Mar 2023 12:35:52 -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=@ucw.cz header.s=gen1 header.b=c8OPTMYU; 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=ucw.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231475AbjCWTfJ (ORCPT + 99 others); Thu, 23 Mar 2023 15:35:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229773AbjCWTfG (ORCPT ); Thu, 23 Mar 2023 15:35:06 -0400 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BA30196A5; Thu, 23 Mar 2023 12:35:04 -0700 (PDT) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 199381C0E45; Thu, 23 Mar 2023 20:35:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1679600103; 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=Eiy0jwgBZdGjvoP8ZBOj+/dd3JzAbNmzrXq0dSQ7n8w=; b=c8OPTMYUMCLJcawejU9Rr358ez2GlkVrxmYQacvsZxRQo1lwcQkMrKXgXf4h0dABa3NPsB chXF62rUUL1qQm3gdyt5699RrEdtvi2pG5fTGNjWdekSi96MY9063z39VO6l6ujsRicU0M qCw5r1gbTOKdHXwTi2YqIrWpikWl334= Date: Thu, 23 Mar 2023 20:35:02 +0100 From: Pavel Machek To: "Lin, Meng-Bo" Cc: linux-kernel@vger.kernel.org, Lee Jones , Rob Herring , Krzysztof Kozlowski , Nikita Travkin , Stephan Gerhold , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: Re: [PATCH v2 2/2] leds: aw2013: Add vddio regulator Message-ID: References: <20230320174949.174600-1-linmengbo0689@protonmail.com> <20230320175150.174711-1-linmengbo0689@protonmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="59RaXGfovOuoCF5q" Content-Disposition: inline In-Reply-To: <20230320175150.174711-1-linmengbo0689@protonmail.com> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 --59RaXGfovOuoCF5q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > Some LEDs controllers are used with external pull-up for the interrupt > line and the I2C lines, so we might need to enable a regulator to bring > the lines into usable state. Otherwise, this might cause spurious > interrupts and reading from I2C will fail. >=20 > Implement support for "vddio-supply" that is enabled by the aw2013 driver > so that the regulator gets enabled when needed. >=20 > Signed-off-by: Lin, Meng-Bo > @@ -348,16 +350,20 @@ static int aw2013_probe(struct i2c_client *client) > goto error; > } > =20 > - chip->vcc_regulator =3D devm_regulator_get(&client->dev, "vcc"); > - ret =3D PTR_ERR_OR_ZERO(chip->vcc_regulator); > - if (ret) { > + chip->regulators[0].supply =3D "vcc"; > + chip->regulators[1].supply =3D "vddio"; > + ret =3D devm_regulator_bulk_get(&client->dev, > + ARRAY_SIZE(chip->regulators), > + chip->regulators); > + if (ret < 0) { > if (ret !=3D -EPROBE_DEFER) > dev_err(&client->dev, > "Failed to request regulator: %d\n", ret); > goto error; Won't this cause failures when optional vddio is unavailable? BR, Pavel =09 --=20 People of Russia, stop Putin before his war on Ukraine escalates. --59RaXGfovOuoCF5q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCZByp5gAKCRAw5/Bqldv6 8hkzAJ95xl/kGY8uKTWuWX12QJuhBM2uMQCgg21hmFNALojBHzMSFd7aDS+yVfQ= =646S -----END PGP SIGNATURE----- --59RaXGfovOuoCF5q--