From patchwork Sun Jan 29 09:42:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 49956 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1689846wrn; Sun, 29 Jan 2023 02:22:06 -0800 (PST) X-Google-Smtp-Source: AK7set/M+PSLuRqhgoi6iScCKoI48nYtnOIWeQ7Hcho7nMWoU4nAp+B9kZ8mn4RipsbT5hyMmFej X-Received: by 2002:a17:902:e14d:b0:194:d78a:fc80 with SMTP id d13-20020a170902e14d00b00194d78afc80mr3724655pla.61.1674987726342; Sun, 29 Jan 2023 02:22:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674987726; cv=none; d=google.com; s=arc-20160816; b=YohSui6nYcW47RLGEEusgOXV9F8cIE5VEiZBSHadVofNMcK0Ugxlz6/dcjM/OmUFBe 3iP89mYOh39tTgJ6QwIB+0iYLPd7pp5PTz4bFIjJXFQrke07pozqj/4b5+JyJLyiY9Sc rZipMyKPzMvIKvxv6EpkpGVy+tTDfsVDQf441FFTW8u9h5DTKwzaWICmDCA6KA3ioTbK LRN0GeHW5qRpF7Lu9obRuqIFyBblmbgDRWiCcVap4A46Bh37lLPIfwEa7Wu/3+w1H291 1bXBtCbVdx3GdQDAydHB2gTZyc/b3ANWZZuY+o6Fddo2pceLGnPY2tEm9txXzofz2JhA +szg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=E6B2aH34g6KXWjZuydpb5EgoV6jPXjQCvmNo5MaNj8o=; b=cQSSzSsfOynImJhQQReYi5hggW00Cfm6okLUZ1h1mpFkD7/i90LT4effMGmGFXzInL GgzbmKFJrFNrWjWSNL7wi4vKZa29+PYGILPjiLmVRng0khaPopg5BRQiDdxkVSFAWtZY x6mI+VB4FmWAvM0H0CjJdLnJCbNCP2MgRJbgXi9QwN13z9Vl9bBHv2mUOdsIjUaJ/1L9 XY5a/g8hQnNtRgLE/ZCNGmhcDlmDeIpVjny3Iqf5XOdX/FwrXBl76PjNbnHXhqpUMwCO iNrufCHg2xLIBdCpjrGwGYM4xUM048uNZeuTxJFsYDIjImldC5CV+Q4VX3tXEfOPU8pZ eV7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@z3ntu.xyz header.s=z3ntu header.b=ivN5DlAa; 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=fail (p=NONE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a170903230900b0017808c0aa8bsi11305392plh.115.2023.01.29.02.21.53; Sun, 29 Jan 2023 02:22:06 -0800 (PST) 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=fail header.i=@z3ntu.xyz header.s=z3ntu header.b=ivN5DlAa; 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=fail (p=NONE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234573AbjA2Jnz (ORCPT + 99 others); Sun, 29 Jan 2023 04:43:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233753AbjA2Jnw (ORCPT ); Sun, 29 Jan 2023 04:43:52 -0500 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC4BA23326; Sun, 29 Jan 2023 01:43:32 -0800 (PST) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id A38ABCDE1D; Sun, 29 Jan 2023 09:42:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1674985371; bh=R9ZNv09De8WL7qrMjmRnJkXWIPy46lSI3OBIO9SIMXw=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=ivN5DlAay/Hh9eYY92OY3MiwQqPK1AZ7vS/IK61LJjgNMI6thBRPgHCA5D2b+LGxb NCP0ts+2Ma8ytP9ZE8hebnc0y2dqimIG9T1O2LB7pBlym9mAsv//tZwbr8Tv2F2zez 96/JiNP5DRVYD1P0FPccJPzeXtv3wLVLO9bQL0pI= From: Luca Weiss Date: Sun, 29 Jan 2023 10:42:35 +0100 Subject: [PATCH 1/4] media: i2c: ov2685: Make reset gpio optional MIME-Version: 1.0 Message-Id: <20230129-ov2685-improvements-v1-1-f281bd49399c@z3ntu.xyz> References: <20230129-ov2685-improvements-v1-0-f281bd49399c@z3ntu.xyz> In-Reply-To: <20230129-ov2685-improvements-v1-0-f281bd49399c@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Shunqian Zheng , Mauro Carvalho Chehab , Jacopo Mondi Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=894; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=R9ZNv09De8WL7qrMjmRnJkXWIPy46lSI3OBIO9SIMXw=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBj1j+Xi0vA9+m7kad3e3/xYUSgehrk6D7zWpUwkTFv iITbT3KJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCY9Y/lwAKCRBy2EO4nU3XVoIVD/ 983IJ5BCQZ0Uw820dThLSGKfcgcUMb1aHUe5yyai4hN92eHKNAfpkEN9h2/xtYCW8CyTfzEci07FYv eONEJWos9uWfzxoC4juKEhAJ70KMPOicze6zCVX+c5++oEht045JWULh/9rjM+Sk2qHalWwOHTlQ+H N6FKv7Ya1eJtzzhvr5SuOf0DqpF+NXcqQmVKtmAQ1BuvAo1LV+PGDWElLi9lvOAREJmRelQMMScgtS nKJPSdGI+jvd+hER+/qTvvbm67Q6GSi7YsnFKUIcgFFe72yzqQ5IpEARyPpKqqcZ3y4E4nMU/NLYrz bWO4JtHyAM5866EX81uL5JYoziFPSgq62Exf7Fa4FdgUuieAMAD8ARKg+Muz/2yH5CmvlkH71VuvTh sp2MLlk9ekO4bPGVSJUkLUXU5Fd75XSiDxCnk0DZAis+nnDJNHAcjgZo1T1rdzbu5iwh2fWh5qT8P6 /oqjc49GMZljZxcVNFMeJRmrXGkjgb6hJgCPYDv7vhP7483tr+qNeyll/h8eJrtVzfakw8xll78lGV +kD2QuDihaxxWxXwI5cZHMOzuptkpo5NM9jPEHYGE7pKKzBDX9IH34XmymTO7TfvEcNobxkt8UnqHf ZSZ4R4C8RXog4eSqzxviCtVhPEHd+KVCsttRqp/rrOl+C1W6nSjYBMJyJHLQ== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, SPF_HELO_NONE,SPF_PASS,T_PDS_OTHER_BAD_TLD autolearn=no 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756351929715062013?= X-GMAIL-MSGID: =?utf-8?q?1756351929715062013?= In some setups XSHUTDOWN is connected to DOVDD when it's unused, therefore treat the reset gpio as optional. Signed-off-by: Luca Weiss Reviewed-by: Jacopo Mondi --- drivers/media/i2c/ov2685.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov2685.c b/drivers/media/i2c/ov2685.c index a3b524f15d89..a422f4c8a2eb 100644 --- a/drivers/media/i2c/ov2685.c +++ b/drivers/media/i2c/ov2685.c @@ -734,7 +734,7 @@ static int ov2685_probe(struct i2c_client *client, if (clk_get_rate(ov2685->xvclk) != OV2685_XVCLK_FREQ) dev_warn(dev, "xvclk mismatched, modes are based on 24MHz\n"); - ov2685->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); + ov2685->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ov2685->reset_gpio)) { dev_err(dev, "Failed to get reset-gpios\n"); return -EINVAL;