Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp209318rdb; Thu, 19 Oct 2023 01:57:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFIwsOCzxpbTQlW+c4kd3kwx779xoak3BEVvdxPZdo21Tyod192P5mhDqSVIBKerqYDU8SZ X-Received: by 2002:a05:6a20:e596:b0:15d:e68d:a850 with SMTP id ng22-20020a056a20e59600b0015de68da850mr1294454pzb.29.1697705863993; Thu, 19 Oct 2023 01:57:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697705863; cv=none; d=google.com; s=arc-20160816; b=hbujoc0bq255DkLApwHegqQQ1Rd2Y0/pR0v+ETwjI4dAWmpBZJkHyIp7EMcJflBPwJ Jwnc6JW2+7GJ+JnntfXYi5DjWu53b77iJxIWAbjm8xELF6g3fwlKjY6IpeAgE5Gmvir8 WoBl6kR+806dAZM+yFk4qItS0mPSXzEtwbni0rcFOibL90A251nnIfabMNICOAowQ/D7 HeGUCZgb2NCXunYZcduMygZExsRrYkt8MvVvbW7Xdv4gAxd5paY4jvvcAEya1IM5iQf0 DePziW0U3AvQL9Z+rUOvWa3JeplLX7m9i7rzo5v0zlaqzlhHVaOPLj4RwyhY2QspiT7x ulXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=kfG7yXeQOrqyeFt+i2oHLTbkjrUziurPpvi/iRBx44E=; fh=k8rcVvHEim30WRJ/pgo5N//4w/KsFmMmNgKKuu3aMyE=; b=BgpzTWhFZPjvOLUl2U8WeOrPHuo4RDlqEli5x+XjcnHMu8v8P/vqktNzfduXTOa4NS qDdDYqJZ2ml/rTQ+W7jApbh2cnx9YR4R3qaJ3w2BykM82Cep5oah4wKyGi7A2Qz87Xmb Hh7sydilXF0gTdzPVgKsNI8y8FWBt1qs9UWrUKG1aWV8fmvqgbUG38hjOelYczZnD31B Txf2cP97Pr/HjT5/UYN1LKXUv+ZhTQGAFsGzNn8z1Y9Kig4SgAQeT3kUDCgeeXw8j8GK X5LPeE0xpODRgUvbvrmZ2mjM3to6r2h/B+aCDWi09e7h561OZKDqMqRzENjCuxAB6dS6 FwcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bonkjiQ0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id d8-20020a170902654800b001bc162f3318si1617877pln.640.2023.10.19.01.57.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 01:57:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bonkjiQ0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id AFB4A82DEE4B; Thu, 19 Oct 2023 01:57:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232966AbjJSI5f (ORCPT + 99 others); Thu, 19 Oct 2023 04:57:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232788AbjJSI5d (ORCPT ); Thu, 19 Oct 2023 04:57:33 -0400 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0244C0; Thu, 19 Oct 2023 01:57:31 -0700 (PDT) Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-66d0169cf43so49128196d6.3; Thu, 19 Oct 2023 01:57:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697705851; x=1698310651; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kfG7yXeQOrqyeFt+i2oHLTbkjrUziurPpvi/iRBx44E=; b=bonkjiQ0JIVAwQnFa1DTsOOFp7qQrGqZwFu/RSHewtIvUoXSjyexpkj+U4FBz4jB0r /0J3tEh9ilXMsIXC7lDpnc2FRM6oUAc2oyMOUoqcLYYLih8eegaTq5hdArjJmaBawoXX sYLGeO2a4Vj64seNkrzdZRimrd8TTTh0H+gmIU8HHCARSLXm26GkWL9Cp1HAJXaTr6hd SPilRfbCoWquaQ4mssgHPaI6B0OKraCqQY5vI509LjeWHoSer0jyFkTsfsqTV7HNXYxZ 5YqJgTgjahpmpzyIbrKgBpsdMTq9W0mufvci6ry60zTv7zL5j046CekqP5yCc/BltkUf aqxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697705851; x=1698310651; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kfG7yXeQOrqyeFt+i2oHLTbkjrUziurPpvi/iRBx44E=; b=NcJgxugHYg1t7GxS6UzPpM6HwANXDQkjsed/ZKNm5LVLplfLCivjEops6PgQjO8Itx CX6Yo/Iz/4arprmzVSGMKgZWdGEpJygRO9AY2rPy8EdZGenDIG1kbTAtqASeOe+1QkoS JV/R3d8x6iKPYPjFh8Azm9Ckz2xiyQeduvR7cxArfINqMvwWkLDivkHOpAnWiT3TcPfM Eue54CrWZUmawQVVnm3TgTH1Jtu685MvAZzP71wJXqrRlPREpPUmNzqyrVisV78Mqsxn bLHlLYhDzaEhvPX5QX0tp8lYldlES6/kd8GVkZfKD+JIGp5Li/1bEfTYgoC6KlNc8DgY FCLQ== X-Gm-Message-State: AOJu0Yw6Y6G5yfn5TGkhETsTht5H2Rf8f6PvXTQLGSNvrkoMpRlNQUV1 c5jmGuAxio6a5hbBB0nQ4GeXHm1/gia8F4CVCWGteEcYW6M= X-Received: by 2002:a05:6214:cca:b0:66d:20f5:23cb with SMTP id 10-20020a0562140cca00b0066d20f523cbmr1830308qvx.5.1697705850902; Thu, 19 Oct 2023 01:57:30 -0700 (PDT) MIME-Version: 1.0 References: <20231018182943.18700-1-ddrokosov@salutedevices.com> <20231018182943.18700-3-ddrokosov@salutedevices.com> In-Reply-To: <20231018182943.18700-3-ddrokosov@salutedevices.com> From: Andy Shevchenko Date: Thu, 19 Oct 2023 11:56:54 +0300 Message-ID: Subject: Re: [PATCH v2 02/11] leds: aw200xx: support HWEN hardware control To: Dmitry Rokosov Cc: lee@kernel.org, pavel@ucw.cz, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, kernel@sberdevices.ru, rockosov@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 19 Oct 2023 01:57:42 -0700 (PDT) On Wed, Oct 18, 2023 at 9:29=E2=80=AFPM Dmitry Rokosov wrote: > > HWEN is hardware control, which is used for enable/disable aw200xx chip. > It's high active, internally pulled down to GND. > > After HWEN pin set high the chip begins to load the OTP information, > which takes 200us to complete. About 200us wait time is needed for > internal oscillator startup and display SRAM initialization. After > display SRAM initialization, the registers in page 1 to page 5 can be > configured via i2c interface. Is there any Documentation update for this new binding? ... > + chip->hwen =3D devm_gpiod_get_optional(&client->dev, "hwen", GPIO= D_OUT_HIGH); With _optional APIs we distinguish 3 cases: found, not found, error. And error can be (among others) the deferred probe, meaning that GPIO _is coming_. Hence the rule of thumb for the _optional() APIs is to check for error and bail out on that condition (note, it's applicable to any _optional() APIs, not limited by GPIO library). ... > aw200xx_chip_reset(chip); > + aw200xx_disable(chip); It seems it can be modeled as a (GPIO) regulator. At least many drivers do so, but I leave this to the maintainers to decide. --=20 With Best Regards, Andy Shevchenko