From patchwork Wed Jul 13 15:05:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2133 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0723B3F1F7 for ; Wed, 13 Jul 2022 17:05:13 +0200 (CEST) Received: by mail-wr1-f72.google.com with SMTP id t13-20020adfe10d000000b0021bae3def1esf2225933wrz.3 for ; Wed, 13 Jul 2022 08:05:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657724712; cv=pass; d=google.com; s=arc-20160816; b=dd8CzCSjn6DsyREiQhQQVqcmFEyhd6LNu7HEpzAXXx0oP4Y8Yn0vKjbhySzaZHvJQB ba/TrSim+q42f8XIvJZRlJMQY/RSWpHKO4F9nUw64J95YyERBz4cNmWHXJy+EKB/fxZ4 ocef4DB0xN/PYmgyk3N1FHvXDoYMTc9pMfZmoMYT8LBPUEpiZv/8oIx0ruccJ4GvwdSr N1fb1TX9Y9UsSIZ8x+KUS2laztKckIhpKClvKUIYLZ+//6ocrnGrqqrsQNAkHoTaMjdm x8fBaDdANpTV5HUx/D/vOAh3/jwf84MHTbgHgsdn3DpFHL9g6Ik47+wP9Kg6YVQHDd0s Z+ig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=GJGtdhRH8kSjpKIGACFev1ZeFEfzoao3nqEaHO6Fl0Y=; b=U79VvJPcN1/nUmXdI0us1HrL0iw0jBRn9rPy/9T/ubhysptGs+LtefsVkLLPAL0Z6A rs6/rLED5w2C+bzM0PpeS5eJAltrpDo5i4BR8Mnyii15R9fL8cYs5TnumTYIh8g9Nmxx JHiOazhUZznaunxeVY6eCYpBrh5O0AuK8nKBHA65Kbp9zFaIZJHItqc2pnA0KHPrfiuR 8ScYd5FQ0rvEIsQPPKVXPP98pm3DGVURECqp55M4GNcWhympFaxPP1PxEVlBxmNCRCj9 pK4lU/sfBjWhJ8Blvk05ifQXh7NS858BfVUtHQRXQCdFa5B+/XikePzpNnfsixzVq0Lj ANuQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gUbx5q33; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=GJGtdhRH8kSjpKIGACFev1ZeFEfzoao3nqEaHO6Fl0Y=; b=Da8N3tc7MLhXyE0qmbDbBu839vUoevZ/zXDcJfu8G8PrgrDpVsLhGMhkTgEd/Td5/a FROeqN7TPF+Y04rKwbKCyYMChFCei/oPzynqz/+SmuXyCpTQH8NA/VYUF3N+mV2NI0FN gHJ5qUcJkD/3GC/SWoewXiZs0jQsnk0CaWVv8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=GJGtdhRH8kSjpKIGACFev1ZeFEfzoao3nqEaHO6Fl0Y=; b=fjAqkKI7V08t5VlfwS/+WQuNg8xGkfEV6CAf7uU/cALgCvnaNj6VHDORw/WkbjxPhU SiklO+jPW0XbdU4j0SmaZFQ/91epHz/IrUXSdjODlyXTFOIod5cW2kFRLQ2q2+spzTQg PGYJCMRotinGj8ryMZK8ZOD8N3VDOiEX/c15rLmZ7zHyboBbqfQW6cNFeM4P8ZBhNf/N ktDxNCkCoiRgDLlVXtz1i7Tl2OHUSXkzlzVUNYPcXHKXIz2dZAaq4hi8zd9HjTamJof6 Z5ejjAdqLIQyzcW7ndCtQcrvhkA5zKiJZVSrnqlBjqD7aU0X5sG1f1HuGKF61cSsOfkl 2q2Q== X-Gm-Message-State: AJIora8XIFzIpcZjZJypZ3xaCKy/v9zLn/omJJWa6FxowysWryx476eH eXCO97YKu46zfEpoQAZpPGjd2PLu X-Google-Smtp-Source: AGRyM1vuHfDAxGK1U+/PXk4Icoto9Oz8yMtlICzcFpJTz6UVV0V92bg1CZWd2+f8MhRsqe7u0gxvnA== X-Received: by 2002:a5d:4345:0:b0:21a:3b82:ad57 with SMTP id u5-20020a5d4345000000b0021a3b82ad57mr3874492wrr.176.1657724712735; Wed, 13 Jul 2022 08:05:12 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:1e88:b0:3a2:f0cc:bc47 with SMTP id be8-20020a05600c1e8800b003a2f0ccbc47ls2323972wmb.2.canary-gmail; Wed, 13 Jul 2022 08:05:11 -0700 (PDT) X-Received: by 2002:a05:600c:1e8a:b0:3a2:ee8a:bbc9 with SMTP id be10-20020a05600c1e8a00b003a2ee8abbc9mr9303121wmb.6.1657724711577; Wed, 13 Jul 2022 08:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657724711; cv=none; d=google.com; s=arc-20160816; b=DrlvSMuRFqb1etxSMV3F70HgfA+sT/Tw5b2iQphbD0o+nCZqsCKu1cul60Mnd0wgSw UlDN1boaXmf8N7mZEtJekkxnq8wUgfjfmqg3sm95CHRfBovcGFYoRJ2YispWDbKyW8jx zpkF8P+E+N4Rd+knuhicpyfYINvl877t9T9Sm0lc9LygCda5ab+7hsd52O5/3ZhR8dAk tsGWxX0wIO9BoJxwAMEAUoIjhQrjEN1hXMlDTAnKWTRX4T6SAYM3nNuMsKJtZ79a5W0N 2N4NByzkEzbL/Qu8wjrMYeiTCrkjXIyFUFgp8ii3iPviImBEo+Db9jbCfTqBky+V/Ykl JVGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jE26kz8uLkTSQmG0BFSrQuTDJo25o/aqMTxY60BA87o=; b=P3u7Q9AkAPbAy7WNCxz5Lx1pIx7QsG2FpI1e30l7kSItk/4zoNjkAb/Czc3WAVhSsY Y6V8TuPhn8mz7i6B7m8fakTjLzruKOgVX4dlYF7XLsnHoLu2hG63cj6M6JU8NPognLUn /zrLqe+98M/vE9aAM+deZMEsHf2GvDUcmN28/aA5pwLE/HRWbR9FN4LI0XJQs+7RzQSS sAHu6oDQIZpZMVWpKiRwAFybYgou+FWy2uadXAnnm/REZ1jebwiEf5luzikdzuRi7QJL gLjD91LvbjoYO2oiYigZHVDzLWZZ/YV9axUFT6vQdDulkazRkurUy+T+nQLQMFOhGY+v 9KEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gUbx5q33; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id j40-20020a05600c1c2800b003a2e6339a2dsor580193wms.39.2022.07.13.08.05.11 for (Google Transport Security); Wed, 13 Jul 2022 08:05:11 -0700 (PDT) Received-SPF: pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:25ce:b0:3a2:dd48:9b33 with SMTP id 14-20020a05600c25ce00b003a2dd489b33mr4202758wml.134.1657724711316; Wed, 13 Jul 2022 08:05:11 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-7.cust.vodafonedsl.it. [188.217.51.7]) by smtp.gmail.com with ESMTPSA id f17-20020a05600c4e9100b003a2d87aea57sm1465537wmq.10.2022.07.13.08.05.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 08:05:11 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Jacopo Mondi , Daniel Scally , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 1/6] media: ov5693: count num_supplies using array_size Date: Wed, 13 Jul 2022 17:05:01 +0200 Message-Id: <20220713150506.2085214-2-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> References: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: tommaso.merciai@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gUbx5q33; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Instead of hardcode OV5693_NUM_SUPPLIES in a define is better use ARRAY_SIZE function to count the number of supplies from ov5693_supply_names array Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi Reviewed-by: Daniel Scally --- Changes since v3: - Add reviewed-by tag, suggested by Jacopo, Krzysztof Changes since v4: - Add Daniel reviewed-by tag drivers/media/i2c/ov5693.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index 117ff5403312..f410333c4c67 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -127,11 +127,15 @@ #define OV5693_LINK_FREQ_419_2MHZ 419200000 #define OV5693_PIXEL_RATE 167680000 -/* Miscellaneous */ -#define OV5693_NUM_SUPPLIES 2 - #define to_ov5693_sensor(x) container_of(x, struct ov5693_device, sd) +static const char * const ov5693_supply_names[] = { + "avdd", /* Analog power */ + "dovdd", /* Digital I/O power */ +}; + +#define OV5693_NUM_SUPPLIES ARRAY_SIZE(ov5693_supply_names) + struct ov5693_reg { u32 reg; u8 val; @@ -352,11 +356,6 @@ static const s64 link_freq_menu_items[] = { OV5693_LINK_FREQ_419_2MHZ }; -static const char * const ov5693_supply_names[] = { - "avdd", - "dovdd", -}; - static const char * const ov5693_test_pattern_menu[] = { "Disabled", "Random Data", From patchwork Wed Jul 13 15:05:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2134 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9EB6C3F1F7 for ; Wed, 13 Jul 2022 17:05:14 +0200 (CEST) Received: by mail-wr1-f70.google.com with SMTP id l5-20020adfa385000000b0021db73f5818sf1038661wrb.20 for ; Wed, 13 Jul 2022 08:05:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657724714; cv=pass; d=google.com; s=arc-20160816; b=JRXfEXq3hs+IuZcnQelOTxyn0vZkPn2aUa8qLoVAN5aw9fXgr2ogcbZXToWv324VTC 9fvqHK1vdIfb6anqx3c6/94FACz/0MzSQiAvH3KXYHFZkYCF3bBLJKG92WZkq5a7qWXh 5RilVcQfSKqcJ/i787lL+AGtX6OtclQD8cK+jJ6/ncTCpJAHQkICGHEj9yTF9gSslU0o GIbh5dE6C4OCNxgrniCsMJgaUAIQtcFC4wiQm21eLDojN2SVAWyLVQuKTJ8bhpG2P0fS Zey2lfuxssMkyB4s8s3iVyxGSI/VIDbJLo8tSrWyMezUDER+QBLkd6uFR/jitvm4SZk0 jWcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Q1SwWHueIejNOtDaSYnWTOi92vXbe/81Vc7zGhm6Mws=; b=Rk7KwYSZc+m01j6Nd/vkSXNit7hth7XJLbGSwGFz4p9Smu7fCnwoK0L51gL8Qtd7qc IyfFJUINItqNsfo/wisz88PkTY74PreN6tapGe1a8T0uaRLzLZDjpLY4zNrIGklx5L0U GpezNySnSLCHi9dyISTXDEutizyDY68rWfqGE6r74X4L2vffGfVKj/W5pHdOT5IBy5ku 3hoUxneNm/G6YNHb1LSINB4ZUCnsd4e4PWNnMHyyRSX+ikgScRLeAo65WGJ83zRqqQL/ 33AX9h/PNxB2aOBxTpkeS+w2NIPsW7lil48W3nHEPCMHxD3TXpoO0YRHIm/XJRoVPst0 Fv8w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AM60TdZ8; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Q1SwWHueIejNOtDaSYnWTOi92vXbe/81Vc7zGhm6Mws=; b=DPIaYYYyfPx9/tyAccukddJ13mw8GUKw2EVYrA0IpbBUUsE4MphJtmz3p2xU2GujB4 uT62pGYgd9eFc2xwXFMbBw892INaqQYTZZoQ6X7WavRYrTy9iOcr8KnPV1vozkl+o9qp xFeaKR1ne7NSXymK7jkyEajyLqAvjqaVK/+JI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=Q1SwWHueIejNOtDaSYnWTOi92vXbe/81Vc7zGhm6Mws=; b=3bBWyZQrLBlQqsHLsvM9eP7fRbde65EJ439POqnOBs/G5o21g8qoP6vAEPO+94tDKA J2YnSQGNbmKNaMEIhz2tXnNnwvy2uQFTfjD46fSnt8AL86nOoHX6mukKQunfdfJX5Yu0 H0+so9vKVe4NbXu8UDMVe8yo/uw/niPSXwvc4PDT2lflqEkXYFjlxn6W9ENXCnUrUY6+ xBKpQjwRZre1hSYK9HMSaxq3xe8YMYX7/fgQ07Gyffw6dgWm3Jsf7emF0bw4JIcEAQoq DhmD3NHcPA/SBtW3vld0jlLvZaHEeinGmQNHFcyUCR0V8N/m27Ofy5suek+u+3sDgH5Z xpig== X-Gm-Message-State: AJIora+/7CikkMCEWvzaRMIAcuqTiHbk52ozw0g21y+s+ivhY/nqy0t7 FbgKqB7DPjYW7+F/0mHFZAx44c8X X-Google-Smtp-Source: AGRyM1tbPf6PAzC6yeAzfIqmgF+Wa/4MMKPRENy2oemJydszlCFtPp+ZyO/XctMZ+5DO0UoA9N2Kaw== X-Received: by 2002:a1c:3541:0:b0:3a2:e2e2:d80e with SMTP id c62-20020a1c3541000000b003a2e2e2d80emr4169886wma.184.1657724714422; Wed, 13 Jul 2022 08:05:14 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:1e88:b0:3a2:f0cc:bc47 with SMTP id be8-20020a05600c1e8800b003a2f0ccbc47ls2324041wmb.2.canary-gmail; Wed, 13 Jul 2022 08:05:13 -0700 (PDT) X-Received: by 2002:adf:b1d9:0:b0:21d:99c3:f5ca with SMTP id r25-20020adfb1d9000000b0021d99c3f5camr3744945wra.45.1657724713084; Wed, 13 Jul 2022 08:05:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657724713; cv=none; d=google.com; s=arc-20160816; b=ZWBmSBBVAcZljKUkPL2ATOm1QuswHRH1+Su4N++ZZTgFcAjRAzLsWvi+1UiAxiJ/hW x2vDZzDYdfUvwW05ugmm+sE9jHHqKsi4Bt8/iRBA1rJbuTkwt1P1mTUzd62mLxCg+P6s sMHA1PrfS5wOOf+o3c4yIv365POgP/7xdm8f7NKA+6p6gAfsLiCiagPxkNYoswe+vL4r wd3/6IPwmJ4zv567MmWNNhQEmSfDxgke8T7fPMW/yEs92v3BsErb3T6NsRueDQM2rXFj S+ySUlC823jg9csQi6nLgu/By52YZ76L4S/+M3L0wql7a8cUN0nWWuR45atHlWxJwH6+ AtqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=REFGbYhE8dpEN5VkA7iNJtkkSRmeBAdrouvG3pc5rZ4=; b=kQ+fcZMStH75Uzt+CDw+TF40C6+Gm9c469BArLEHWy2CYSxjar9XvXreStoWNGkkGQ bwzWWlD2CU6/6MSlwptTbNO7brvQ31nGMgJaREnswGICHY9ATVPDry2p2vuWz4NygKol dMmQlKvwsyoYYGmVZTIWjvBvt+uDm9GVIOPYxyGSbseKC/VJpROOOhCf/qB39srpeL1D pMXHWxaWC+OLlmnoa0tfwnSwmpgx552F82wwOOVBwGbiQGb4c9nSjKiRXTJ43A2pdIVf /lgPweWdZrymDU9PqZ70OM7j3pETXhIfvJjFY0OTYcwGMN/BoK3AW7rpn0LAWMAs+GVl xftQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AM60TdZ8; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id d1-20020a1c7301000000b003a04f99ef05sor594623wmb.45.2022.07.13.08.05.13 for (Google Transport Security); Wed, 13 Jul 2022 08:05:13 -0700 (PDT) Received-SPF: pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:4306:b0:3a2:e9e0:3626 with SMTP id p6-20020a05600c430600b003a2e9e03626mr3979142wme.175.1657724712868; Wed, 13 Jul 2022 08:05:12 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-7.cust.vodafonedsl.it. [188.217.51.7]) by smtp.gmail.com with ESMTPSA id f17-20020a05600c4e9100b003a2d87aea57sm1465537wmq.10.2022.07.13.08.05.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 08:05:12 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Jacopo Mondi , Daniel Scally , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 2/6] media: ov5693: add dvdd into ov5693_supply_names array Date: Wed, 13 Jul 2022 17:05:02 +0200 Message-Id: <20220713150506.2085214-3-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> References: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: tommaso.merciai@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AM60TdZ8; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add missing "dvdd" (Digital circuit power) entry into ov5693_supply_names array Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi Reviewed-by: Daniel Scally --- Changes since v3: - Add reviewed-by tag, suggested by Jacopo, Krzysztof Changes since v4: - Add Daniel reviewed-by tag drivers/media/i2c/ov5693.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index f410333c4c67..9e84468d920e 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -132,6 +132,7 @@ static const char * const ov5693_supply_names[] = { "avdd", /* Analog power */ "dovdd", /* Digital I/O power */ + "dvdd", /* Digital circuit power */ }; #define OV5693_NUM_SUPPLIES ARRAY_SIZE(ov5693_supply_names) From patchwork Wed Jul 13 15:05:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2135 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 29E053F1F7 for ; Wed, 13 Jul 2022 17:05:16 +0200 (CEST) Received: by mail-wm1-f69.google.com with SMTP id q15-20020a05600c040f00b003a2e5c8fca3sf1182792wmb.7 for ; Wed, 13 Jul 2022 08:05:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657724716; cv=pass; d=google.com; s=arc-20160816; b=rzl7Gat/WkFqHRXbvxbJtOr319tmK2MW0WEBhwb1UHeYbCIvz0CVnSZYtxojdAlHXt odA5Bayzl4DW+e25NMjHyd3nzW+uewkOPnaQ7LtOQka9hzc9iI5xgOE/m9/PC/L59UqD XXGLYwzzWMqtvr8hHzt5AM3Bsynw/u1mMUu2Z/V2Pdc9x82wRABhRNQ5fXWqPlxEjpXu I16voqqwYgicNEmGNbJKP97c/K/zeWLQQIuRjuEdjTd9iZ5facBmHdjuVnurf/zW+Avn F0WdzAONVFjhSir3TDCtQkqOdZnBGFTSIcnB0fKQ80lz/t0GHq4eoXkjJA70yVc3dCIa 75BQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=oqWkW2LxfD6S4ORUzeRpTsgvc5j2dAwD84ZMnuqbXNk=; b=u+aQwbd7FWb5ZG7QF0ex+F7S0ki3a3DxYfceSE5UHjPIr6Ri1bZH/1BEDfNKGgSpMv 60cUk58ZMTUm5zApK/Fay58fx/JK3fKPcON+DUIulc6VElNHE7QwB3tnj/Xh+XRB65G1 qCUrm9bNC/8MS43tMvQfcPNb5vyfKdeFsgnGIUMWcOwfL0QBm88wQCFCSasZqZW3c3rP WG0Ik2bCKSRd7aufaGn1efsw9ZVCpTkFp5bbjwzas9Yj9wqkznTnZmZIv/56kvsIC7b9 EfOE4ZOP29vWFh/GJh9ISs/yJ6Ngu5sLbrn/sYIu7Qlmza4KzI5/anG+DDz1K4AIhVJk /vtA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JVDAlTtD; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=oqWkW2LxfD6S4ORUzeRpTsgvc5j2dAwD84ZMnuqbXNk=; b=D8tbww/ZZVc06aue5OFUJ56hUiOZKHjFDJvWvJV/f+rQo1NczeK9Bwt+KxyoyL02I2 Bnz1janyK8ksFw8oZ/c7yzKomGwsrfECfwfa2RR20ZhE2Je/irXwOKCK2tlSQPdGGEjP NXjc7lYN+fB2QyLuwSmsyThPQzcoCIV9uVX4c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=oqWkW2LxfD6S4ORUzeRpTsgvc5j2dAwD84ZMnuqbXNk=; b=rcOMx2hV4Z0nbrCd4MN8tdbL2J6fvn+ZVnJ6Ft0mNWfjUaYhVyYxt8wXBGY+De8gfy 94IAPgySLjrenzA0PQkR0y8Ejo29B+YsEJ/bg9KrB/smtMzC5NYbmUJDpV3uVaj78z8u Aw926nkqdhKr0t71pp4lzU386TF8u5zbkd0Im+V99qJc2ue6Fl//giRqvhFKBTsY/p5I mS45FBsG+cpBvw8A56IgyftrgY9SzTQoc1fSv4JJDp5beHJvKw//AmBzScm9WyeN3tL8 hImQvAN7fX93eGU9AWwCFhHXF0XmsfffAGVBN71ip52P/mIlCM5WwWGjEmWPZIK4S5QA yLGg== X-Gm-Message-State: AJIora9hbta0xYMB5fRbF0XfZO44WkPe9Sy9qbHpWQJVJ3hcfjv51/uE b76uUSDMl07giv3Lh/KHivLFMsoc X-Google-Smtp-Source: AGRyM1uWrTlco6Bd+u5XPmUTNaIsAUZTAj+DzKuJsyw5KZTjkiY4NxUErzHZ3YvUYhFc7853MsdLYQ== X-Received: by 2002:a5d:5263:0:b0:21d:7de7:956a with SMTP id l3-20020a5d5263000000b0021d7de7956amr3821376wrc.350.1657724715941; Wed, 13 Jul 2022 08:05:15 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6000:1ac7:b0:21d:ab25:25ba with SMTP id i7-20020a0560001ac700b0021dab2525bals2915656wry.2.gmail; Wed, 13 Jul 2022 08:05:15 -0700 (PDT) X-Received: by 2002:a5d:4986:0:b0:21d:776c:2f11 with SMTP id r6-20020a5d4986000000b0021d776c2f11mr3682533wrq.119.1657724714795; Wed, 13 Jul 2022 08:05:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657724714; cv=none; d=google.com; s=arc-20160816; b=T8Bwlat//zHx2P9T2IPfevqWly2x3HU/TBV2u2HPRCwpmCUOXT4SWizSlUQs2UbLv8 H7L50kBUTEbU2EQbP7Lg7tOGkdlV3u87vjgOsUFvzXABCsySoZFF2RMvEkOGGGymvddu ZEoIFQPhCMHilEGNFoRFf5kGbviAyEECSDx3Oyt6u/GmmOPPFzIbokmrVAT0QlWlHVkJ +dLLUbmiP9J3naF6GctKtJE6DsczB9FyddVkDttPHvzXlPAR8mLqdQC+m3OIdnLIVpbX En2ewG5fg3X1VPXFSsNUq5iCXFgo4czzXrj5exFgQ+wSE9dkzoR6zK1O24JFsidFFy+m mN3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ctpa/T2vVk1WErHGmcuqVVZ1P5/ZM5PQkEWqW8vXr7A=; b=AIvEt9m3fr8LbAFp7idTy2ggxiCt8cPrFCdTM6qqwp6crd+8Bd6PHeT5AZytzXauw5 dacscseRY2jVjokmdYk70r8GiZphqHqZRA5nyaaAB+DffEuMTHVo8EVx+zetivOk9nCI L5yWCRw4GQrdHKZdT/uXsqr5HIslCC4PrEHdGi+AwVeh2/d0Z8ajsoZcqeP9pzt6+9qB iU+077RJFQwG+gZ0z2xLNi6aQCtTPMCjEzC8qKg+liEyrBr/9MhYAdH+tz/dq/u/JSia H/oUd2iPiNNCKz1RcHDcSxKz+Wt2osnmX9zrfUCnE1QzDGaffU8jN8Rm0B4yNI6+tZp4 Bkeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JVDAlTtD; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id u6-20020adfc646000000b0021daa9bd767sor4098910wrg.77.2022.07.13.08.05.14 for (Google Transport Security); Wed, 13 Jul 2022 08:05:14 -0700 (PDT) Received-SPF: pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a5d:4d0b:0:b0:21d:819e:5765 with SMTP id z11-20020a5d4d0b000000b0021d819e5765mr3648022wrt.232.1657724714580; Wed, 13 Jul 2022 08:05:14 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-7.cust.vodafonedsl.it. [188.217.51.7]) by smtp.gmail.com with ESMTPSA id f17-20020a05600c4e9100b003a2d87aea57sm1465537wmq.10.2022.07.13.08.05.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 08:05:14 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Jacopo Mondi , Daniel Scally , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 3/6] media: ov5693: rename clk into xvclk Date: Wed, 13 Jul 2022 17:05:03 +0200 Message-Id: <20220713150506.2085214-4-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> References: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: tommaso.merciai@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JVDAlTtD; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Rename clk pdata pointer into xvclk (system clock input). Same for clk_rate into xvclk_rate. This is more explicit Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi --- Changes since v3: - Add reviewed-by tag, suggested by Jacopo, Krzysztof drivers/media/i2c/ov5693.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index 9e84468d920e..d2adc5513a21 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -157,7 +157,7 @@ struct ov5693_device { struct gpio_desc *reset; struct gpio_desc *powerdown; struct regulator_bulk_data supplies[OV5693_NUM_SUPPLIES]; - struct clk *clk; + struct clk *xvclk; struct ov5693_mode { struct v4l2_rect crop; @@ -794,7 +794,7 @@ static void ov5693_sensor_powerdown(struct ov5693_device *ov5693) regulator_bulk_disable(OV5693_NUM_SUPPLIES, ov5693->supplies); - clk_disable_unprepare(ov5693->clk); + clk_disable_unprepare(ov5693->xvclk); } static int ov5693_sensor_powerup(struct ov5693_device *ov5693) @@ -804,7 +804,7 @@ static int ov5693_sensor_powerup(struct ov5693_device *ov5693) gpiod_set_value_cansleep(ov5693->reset, 1); gpiod_set_value_cansleep(ov5693->powerdown, 1); - ret = clk_prepare_enable(ov5693->clk); + ret = clk_prepare_enable(ov5693->xvclk); if (ret) { dev_err(ov5693->dev, "Failed to enable clk\n"); goto fail_power; @@ -1390,7 +1390,7 @@ static int ov5693_check_hwcfg(struct ov5693_device *ov5693) static int ov5693_probe(struct i2c_client *client) { struct ov5693_device *ov5693; - u32 clk_rate; + u32 xvclk_rate; int ret = 0; ov5693 = devm_kzalloc(&client->dev, sizeof(*ov5693), GFP_KERNEL); @@ -1408,16 +1408,16 @@ static int ov5693_probe(struct i2c_client *client) v4l2_i2c_subdev_init(&ov5693->sd, client, &ov5693_ops); - ov5693->clk = devm_clk_get(&client->dev, "xvclk"); - if (IS_ERR(ov5693->clk)) { + ov5693->xvclk = devm_clk_get(&client->dev, "xvclk"); + if (IS_ERR(ov5693->xvclk)) { dev_err(&client->dev, "Error getting clock\n"); - return PTR_ERR(ov5693->clk); + return PTR_ERR(ov5693->xvclk); } - clk_rate = clk_get_rate(ov5693->clk); - if (clk_rate != OV5693_XVCLK_FREQ) + xvclk_rate = clk_get_rate(ov5693->xvclk); + if (xvclk_rate != OV5693_XVCLK_FREQ) dev_warn(&client->dev, "Found clk freq %u, expected %u\n", - clk_rate, OV5693_XVCLK_FREQ); + xvclk_rate, OV5693_XVCLK_FREQ); ret = ov5693_configure_gpios(ov5693); if (ret) From patchwork Wed Jul 13 15:05:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2136 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8D9B13F1F7 for ; Wed, 13 Jul 2022 17:05:17 +0200 (CEST) Received: by mail-wr1-f71.google.com with SMTP id v18-20020adf8b52000000b0021d641d2bb0sf2265932wra.11 for ; Wed, 13 Jul 2022 08:05:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657724717; cv=pass; d=google.com; s=arc-20160816; b=XEhb8m/yoXgFM4XuxMYNFdf9qr0lS848Ed4zgzysdyaTP5RD+XkueZXDnRVuCNIwFj 65EAu81rLfeZDsVmTgoMqsLWbdeuAf2aYyV/c+3NVkHdICxVb3rL5Zw4DRKfHqmVG9VC OFi6/lY7M9ceKP5ME5Y60IheURBjqEZuqy5QyxvRA5O008c0GaPxbBhJWiJgAR26Hjep XlhakA1v6JAs5noJr13jvokzYDoeFWG5ZhBkNvSY2FLrxmGb2/aWqFzjB1iInO02yLgU SzcZyE27XHNDPydC7HQAffkmWrHt4xG1jG8p6xyqSwyJT9UFLVD0n7RsCcbbcuYfj8fk /uvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=mxEH89PmKMnWEHW9AlxllWbUvhaOT14FMXhYQnwScZQ=; b=xyyVYmnkWiwrw6wGZbaxIW4QdcXc9D90XTMY6mupffOLG3LiRwP6DbPMzjxV+FoTvB Zl/eib4ViK58sKEo+88vnpIjAFuW4je18J/RJIo5Kt0WSTPjP3uTekB71VXvFIbJz3Rf iYwMh8NYfcChNA73aqd9JXRO08DPLvW8bYz7+NHCt5uFxH1mqBbINCC0UDrg/2TfSqr1 xELFe+fcckdA+n/jfvDDSgbFJW7CDlKNVBW1bh+vxdSPE0ymicPVWlpVWk9o8rar4tqG AMlkgoB8rd9exyoeEJ7ErXG+MzWKxdvdGiHXxRMcFvyQg39D7JM6Lc/AoayGHBU5OOTX jrqw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Pi5HkNDE; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=mxEH89PmKMnWEHW9AlxllWbUvhaOT14FMXhYQnwScZQ=; b=KpjapRbRNDIL09obHkCDlVwefMhwgRFgXkTCuU1hl0dPfKlUHCGVzHRXGcLUK4yfsX XpgyFLyzk0PV7U8ANLtyoetl3UaHvF44KAMF2fJM5JYcRarXaVtPmKWdH6VAL78T6aIe r4eFk3sTz3alr64eu4AJzEo8UoYe3hc+1gBJk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=mxEH89PmKMnWEHW9AlxllWbUvhaOT14FMXhYQnwScZQ=; b=KSLou2ObI6VcitdtU62yXUKXJUtxc/Jb8l8iW1XJpMtG2xsSfKLSWBhl2cjqHbm0tb +MwjCpL58W8r8bVhe0n1vtklcr9DkEPRdArCvimlqrVRoQabmg1OVNH0JdoPZsXQYdVT YjjZ6Y0V9HfrWd9R4ZHRngCVPC/3wVgQW8EqIJqlaUxiHB+jCiGWWOK3/QXMCBVcoxDw LBmjaxf2W3yhEo5Edp1kT761APgrTPodggzgp9arprjIDgrLnHTRYaSIBGB52QxNQBep 0t0VuUq/Ym3yazsDvFkeJRTXb6g4wwzKrzdciNrjvWli8BGJ4GBG2Lim5+6DYcT1vN9y E9lw== X-Gm-Message-State: AJIora/30YSRuk/9fjbfCcrDo45KY9zOpw1Snz/DCgAYoJYgemZeJoAB iILkh4l+CvbM+is5n+HvO/iQpCaA X-Google-Smtp-Source: AGRyM1tvrHxuX/nt1m4v6EnlUGFxHcsiK6PCaSoxO8x4RGvpVExGT4cH+OF9SU5AmiRXv/Dv2Fvkng== X-Received: by 2002:a05:600c:2288:b0:3a2:ddbf:7b2f with SMTP id 8-20020a05600c228800b003a2ddbf7b2fmr10217908wmf.191.1657724717354; Wed, 13 Jul 2022 08:05:17 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a5d:64af:0:b0:21d:bf45:f904 with SMTP id m15-20020a5d64af000000b0021dbf45f904ls1243679wrp.3.gmail; Wed, 13 Jul 2022 08:05:16 -0700 (PDT) X-Received: by 2002:a5d:6d81:0:b0:21d:bb16:e6c8 with SMTP id l1-20020a5d6d81000000b0021dbb16e6c8mr3717505wrs.88.1657724716158; Wed, 13 Jul 2022 08:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657724716; cv=none; d=google.com; s=arc-20160816; b=hc8xMTSChgi1WqFZFY5+79WKiOXb7AaYtaMCBeR8bjTkiFgQ6q5DSyQfgVRoS8R2kN ukf0+BOzXZRapCLf+IqTiF6z2gKlNixxee4UkID9/tfKViWpyrg2KaaPD4GUQw518ayj +C+hPNOoX9nYq7QGpacHJUKfJP7MU0ekU82FYfN+x8uNzzcsRXQkvVSPJ/hs6UfwExUY GyIkjDCZ/9nTmhTCA4cAkw+sE0MqRIDZSl+KnMR0gOWu2PPY+tfrD7QnBLw26b2KkEOi YJWoGGJ4i/ky5NtgW9BTq2bhuCsYj1yuSdIsm8l8sQxmf9G9gw4IKu5/wgCIXu2nJ+tx K4hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ROC0BgtK/N+kzsuCvrmnTVmfs20tFROFRODZongU+to=; b=LtuMwXaefW9KcJcQ3QjJQdMPJvZJ0fHpnlFtG7VUoIlR859ePTL8A61u0I7us9Bnk9 T0OwacPDWOmijT1qiW/e0g5rL0OLVrKVDfwd3+xaglzv1HsRyDVBYbq3M77ikcvtrKMX 3HElPD19IxiwmGvXdikejzklq3A//cGkpaEfs4/o6YwCYP8XA09RpbZs/QQ3wunTTCZf iyx7v/R2oWfzfI0a7zk3R/bJ2YULKxNvwKBaNNgrfi2Bh4ffvKNSNsLkgzif9g8im2xP ghNnzMw9Jbxrm5PR5yJ8xRCDEmc4psYA/9na0CpqFB97tGVoHVBGx2psUxQWvAvnihWk W9sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Pi5HkNDE; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id z25-20020a1c4c19000000b003a1a05c5669sor616628wmf.9.2022.07.13.08.05.16 for (Google Transport Security); Wed, 13 Jul 2022 08:05:16 -0700 (PDT) Received-SPF: pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:a187:b0:3a2:eb3e:f1d4 with SMTP id id7-20020a05600ca18700b003a2eb3ef1d4mr10115330wmb.174.1657724715931; Wed, 13 Jul 2022 08:05:15 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-7.cust.vodafonedsl.it. [188.217.51.7]) by smtp.gmail.com with ESMTPSA id f17-20020a05600c4e9100b003a2d87aea57sm1465537wmq.10.2022.07.13.08.05.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 08:05:15 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Jacopo Mondi , Daniel Scally , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 4/6] media: ov5693: add support for acpi clock-frequency prop Date: Wed, 13 Jul 2022 17:05:04 +0200 Message-Id: <20220713150506.2085214-5-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> References: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: tommaso.merciai@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Pi5HkNDE; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add support for ACPI-based platforms that specify the clock frequency by using the "clock-frequency" property instead of specifying a clock provider reference Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi --- Changes since v2: - Fix commit body as suggested by Sakari, Jacopo - Add details to commit body as suggested by Jacopo - Move ov5693_check_hwcfg into ov5693_hwcfg - Fix xvclk_rate position as suggested by Jacopo - Use devm_clk_get_optional instead of devm_clk_get as suggested Jacopo Changes since v3: - Fix commit body as suggested by Jacopo - Add reviewed-by tags, suggested by Jacopo, Krzysztof Changes since v4: - Remove wrong Sakari reviewed-by tag, suggested by Krzysztof, Sakari - Revert ov5693_check_hwcfg function changes. Keep clk init on probe function as suggested by Sakari - Fix commit body - Fix commit msg drivers/media/i2c/ov5693.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index d2adc5513a21..701468267f20 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -1408,13 +1408,25 @@ static int ov5693_probe(struct i2c_client *client) v4l2_i2c_subdev_init(&ov5693->sd, client, &ov5693_ops); - ov5693->xvclk = devm_clk_get(&client->dev, "xvclk"); - if (IS_ERR(ov5693->xvclk)) { - dev_err(&client->dev, "Error getting clock\n"); - return PTR_ERR(ov5693->xvclk); + ov5693->xvclk = devm_clk_get_optional(&client->dev, "xvclk"); + if (IS_ERR(ov5693->xvclk)) + return dev_err_probe(&client->dev, PTR_ERR(ov5693->xvclk), + "failed to get xvclk: %ld\n", + PTR_ERR(ov5693->xvclk)); + + if (ov5693->xvclk) { + xvclk_rate = clk_get_rate(ov5693->xvclk); + } else { + ret = fwnode_property_read_u32(dev_fwnode(&client->dev), + "clock-frequency", + &xvclk_rate); + + if (ret) { + dev_err(&client->dev, "can't get clock frequency"); + return ret; + } } - xvclk_rate = clk_get_rate(ov5693->xvclk); if (xvclk_rate != OV5693_XVCLK_FREQ) dev_warn(&client->dev, "Found clk freq %u, expected %u\n", xvclk_rate, OV5693_XVCLK_FREQ); From patchwork Wed Jul 13 15:05:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2137 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 75B723F1F7 for ; Wed, 13 Jul 2022 17:05:20 +0200 (CEST) Received: by mail-wm1-f72.google.com with SMTP id 130-20020a1c0288000000b003a2fe999093sf298993wmc.6 for ; Wed, 13 Jul 2022 08:05:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657724720; cv=pass; d=google.com; s=arc-20160816; b=WqT2d7IVa7GmYFRGUlweZGR/KYcfrlu+IVKzqz84Jiqsk8bgbABq3V4T2+qXORDPAA 2HBs0wXRUWb87OgSJNFR1Tqk7vD/UJ4BCQNQgpGUsjHSeoa739S6T0dIKBOG+U248Ej4 rpETEUc00RakSSXJ5t46pATomuY1gTIUStp45ntSWGbsIBkD7gb1+2s8ZgYHldV2yPYe T4kwylY+5D1mwe45KJ6B+1bK3Innf+d9MBADgPeO33BBhBKVBur8tkxWvrSm5ZlpyKqN 72MLBsSCYo6wXP8IC91d6n3FJbXFgsz7DAM50zdBwunAJOK6fqV3CnxZFMAxjcEx+XNu 1+Cg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=mYpgoldDgUlHl4c7sSfrQJTRPSsap1PkAgzkQiyT7i8=; b=Kx1sE/Mh5FtdlB4nHo65oFmhlDO4ax2nGxmo5DxMJuCrVoKCPVWUh3LeFs/1W1GsIj FQ8fIhT/sHyq16I4N80eQwJSvXUz8y1frXMjb8s2wh9r3myGi1SZ/3KJrWitBrBiORyG dYDoknRxA5mQtG6ERImrMHkbMn43F/tsIvdbmmyt630FsERMgXw0i9sNmjsvTCF+/KqY xjM+jXtaSagUgT6Kj6M9hAfgova9Ph8L04XpVj8Z+GLeX3+HyethwbSl/svp3ZtfL0CE nhR47DV+EFld6v6ESklQaSsz3UVF8h84Ic/1V8N7X9k5g6IWQkcOH5jYQyn7ncKUeYuf u0yA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pWJ2mDSt; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=mYpgoldDgUlHl4c7sSfrQJTRPSsap1PkAgzkQiyT7i8=; b=P7q8pIFvP0oDZ/3Jm13ZjyyjNWRsGv8tjX4hLMajNemLvMqZOOx9CAdaKz9dQNds3M woEaQy9/XbyR/JwK/q+m1UUa/YjwexK7HfvGtdoYgWCbL8fkNekc4zemjOS/hyFuII0N JaTzbDi/5u7kbR5VzaIj+2TptomGrMpfjlIf0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=mYpgoldDgUlHl4c7sSfrQJTRPSsap1PkAgzkQiyT7i8=; b=AOHya2raCgnoMCBqwuipkOSLcLaxdTZbMCMhNu5K69/ehntTE2PsR/2jiDmoO1+uRN yKPrWSFnyw7kQJ9A5ThV+9UJTKWWtjBRFR7Kgna0LEVl0xxvKt9dt68p3imDmt6rj3EB GhAehFx5UJxRz2JEk/hT5VzPp42H3OPzOGxB9bESEujeYlHyTjm2DQZTS6P6IlJd3O5+ zXKWiuUe5f18xmJLgQdTaSwSLIWnj6vUNMm3xV0a9xl+8f2AvntG+usD2PCFjPqohOaG jRfRShzWwtqz3n5awdeydQSkeq2JalSPuU2BpoO2BlWmBPO/YqeD8bQ7u6LJRBByQkp8 TS9A== X-Gm-Message-State: AJIora+AXrnfHTfSJmBOnVrO6vlMNaxpFWTklY+UkxmArnM2+K8Ru0sw YO2sbE78IsvF5b7sEw065C9XxTO/ X-Google-Smtp-Source: AGRyM1vrvSjowFR4xLPtl2HiFqBDl4juv4lSdtdOb5TTMjn/8P78gyOfSsOhXumKqhMheBq1fNjclA== X-Received: by 2002:adf:fc8d:0:b0:21d:9ba5:d2c1 with SMTP id g13-20020adffc8d000000b0021d9ba5d2c1mr3519611wrr.148.1657724720212; Wed, 13 Jul 2022 08:05:20 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:34c6:b0:3a0:4f27:977f with SMTP id d6-20020a05600c34c600b003a04f27977fls3085162wmq.2.gmail; Wed, 13 Jul 2022 08:05:19 -0700 (PDT) X-Received: by 2002:adf:d1c2:0:b0:21d:b3a7:ffcf with SMTP id b2-20020adfd1c2000000b0021db3a7ffcfmr3556940wrd.523.1657724719038; Wed, 13 Jul 2022 08:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657724719; cv=none; d=google.com; s=arc-20160816; b=O5m625kvD8VJGgudgIlt3/RuMU7i6vFMjDZxp6cABfEpRWuwZVrRFur/a7PUMyocJR vVT1X2QWLA9Ou6ihjJGltL68cW56iZBbiw5J0cAv/qcZgeB5zzwhbKvSX1uIXu3OgWlv OYr415wZJfJd2S6+gkI7jsuV+oRlDgxZ15LvT82oYUvRSli81krHEb5jZzilq/SI/YKV xfGPPhQUMB22AyXeQgtQLkyDSvkBGUAvXAixWp/ena42jHBTm2w+Cyl5zIJq7i/xAIP+ YhHIGX/7qCNHO/Js2v0nWKz3JOLYkuzRnra3zBk7jZninA3vx7LD5Ejh4KpuRaF9IuwA 7+3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=SFLYTnxGltOS1OadQL4iHNlIKerC7uXMw8HZbX2h5Bw=; b=HI7/h+M4q6aSmdNCfZKd6isQ2hefvG3unMLPixuZBZkeajp+sUjtLmQzYVe4nxAB1J jfFnulNiTn7xRSuxP2gKHbqSVlOcvczcyX07vApGAQCb1Fo1ZlqFHmPmGYgW13ShxpbB IbaahiNbPFvI20uTNfVTAXVgKInzqOFCJAqCA4d4COB8Qn1P7EextWN2UHJfggYVj8nh W3WT3Bjnt05wA2v8xl+7MZ5scgFvQ1/c1+PrEZYqlvNgxH2sIuSwDiprlqhHKsj5hGdL CwoBSqLwhQKldX3GqG7wTbWavJCh7d/0tHriavMfZ7wggaxFDs71cIXSeQxN3RjPeqOP 2/cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pWJ2mDSt; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ib6-20020a05600ca14600b003a12e4d1e2csor621377wmb.43.2022.07.13.08.05.19 for (Google Transport Security); Wed, 13 Jul 2022 08:05:19 -0700 (PDT) Received-SPF: pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a1c:a1c7:0:b0:3a2:f171:8d68 with SMTP id k190-20020a1ca1c7000000b003a2f1718d68mr4139777wme.111.1657724718777; Wed, 13 Jul 2022 08:05:18 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-7.cust.vodafonedsl.it. [188.217.51.7]) by smtp.gmail.com with ESMTPSA id f17-20020a05600c4e9100b003a2d87aea57sm1465537wmq.10.2022.07.13.08.05.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 08:05:18 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Krzysztof Kozlowski , Daniel Scally , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 5/6] media: dt-bindings: ov5693: document YAML binding Date: Wed, 13 Jul 2022 17:05:05 +0200 Message-Id: <20220713150506.2085214-6-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> References: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: tommaso.merciai@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pWJ2mDSt; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add documentation of device tree in YAML schema for the OV5693 CMOS image sensor from Omnivision Signed-off-by: Tommaso Merciai Reviewed-by: Krzysztof Kozlowski --- Changes since v1: - Fix allOf position as suggested by Krzysztof - Remove port description as suggested by Krzysztof - Fix EOF as suggested by Krzysztof Changes since v2: - Fix commit body as suggested by Krzysztof Changes since v3: - Add reviewed-by tags, suggested by Jacopo, Krzysztof Changes since v4: - Remove wrong Sakari reviewed-by tag, suggested by Krzysztof, Sakari Changes since v5: - Remove dovdd-supply, avdd-supply, dvdd-supply from required properties as suggested by Jacopo Changes since v6: - Add missing port node as suggested by Sakari, Rob bot .../bindings/media/i2c/ovti,ov5693.yaml | 124 ++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 125 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml new file mode 100644 index 000000000000..359dc08440a8 --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml @@ -0,0 +1,124 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (c) 2022 Amarulasolutions +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/ovti,ov5693.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Omnivision OV5693 CMOS Sensor + +maintainers: + - Tommaso Merciai + +description: | + The Omnivision OV5693 is a high performance, 1/4-inch, 5 megapixel, CMOS + image sensor that delivers 2592x1944 at 30fps. It provides full-frame, + sub-sampled, and windowed 10-bit MIPI images in various formats via the + Serial Camera Control Bus (SCCB) interface. + + OV5693 is controlled via I2C and two-wire Serial Camera Control Bus (SCCB). + The sensor output is available via CSI-2 serial data output (up to 2-lane). + +allOf: + - $ref: /schemas/media/video-interface-devices.yaml# + +properties: + compatible: + const: ovti,ov5693 + + reg: + maxItems: 1 + + clocks: + description: + System input clock (aka XVCLK). From 6 to 27 MHz. + maxItems: 1 + + dovdd-supply: + description: + Digital I/O voltage supply, 1.8V. + + avdd-supply: + description: + Analog voltage supply, 2.8V. + + dvdd-supply: + description: + Digital core voltage supply, 1.2V. + + reset-gpios: + description: + The phandle and specifier for the GPIO that controls sensor reset. + This corresponds to the hardware pin XSHUTDN which is physically + active low. + maxItems: 1 + + port: + description: MIPI CSI-2 transmitter port + $ref: /schemas/graph.yaml#/$defs/port-base + additionalProperties: false + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + link-frequencies: true + + data-lanes: + minItems: 1 + maxItems: 2 + + required: + - data-lanes + - link-frequencies + +required: + - compatible + - reg + - clocks + - port + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + ov5693: camera@36 { + compatible = "ovti,ov5693"; + reg = <0x36>; + + reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&cif_clkout_m0>; + + clocks = <&cru SCLK_CIF_OUT>; + assigned-clocks = <&cru SCLK_CIF_OUT>; + assigned-clock-rates = <19200000>; + + avdd-supply = <&vcc_1v8>; + dvdd-supply = <&vcc_1v2>; + dovdd-supply = <&vcc_2v8>; + + rotation = <90>; + orientation = <0>; + + port { + ucam_out: endpoint { + remote-endpoint = <&mipi_in_ucam>; + data-lanes = <1 2>; + link-frequencies = /bits/ 64 <450000000>; + }; + }; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index f679152bdbad..61c2d28aff4f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14838,6 +14838,7 @@ M: Daniel Scally L: linux-media@vger.kernel.org S: Maintained T: git git://linuxtv.org/media_tree.git +F: Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml F: drivers/media/i2c/ov5693.c OMNIVISION OV5695 SENSOR DRIVER From patchwork Wed Jul 13 15:05:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2138 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E462B3F1F7 for ; Wed, 13 Jul 2022 17:05:21 +0200 (CEST) Received: by mail-wm1-f72.google.com with SMTP id n18-20020a05600c501200b003a050cc39a0sf5581384wmr.7 for ; Wed, 13 Jul 2022 08:05:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657724721; cv=pass; d=google.com; s=arc-20160816; b=W+n3dHSqrMbpfL7plnEDZC7iNfmdrM6LH8hxvIfnr9JMp44UU1naC+lpL/8HN+I5YM T/tRvCwJqIKgkj/uE9RmGXWt1A0I89r+J2H61ZXuA54oBJDDxd28t+65UhCdOkWSZ+Cl ib+vTiVIU3tyj3mbSFG9SjFi7+ozGR1N2gYyEoSu1mt2KiZRnSa+BbVbsnshZ3mQnh+b GvyJSP2HX5CpPfvU4cKRr2VdlF8BuQkEuu3XhIxO0CFkP+Pv5RW0Dvk3PbpdPKvFBkT7 G6a4u9XipRb4I/kOxFZNwDKfV++jhDKqZqKDl768TZbUSpRZDTYuYkUnT1iVKGBZrGdz xPtA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=/JYP+oBbds8bqQQ5LLEVpn2Zq1B3I1mG08wn8Syir7I=; b=Tc8pagwOYY8n19w+VHR9i4B6U24nsOn60ECjNRtb87MrXygworW6jxmbHrwOlytS/R CcZhcX3Nt8aP4AKYEJh4hjCOw1DODnJPIHq1tdhDDfLCKnAb+zrs0J/gAieJKsvvVLsR Iw9ufYn51w4mVnBL/LCGrG8BuzGqBrCBmvHsHK7BdV/cE8Vthnmt8eZsaCa+uyG2u5Ni Fk0Sfqy3E3SAiWjn57BkRky5+vMHpT1I/5BJbquuvqFQCtfG3AJzbVoKIzY5K/+Azzkt LlxPP9D967iJO07hQGAuPn8cD8v2U3czJyJuGN4gPjkhNeZkm0oebQpWr40x0A/bR15D V9vA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XuaI59GV; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=/JYP+oBbds8bqQQ5LLEVpn2Zq1B3I1mG08wn8Syir7I=; b=X//vE/cK+m1zbOe74moLxMQTgghKGoq8FEzYFTGqh0rK+2xcRCJD0KBSZLr8WvE9YT 84jHpDZaEqvpDY18Vo7MDIVKZJc11mO6QkOW9YgerBJ3EntjrHWkox2ZFll+KPX6dGU6 I0Bg3HuMC5z4sIPTnJmAByg6rex0zQlESqjPA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=/JYP+oBbds8bqQQ5LLEVpn2Zq1B3I1mG08wn8Syir7I=; b=KQ+JDTZDod6c70on7W17ksVuOu2Y3aXpP7a+A8LzTUfKB0KrCcTyS27dOHyzgyWjwz nJ9h89z0ApTwYEBifnUrvvhrqq4CaqlYmTMLSl3arxF5DRCr93uHjFLDkpQfbgTl/j2n i6KUS+H633W8HpMyANdJN1Dp+HpQCXWNYqHAa8QbVvYv0QXBOEPImsTELO2T8BdlOl7b TU9FoeT6H+H3mwEDak8HEwxXwj7z9vLkAgyZ1orYSeBbBb06ajoCgKYeVKd3fj1Yx9zs bAFUmUFvBOxUrapqqcv1jJu2O9N+fQb6rt65XE88njh6UqvqRpneX67pb00KkVheMzlI 6k3Q== X-Gm-Message-State: AJIora+dTbvshX71ZIpDtcZGvzimfVLKjZKXra7F0BpPhcu8MmyjI6EJ 9RlOJGhI0Kgxt5pp9C/xwFO7yyEd X-Google-Smtp-Source: AGRyM1tByuiauYZ80ZjAObIwHtUMyvmh+nBMpe9RKZk9xymQqu8vgB2UOp82aj8YMMteuNREqfd8WQ== X-Received: by 2002:a05:6000:2c6:b0:21d:be55:d311 with SMTP id o6-20020a05600002c600b0021dbe55d311mr2380445wry.154.1657724721723; Wed, 13 Jul 2022 08:05:21 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a5d:588d:0:b0:21d:339f:dc1 with SMTP id n13-20020a5d588d000000b0021d339f0dc1ls2911922wrf.0.gmail; Wed, 13 Jul 2022 08:05:20 -0700 (PDT) X-Received: by 2002:adf:d215:0:b0:21d:7333:9627 with SMTP id j21-20020adfd215000000b0021d73339627mr3593922wrh.526.1657724720495; Wed, 13 Jul 2022 08:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657724720; cv=none; d=google.com; s=arc-20160816; b=mQ3LbA2NEfDGls3xVusB83DlbFl0tVDgAxp1BTW33bkotueq0RDqLAiGJX3kklHIC1 c8kGDr4fjL5NWpBrdbjVkI8Vkz35zS5ZD9K8SLVGvrpzWnbw/XP8GV5XFw2AhV80o5+a kHqmJy+WoYh3EW0KNw87udeVqn3CZrBlxfoU9MdAuUzCqppGcRB6yYfW11sIywvSHccW qWui+KeFkfZTnxcQ6bp5uxonTdg/ZZ3KZPHzscF6y1Z8FUFPSLuVSfdyAv3CQCPdgJne hjk90WZ1dBufi4a7IWdTBUhcxYZc/F0tvJUnujDDGaQK6nu8uCvIq/EHyQla/VaNuSkU o+ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=89nMQY6HYa205yz8a9PXVreqJnhbEp/5UjZ/0K+ojBk=; b=miEUOflFY4bFFhI9wQxTqatr6xx2DOfOdnXAjsI+Xw2nW7RxvhSFgL6lq4cVrk3uKd z9Uhm5trc9wg5riHtPsRYQlVF2D+TCxeWpkgyrpfaZY7F4ZyyPmRPKUO2dOrIKo9fJoL crpjK/pkTrCDPK2GTQrsVA5k3X8RP2q5rn8AkZDb2ccPUrBqrFXl0v+UGjJUCtZ+PPX6 94911GCm244vN/gfi8DoQWnbQfTfHVQiGpdFQ74++KIGWXds9BuaQSaaEImk72e6YHBF 9x5giDR6a+hsuKRD3gRwjXCNTKE3XLhI7UD6oq48rt7fappQNnFY/6q6+J60pmcUIJav 0GWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XuaI59GV; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id r22-20020adfb1d6000000b0021b8d272177sor5304873wra.38.2022.07.13.08.05.20 for (Google Transport Security); Wed, 13 Jul 2022 08:05:20 -0700 (PDT) Received-SPF: pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a5d:5143:0:b0:21d:61b6:5225 with SMTP id u3-20020a5d5143000000b0021d61b65225mr3649852wrt.164.1657724720297; Wed, 13 Jul 2022 08:05:20 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-7.cust.vodafonedsl.it. [188.217.51.7]) by smtp.gmail.com with ESMTPSA id f17-20020a05600c4e9100b003a2d87aea57sm1465537wmq.10.2022.07.13.08.05.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 08:05:20 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Jacopo Mondi , Daniel Scally , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 6/6] media: ov5693: add ov5693_of_match, dts support Date: Wed, 13 Jul 2022 17:05:06 +0200 Message-Id: <20220713150506.2085214-7-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> References: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: tommaso.merciai@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XuaI59GV; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add ov5693_of_match. Device tree support Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi Reviewed-by: Daniel Scally --- Changes since v2: - Change patch order 7 -> 6 as suggested by Sakari - Add missing signed-off as suggested by Jacopo Changes since v3: - Add reviewed-by tags, suggested by Jacopo, Krzysztof Changes since v4: - Remove wrong Sakari reviewed-by tag, suggested by Krzysztof, Sakari - Add Daniel reviewed-by tag drivers/media/i2c/ov5693.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index 701468267f20..82a9b2de7735 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -1533,10 +1533,17 @@ static const struct acpi_device_id ov5693_acpi_match[] = { }; MODULE_DEVICE_TABLE(acpi, ov5693_acpi_match); +static const struct of_device_id ov5693_of_match[] = { + { .compatible = "ovti,ov5693", }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, ov5693_of_match); + static struct i2c_driver ov5693_driver = { .driver = { .name = "ov5693", .acpi_match_table = ov5693_acpi_match, + .of_match_table = ov5693_of_match, .pm = &ov5693_pm_ops, }, .probe_new = ov5693_probe,