From patchwork Tue Jul 12 16:33:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2109 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 313593F0D5 for ; Tue, 12 Jul 2022 18:34:09 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id i5-20020a1c3b05000000b003a2e8a77dd1sf906855wma.1 for ; Tue, 12 Jul 2022 09:34:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657643649; cv=pass; d=google.com; s=arc-20160816; b=deVh2P3HmzPmeiGnlI+c/PgKYyjtwFO6ksJfe6dFULnSiLFhUAhzHGECao8ejBpTMW RTJVpyKseb+TjucAshKf26SOeHNi1k7WivQF5ddleYAl067MSB8VRvo+/jyeWZaD5xx8 20VdouMOdPVVJrTFGKINLvHlRGC5JBI5oTFokBBEQGzAmAqFosGwvY0sZxOXVmiH4FIR shUL6W31xTjv72pvks6xCeU5eMYMqSmufjyq1cqkh96pudU99srjuI3coK6azIbRVWfg ocOcBge14bDGuIKDgfOtyBkDkPnoQIxX95+CFuRfZMBeILWLsk+eRu9j/xJclIqsy4jV FcFA== 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=rj+mBDEL8xFjRPGyGUU2e/kKofvmDfzZFrHIZB33ppmtU79qHeqi4rHPKMv/IBtoEo NMeoBS+xnz46yBrNF/O4/v2alvAwc5JPxVUaLXmoyXn9U2JzDhucKW/CQiiRCIhEHtpn ksLdjoy8kpx25+e2QuvAU98GR5mXhHV49RnjCZnvBNISguZiRX4JNyedxK1u0opyH1E6 O87Rp9LOWC9qgB8M8ycd46S3eaq+CajMRoyypklcSnnRVo10JLBH1VJS54Inci8F/nnz BmkgUxzv5nv9cOQbQexe0JNi9GHBvVWDeC+QonQIb/iJeuOv/lN1aHTZ0jUIFZNOtSxA A3ew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QIfK3LMH; 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=AYtY08ztnIuuDCZMnrc8dMDC+sfsi2XSll/1beGb32n5HvDV5/uNGc2HMYr0Zky5uG KBPy4kfw5RljoH+0XJJ9LU0iXHbamqXcx9KRFayeTe++AnNXQShT53UFx3Me8PlylfSR yCLetzdyIRlSLANNW3vTYK9NL2xOum36n8eLA= 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=tA9dHQaj16nBY3xLLWp1v310i+8j79/4UZvEIxU+dH6qCXoNCbTaUSON4GeJGoemCw igBR1JpE1God27PGTesiEbT2kWPo9gJXMJljAxmhXdvJ6Wt50cgsFiB5IHS0uQNncsyO 9B7JXES8ZynsYV37kqnAb5ecN8HHjL6TyrKdmMU8KdWOEf/dzu5T07Squ/c7mQ8Yvuk1 VcCto9xLzFcXPQ28A8zexHMo303RpdgPE5LNJkfq1xWpuTi+eA7tvPcct7xzH4nGW3HZ oHxvuS8rLRT+mzHgIOlFdXEg7L1+agIaZKwmu618uI22vtdsQ39lIXz5HaXeLoFX//wH 9SIA== X-Gm-Message-State: AJIora9DmqxAwEpBaROMwL4jmqmigZAbGJ10tRfsvvG00Rb1+h0wopnr 4ACP56CvlCFkeS6XFBSn8dMpiPzu X-Google-Smtp-Source: AGRyM1sM1C0tXTtSvNYYqt/duRma6tByKhPmzOgBsigIjJ9W2a3FpR9wDZD0D+TyIGQ0nC5bNrxx8A== X-Received: by 2002:adf:fc8d:0:b0:21d:9ba5:d2c1 with SMTP id g13-20020adffc8d000000b0021d9ba5d2c1mr14591796wrr.148.1657643648883; Tue, 12 Jul 2022 09:34:08 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:34c6:b0:3a0:4f27:977f with SMTP id d6-20020a05600c34c600b003a04f27977fls1638363wmq.2.gmail; Tue, 12 Jul 2022 09:34:08 -0700 (PDT) X-Received: by 2002:a05:600c:228c:b0:3a2:e172:970 with SMTP id 12-20020a05600c228c00b003a2e1720970mr5014598wmf.194.1657643647770; Tue, 12 Jul 2022 09:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657643647; cv=none; d=google.com; s=arc-20160816; b=lbIZ7vXVEDP4Scbc/teiPHdpo2nWUZs7QShdm2e9jYo/q8iipQl+E/cePfmXj+bgbv jA5WFDE2N21vyIexjarzzAQKe7weFrA37JYIyC0+Kyfm6Kqj/zLze5JC30ZTeG/hPA+G wUyMcDg1T2J5ES/MfkgQnHDt/IivAHr5bwwbajOGIHHmzMdH3x9aCId3zLXLkNNoGsKz DTO35P2v/WoisT3lBp/r1ZS505eBjiUv1OX66tZhl1RtzBZKy0LAH5vvp2rzFjDonMrP ypuRRZ80TgsGV1sLK0xaZ7bCMqxdr0OXLjnVhVJTa+jetALxNp3Av/KGOC/osdpNA4lF 1EaQ== 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=EpNP0B4PDxDAJ4RgzgvuYMb1kN+cN0ybJGYgG+XPOisOV9yd3SNIqsnymvN36yJun5 byc2vWB+GCP31L/sBcXfLwAvAjx4zfCRjbA1TcWCwaFMkNPM6tP6paY0GnufAGU4stfK qbJ8+v5d8cZbKmZu+Qu4oV14chuJ+lsEY/Z2o6oi2Xith/sVoVETh6ao3OQ1LSir0TAV BlorokiTPAjGyNFjPykWYJVM3R0tj6awJ5HT6AmFmrEo35rd27w+422E78G6rta/OAJs pDrQt8Bg/j7bZdNJvL/6UT9pnvei3Kl/1ue708fEeveQ/hk70mlEITrK2dLgokNIj35o d1Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QIfK3LMH; 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 v10-20020adf8b4a000000b002130f1dfe10sor4012363wra.73.2022.07.12.09.34.07 for (Google Transport Security); Tue, 12 Jul 2022 09:34:07 -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:6149:0:b0:21d:6ba7:6095 with SMTP id y9-20020a5d6149000000b0021d6ba76095mr22466762wrt.680.1657643647530; Tue, 12 Jul 2022 09:34:07 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-53-214.cust.vodafonedsl.it. [188.217.53.214]) by smtp.gmail.com with ESMTPSA id j16-20020a5d6050000000b0021db2dcd0aasm2321052wrt.108.2022.07.12.09.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 09:34:07 -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 v6 1/6] media: ov5693: count num_supplies using array_size Date: Tue, 12 Jul 2022 18:33:44 +0200 Message-Id: <20220712163349.1308540-2-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220712163349.1308540-1-tommaso.merciai@amarulasolutions.com> References: <20220712163349.1308540-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=QIfK3LMH; 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 Tue Jul 12 16:33:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2110 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 04AC63F081 for ; Tue, 12 Jul 2022 18:34:11 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id c187-20020a1c35c4000000b003a19b3b9e6csf6908580wma.5 for ; Tue, 12 Jul 2022 09:34:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657643650; cv=pass; d=google.com; s=arc-20160816; b=qG1pBj59Oc7n57NoE3Q3qMJzu3qIGqRdm21jHA0IhwDN4Kl38meEZNBNa4nDwwVxo9 yoOU3P77Omh6AgvV5WReKtFEK983yF++Xf0Nk27FvLtTGy9R1cznPR/ZrnARBd9UHZny UcCDowvOUEz+6CWGT20n/pB+cOOu6NQZkbbxhbMtlFJQbXg3U0AjzAEjWp2mzO9wY3Qb Ebgzb62W9zuyTp8apEaQKwlb/TMVS6utl6oByZ0OBgLo22msgqSxCeL/EMxUO7Ce+ttO N5swRmYJs1R7RmKgojmp8XypQ3bIlfpP/ZrQBPsZIlm/bFcWH39w6bLRUnLZaemiMNh9 0sGg== 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=rXy2QH/jP7hm/U01oY9wD0Um3ZDxUP6+5hrYXBQLnaccKGC6OehYTTgE312Rg7l+TP SMf+3oLQRML7zQosbVn/mFmlm1wdOgDrAJOyJuP5qO4rUYVU5Jeql3Lpqg2J0BQg24nP g6ceADUh8ca6nJg8qrv9fOXpPhRsD8E0/BdQwySM+B8m7G8UQTThorTF0qThRiOekliY AKovo9IezfjLv7XJmUU2ex/4rGDF7Uw5Nj9bVQqw6C3b3cPG8++z4ekoUi+rhWFkISGL y4j406dNazvxNBP639Y3UTM7E6F6YfsTf6ApfqSKuAgPjCjMxCdnWwXoTjEiRB2D2bo7 HFWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AxwI3KTh; 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=dxDbdwLOrUismQiT4NOFmpu2ont3M3wuLnQMQpVKbCmU2PENGmvJZSV7WKDLbd3+EH uSzyWCIRXE/PxUQN0TJ7Ni1e//86dBHgAUxNEuPAuFtens+neK0f+k6/JSahHW3Xll5j 7YOgQbMW2I9sF6wmxnQErfwFLdihx84u2tGYM= 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=ld2lOU9KKavPi096a+7KLxu5CZCjZ9dxLCc86RRGY+EzbWhcP84k8eFVhiHrB4eScL 5/c59cTTO018KYd6mHyzx1IKUJCkCgwBmbtwOZr1C7NdSWOcySa+REs9keAThsMbIReX 0XfzehljxdAZbVzvFkBnkuPDIVdy+RyO97ONyxslgwOQlxiPd808YwNwJD0MSlyyO8e9 UK3PiUIH1NSMmAOFNtPQcHtaXmkSCyl77XwwfkohdQeNb/k6y8U4Ri3dpdBOZg+OGAYl mAdLKxyr+HQfmDTUagkQ8RBE6ENHdONytoheee0iQBlClh8EcY3YkuyXn2b826vw3pEm 4ywg== X-Gm-Message-State: AJIora+1FARqdnYRG0Vn0r+GDiDVAqxDC6Wo5XLZhgXkAw5/uYxVIYJW cs/jveSgFmtMCALyouRXnlTsTeY+ X-Google-Smtp-Source: AGRyM1uMBlELoaaciU+SYoYMv54JQbyytWU3CvxLOHFZ3LrYu9lhiRdlRlLEjVyrJ7PrQWiaRqmmIw== X-Received: by 2002:a7b:c401:0:b0:3a2:ca58:85bc with SMTP id k1-20020a7bc401000000b003a2ca5885bcmr4964010wmi.156.1657643650808; Tue, 12 Jul 2022 09:34:10 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:1da7:b0:3a0:3b20:d119 with SMTP id p39-20020a05600c1da700b003a03b20d119ls18178275wms.1.canary-gmail; Tue, 12 Jul 2022 09:34:09 -0700 (PDT) X-Received: by 2002:a1c:7910:0:b0:3a2:e033:cdbc with SMTP id l16-20020a1c7910000000b003a2e033cdbcmr4943317wme.122.1657643649714; Tue, 12 Jul 2022 09:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657643649; cv=none; d=google.com; s=arc-20160816; b=t95Qgia9iYXX5rsGfLjtsuGNZmlYhtC3Pyu0+aYMmV6j5o2JZDx9Ly5M1IeTRf4885 chvwg23JNde7mto/LqgGHs1QOpy1eI66Mwuf1yKvFEJkv3CBXrWRMqJRWnRtHP6+tRDZ EVD8uwifvlrmmBLvnCB9gUhHEH4o1VsvDQ89pkvtRo6KMYWa0vbnd8tEAkzi46VUU4wk HR3T0u5uqn95fyKMNfu14S2rq/IR/9T2j2o2wcwsU0ubGWszHwyqyq0ISzdIRt+qz0le rqAJE+RD+jQuDUdxTBrD0XvP3HgLT2T8Hs31q05WxyPXSEmneWd9pUyLdLKQ6jo5i1VS a3pQ== 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=qqQV15M/xgMDsxsfb6EBQLLLImGgdQbTfddbpYzyrhibczCdxlJDcsc/SPzSkyDDwv PuSPPPs2X+6eFMSfOUyvBJ+GKJ94/cHLdAMOpP4RhpJn1yMFJsNVakSZRMW0m69gQFet 0kx35SY2kwSheJdmLUsSS1joRJKd5+i9phY+rn1wSyxDqSwf2ayZ+NmFGFITb3ZHT/16 n7I24qrqeo4Tk3ydfFk/bMBcVH5vILm+SCorw0n1lKd+z+UC6FkXO6lyigubZhsccYjG TqdbUSNB64HtjMMu/irITtMhYzV98PpTJy+CtagCMmngdwOGtxIiomOx+/Mj2RZRX7wR IO4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AxwI3KTh; 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 t7-20020adfba47000000b0021d92908400sor4163739wrg.7.2022.07.12.09.34.09 for (Google Transport Security); Tue, 12 Jul 2022 09:34:09 -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:6000:2a4:b0:21d:8646:37f6 with SMTP id l4-20020a05600002a400b0021d864637f6mr22059252wry.661.1657643649501; Tue, 12 Jul 2022 09:34:09 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-53-214.cust.vodafonedsl.it. [188.217.53.214]) by smtp.gmail.com with ESMTPSA id j16-20020a5d6050000000b0021db2dcd0aasm2321052wrt.108.2022.07.12.09.34.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 09:34:09 -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 v6 2/6] media: ov5693: add dvdd into ov5693_supply_names array Date: Tue, 12 Jul 2022 18:33:45 +0200 Message-Id: <20220712163349.1308540-3-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220712163349.1308540-1-tommaso.merciai@amarulasolutions.com> References: <20220712163349.1308540-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=AxwI3KTh; 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 Tue Jul 12 16:33:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2111 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 5BEDF3F081 for ; Tue, 12 Jul 2022 18:34:13 +0200 (CEST) Received: by mail-wr1-f70.google.com with SMTP id l5-20020adfa385000000b0021db73f5818sf355954wrb.20 for ; Tue, 12 Jul 2022 09:34:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657643653; cv=pass; d=google.com; s=arc-20160816; b=yIMMGDocSBPb/ANL7nWzWQOCr0u2KstIsCrzj0wQq1rkdx4rWEyGGCWdmRrFsv0T0V 8gvu0vD2VKm8dJ4EgUW7Yx3zlkvmC1vgI73poKhcnab2L87gPPBauwcseLFnmwNvgkTA doaYTXOPYoof/hCEfUj+CHGqs47+S/ofIjRKaLT+Lt6lGnWbvz2pm8wvtMOtHGNDnBDZ UVhsel8FVhC3jSxqRwRF8sedexvHpD1RzpIgKudUnC/KW6nQ6mtQoBzPsI30JWUCw6uG 12e1K/imUem2/meatbIdhAcXD1VP3D7NWM0N4lbXB7pOoDdK97GMlfMx4rELADdFT2V3 vzGw== 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=rY1+ch+7ug+BbwJPpbCFE/GwRHjCgS9Yg4PTE5zoHEkFcrZGVfWC73Q4+h5/THAnPi qzolQx23BkMXgHn377UnKGkKmVHbSocKX5hb+SsFseiL20k85d+TdMuGlW2bNIQRdjTs Hqog00whW1lqB29+xVxUJWlq1yR0AHqubcerQCGgDtLEs6WWndqWd2L0XPqZf4HldKx0 sj3xIH3B3xvUL9R/VpCr64bybvgs2/1exstCForMMxxkPmejmSmAKvX+D0D74kGHUDeI aJ26x+knLY3vNm8yzTfeSdhWjzuAO9fkGLVbVlr+P7Hws6ZpaoFKT4nY7FA+HODcBZKP GrXw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=CylXyQDI; 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=Qd1Dpg6bkMWMM6rlpGBg2zx7+I1YA6GaPQs3vUQudr5hm8NHH9dG2Qu+928Aob5+LI DDJSrNnHH+fzTSrMc+m37CIrWewkqYl5wpbzhOI5t2xtBhLAJwTXPh3UEy16b2gQPhtv fVWkWvFbehaZn9MSNBh9VNUEUGT70hbmq8fro= 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=IH4TM0rWo5TPoUy19dH8o+ajWsi+8Yn2lHicachey896ZiTCBQJWxpVzwr51agNrPk BxPTFe4BshZColA5M/v8//O9eFydtPDSUcav2wiyJtSu9ex3vNo8NYglcQ9tRjlw30bY ozOx63JXNZz07NO77z9jm0VFGYpBeoWNHj/VX8gJo3/4cOGO5jf33yByyKr+LoRzPeej G8tEbojyMUTRv+ohR2ZcP0XSycTXhkFXYZsN0V+nAsKC3S9oqinuaHHDgtgFPgoApZnz V8DyyQCvfhIkJOW2JI67XC2KSaMwf/Dp0B47n1wT7WSUOmdsadmch7nFF47c7gvBUIVi x6kQ== X-Gm-Message-State: AJIora8zxaPDMDRTBCp5RPwaXu2N3s70JAAfmDt4mCCgSafcroB9Z2EU pnHlMoqEUs1BJPHkwrRdSSoths24 X-Google-Smtp-Source: AGRyM1torFS6zxT48qpr+9efv9KwOmqpRWcWaNK9nm/FCCJQB4wmvqG0c7yp/7/nLUB8C8uRz0KiGw== X-Received: by 2002:a05:6000:15ca:b0:21d:a72d:beb8 with SMTP id y10-20020a05600015ca00b0021da72dbeb8mr9885142wry.624.1657643653130; Tue, 12 Jul 2022 09:34:13 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6000:1ac7:b0:21d:ab25:25ba with SMTP id i7-20020a0560001ac700b0021dab2525bals4967348wry.2.gmail; Tue, 12 Jul 2022 09:34:12 -0700 (PDT) X-Received: by 2002:a05:6000:250:b0:21d:b3b5:3438 with SMTP id m16-20020a056000025000b0021db3b53438mr3392702wrz.203.1657643652086; Tue, 12 Jul 2022 09:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657643652; cv=none; d=google.com; s=arc-20160816; b=ALWvdzyd94woOdeUDQCRG29hbu+mW73Oqm31T6KQSOnI55IIBD7BQr8nBWVwpwNoaH +5u33WiUFV6wlBuUdnywhj5wSD61IeDI5Yi1Ud9CaKX6f7wk9BOVPi+gX0+Ri9ZNjaMM yrc1nhIKsmwAGk72KOwhFPd/9hMqJWXocCKSkwDzKfQGGjbDXWH3jTQA/nl+jBXPjiLD wn4yER1XTot1Gtqd5iscpkeaK70roj+W3LIcxcmlgcjpfCTOKyRbUoyvFweWRllR7Y6U xsSusfx/gLo3Zxt1akAW95NRowZkW/FOAUdD0ieNci76LcR5o+vNfQ3TT3NYeLSp7N+A VwaQ== 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=NBbCBNmJm6XYTAN6CzbQlbWownoiiIV15OvEi5A+pXsT4NAllSoKz6vwPTT8wR8gP+ SKT1u/uHpzUE32ZPHtEVxNn7TTFcAyHp0fgPvHBna+u4iJpVcri5fdwWt6e4qobA1yFh ZJ76QdN5gVwwQitj4xvbjpbiS4Dnt8+Mnr4w+qC9ixujk8kNw8PQPJZ5XICNpiTf5eIJ RSYq/ax7r1HH/oHjYCoA8b3kBCdVLn2W2fY9daiYt2CP9zSHZCMZ2qLRyq9IOquw2DLW cYNwKZIK2tW5y2Kpdc0GLOC/3KREUmno7U5olvY13GfhyCCX8xRbQAqP2vDgmwvevI08 tzQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=CylXyQDI; 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 b14-20020adfd1ce000000b0021d745963bdsor4120574wrd.49.2022.07.12.09.34.12 for (Google Transport Security); Tue, 12 Jul 2022 09:34:12 -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:584e:0:b0:21c:ea0c:3734 with SMTP id i14-20020a5d584e000000b0021cea0c3734mr22283780wrf.420.1657643651827; Tue, 12 Jul 2022 09:34:11 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-53-214.cust.vodafonedsl.it. [188.217.53.214]) by smtp.gmail.com with ESMTPSA id j16-20020a5d6050000000b0021db2dcd0aasm2321052wrt.108.2022.07.12.09.34.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 09:34: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 v6 3/6] media: ov5693: rename clk into xvclk Date: Tue, 12 Jul 2022 18:33:46 +0200 Message-Id: <20220712163349.1308540-4-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220712163349.1308540-1-tommaso.merciai@amarulasolutions.com> References: <20220712163349.1308540-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=CylXyQDI; 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 Tue Jul 12 16:33:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2112 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 16DCB3F081 for ; Tue, 12 Jul 2022 18:34:17 +0200 (CEST) Received: by mail-wm1-f70.google.com with SMTP id x6-20020a05600c21c600b003a2e9d4a106sf1744631wmj.6 for ; Tue, 12 Jul 2022 09:34:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657643656; cv=pass; d=google.com; s=arc-20160816; b=Qk8cuhf4Nw+9MVLGBD9epIboMjrhLolgQRg9H+uQYMJjjabTRt2T87x13L92rSQWkV I4rv4ZWHGPH4AVQWj+L+HDX2htdCHB1KO7mLO0+hj0c8ZjlcPqPHVNmJbuZ+zxZiJin6 mryXLKwBMuhaNaQCaR1LgtUemm0NoGyu5POLmULCCJFY4b7XBGDz0UhhNqnCsC8xby/O OwllAf7YftzblhyEZxz6+Qo6XlzCMW+KK+ADjvsQDzDAc0DFEGCAnfXiYttYQllBt86D 44p6rE2SjDtuXml2qM4KXeONoM+Iy9QCYdOQKQQVsJWnYd14qOHTNk9fBQeZtCNEWoZr QABQ== 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=zapH0hpWOu7cSn5bRNzG8xN6+3KxVXvU2DsaqTb21dDu8L8Lsrdvhw3lOZxhP+feoX fhSBIwj5FlfWO6k+cc29r6pRwHjYvyXyvVADorOj6C9vsRgdrXcRsjt6+XyKVuE0dgkj K0jb7ZSR26mkzI//j+rkXaPAy6t8OyJTnaNMrOXn5DwjPKhpRgJs9h6wov8UYF6Bnk9k LtRMz//dLRlhD302e/MAyPQcvXDaZAIeTFbBpyEOMhvtbMBA44EWV0nSV5+Xd7vbZIce JGm1gofIlWUlS2ImMW9oa7k/Y11gv7ZdRajhAcFMqwEQAIfxDoYJOntRnvP8qINF0EM2 0Ezg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Zi2SdcL8; 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=UTFF0zgrTPtIuTk0F+XbhfsaDSQs6/+DdmxXEwmvOHHqpHJ2dj+pjFcfOmzRSNhRtX klSA21iccZZR1McVKSIMqLug90qREgDjextKtSJ7jdO70KjYzMOKRyHrUU788a3N1JPc vsvpH1tuJcNd01m1iy9ZDZakj18S4FhOAZkXM= 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=d0yQIyds6s/QRPb0DcCiFTn8dvdeaRU/tDh9zPga+Mt2b+Z9Row5mGOm2fXMlmLBy4 4M8D50E19uRH9qN1O1ftkM9YJhSW/Ax+TK3UCfvdWf4PPqT5lxPPU5QhdICs/9OkI+gs XzrCgqAxfpMw8GbmyGRxdhNzE3x0K3OZf5d96T1bD7juUia4g5C0vY9iavFHMsEMgajb JUPlpYFmF/F5r7oSROsdp4iNEyrS02WKKZt+HDMLSMXsfH3IS7sFxSSgIOxhiSvmAhq0 S2WfZiYQLIu5MaGuggPIlSN1GbMaXfyb36mrIEnSH+SAi4x/KtImyliM53bqBgxRAFif 6msQ== X-Gm-Message-State: AJIora+9UuzZqndMZ//4iQqIm1PpDM91PyGBBu2M4tx/DLsYS6sLCp8I 2WzKowTfKHh4E6UKB82GFVfTovRJ X-Google-Smtp-Source: AGRyM1sdbKK3B7k7pggi8/eVxvDuJ0CQdu9uM7HJzGwC1GQwUSUtdRJvKAda8Yna7REgqqkye+Qskg== X-Received: by 2002:a5d:634d:0:b0:21d:6789:3e4d with SMTP id b13-20020a5d634d000000b0021d67893e4dmr24719643wrw.321.1657643656805; Tue, 12 Jul 2022 09:34:16 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a5d:588d:0:b0:21d:339f:dc1 with SMTP id n13-20020a5d588d000000b0021d339f0dc1ls4991288wrf.0.gmail; Tue, 12 Jul 2022 09:34:16 -0700 (PDT) X-Received: by 2002:adf:e18e:0:b0:21d:8d22:bb24 with SMTP id az14-20020adfe18e000000b0021d8d22bb24mr23330002wrb.397.1657643655830; Tue, 12 Jul 2022 09:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657643655; cv=none; d=google.com; s=arc-20160816; b=Ggv5uil4d+nMkHw4rTPGybJPKvK0H/2YY1EowrOruzfnraNZZC/Gt6SJvUD926xtpi 6RGTwLwk0qmuDAZJDnxuo7WHGzPPC32NHSJIvXv8v5QprCdWeKY2hMhNd0wdnZ+sqc0G Ro+RrRVRTc0QW7byIbIwgFa4H3mPZ8XuFO1p4OQpJi3KxnYW7iF8FyYFFT85AWuv40AR JXEuN03FXZoYDGCicY046cuk/GxjyyzLcx8DjzTT7aVg5ya7Rgs2QbZ7OUdh8GR5x6Ua bY9PF5801FLvfpo4kra9lUqkXq5NE8wQ+SKVmyVt28R5dUqxpSahoC0o+wRGtoN3D9QL xHiA== 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=Pbc3X0n8gy3X5ym1qibeJmwzwIrIr63M8ztZYWjlHsdPZadhMYWXMhoOIav4dEgKO3 dux6F1VdLtudzN0FYa1pZXPpbROYKWfT0Xl3WT0TdRYpJb0/+HxCF7UBSaSVn+8PtnH8 grr/2pjt0cLZm5RyxkdG6hwHDdb9ACqqy/uhtnALSzv5RT+42SxrZKNnbGDhJqlzM6pz LETr0rqVDPHbDKV06VG76QRjRgstKZMEPzhGTb3zuHjwfNzxePefVdpjWi2LrP/ajb9N GxHoLquODgVnfTjYKbfnhMye3QgwTcxP+Ku/JM5hRuyVfbdM8iO1I6SmhB+PjEVjqTRa DGcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Zi2SdcL8; 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 v10-20020adf8b4a000000b002130f1dfe10sor4012528wra.73.2022.07.12.09.34.15 for (Google Transport Security); Tue, 12 Jul 2022 09:34:15 -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:adf:e0c9:0:b0:21b:8271:2348 with SMTP id m9-20020adfe0c9000000b0021b82712348mr21782133wri.222.1657643655627; Tue, 12 Jul 2022 09:34:15 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-53-214.cust.vodafonedsl.it. [188.217.53.214]) by smtp.gmail.com with ESMTPSA id j16-20020a5d6050000000b0021db2dcd0aasm2321052wrt.108.2022.07.12.09.34.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 09:34: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 v6 4/6] media: ov5693: add support for acpi clock-frequency prop Date: Tue, 12 Jul 2022 18:33:47 +0200 Message-Id: <20220712163349.1308540-5-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220712163349.1308540-1-tommaso.merciai@amarulasolutions.com> References: <20220712163349.1308540-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=Zi2SdcL8; 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 Tue Jul 12 16:33:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2113 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3D0273F081 for ; Tue, 12 Jul 2022 18:34:21 +0200 (CEST) Received: by mail-wm1-f70.google.com with SMTP id g22-20020a7bc4d6000000b003a2e0951432sf3938464wmk.9 for ; Tue, 12 Jul 2022 09:34:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657643661; cv=pass; d=google.com; s=arc-20160816; b=wzx+Kek2+yCXkaJR9G0QhpgnJA/2PD1SXi7tW50GEMyVVw7+RU+NAi9EduNa59+fVG h5qHeABky1X9/hYpMsWwzRfqvnPxTuFuFKdz0sxFtktqDah/ufLDeZPvmswVPr2jPS0b QskCK1MO4vDS4y3qzjbWwp5GTUht1juarbC7ug+GTE0EdDYPymoV2b+Kzlm4oCPqaQOC knZrh/PrZyrT7zOg/nVWBphcG0D2wSINAbAVAa2re4+P8m4EmxXBP/glFAKbmV4hQpkT dxRnVNwBBeHeB6mxW2Ak6NjX/mCXASblvYwYdKOIVG2RuXHXf+FATbFN4z4kwtOj568I pqxw== 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=g/gU+10H+EEXFTl8Sz0hG/L3Yl6p1u5ECdRsw/o61Wo=; b=XUNP01RKsth5bse2YFWsXksBMJ4p7srochP0ifE2fL/yEWZi9YgO2mF5cubQw0dqUu +RWlitYhAOpXMh+E2zpJiJrn04baUI3t6M0QseA+A60CPlw8xGP5SDK6yRUu7BGb5vtl sVD9PfBekefvPZg90XSEKSnxTEelkK60vxqp5HdeqMbaV0e9wvEmuTsnCCLcV5TrNgdu iB2ZDvdGi5LHSzuJlcP9ybOeE3zqE/CCRcEgDM7BVMpHVRihEbKNzL5/l9tM2e9cJoBc 5TesD8zsiRYTl2dZ2jXWmDTki+ILWFvNZgOETZxqeUD/foQg4tiNgdbHY3mz27+q8eww OZ2g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UHGrVJVD; 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=g/gU+10H+EEXFTl8Sz0hG/L3Yl6p1u5ECdRsw/o61Wo=; b=nSLUW4eWL3k0oQ4lR0tKpjVdI8LVbDoVuz89wkHmn9UvDDHxl6PFobzCQSgomAkpCK QB2Sw38oqxl+EJgsg/G00RX9PciuV3d3YdtDZ9h6DJONeMoNlOdLWhJrjxtvqd9MmZW9 ZIBJ15soaNsaPneYfCX72Cb3nTyfci7lDX0q4= 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=g/gU+10H+EEXFTl8Sz0hG/L3Yl6p1u5ECdRsw/o61Wo=; b=AYfhx03EOo2jF8sv7AgU4WKJDEIy4QKEIeTUY0y4pXUmiixxMtjQKHKJq4vx22StcZ 3ZwvIqwiovrgaEvWEAImpwt61IUhsC2VouOTvARG6GQdiZOz0Hm5QI8B04yE7duFAltF Ak2Cv83Q4jhqHslDwAqkmcvM54HCfCQjTyQbB3idnmt/63NZrYc/er4kaJmLaIL6MDJp SIuopaTP5D0Dfc90BJuVqXhMb5Z4mX0Y5exLnJ0UlZ/nbrR+2oMo+P/UaXP79UAqHXZB nwyDgQL+JBEZYQpTOiR/TgfQ1/45XZ53J7hzZdgGRgjnEl9Uh6slFwsqsfRUHTOWh8Ox HuCQ== X-Gm-Message-State: AJIora9oj3NQYy0sZUsg0NL+RuTMPWxSntQjPXVYXpF2w/sh6nzIvCVY +bXe4c1Ca7zBXMhEBhBzAevVum+W X-Google-Smtp-Source: AGRyM1u3HjHjEbE0jQleTNlsrbdC3100vHZnXf8znIt6jR5T4HsgUxzLlhhBEV5+mH7YjO8pHMTjIg== X-Received: by 2002:a5d:4890:0:b0:21d:9bf3:89b5 with SMTP id g16-20020a5d4890000000b0021d9bf389b5mr15602496wrq.153.1657643661021; Tue, 12 Jul 2022 09:34:21 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6000:156e:b0:21d:2eb7:c707 with SMTP id 14-20020a056000156e00b0021d2eb7c707ls4977579wrz.3.gmail; Tue, 12 Jul 2022 09:34:20 -0700 (PDT) X-Received: by 2002:a05:6000:22a:b0:21d:87cb:34a with SMTP id l10-20020a056000022a00b0021d87cb034amr23169961wrz.82.1657643659998; Tue, 12 Jul 2022 09:34:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657643659; cv=none; d=google.com; s=arc-20160816; b=kJAQ+75AuOcQF//mo9tgYY7BQE4SaTzbNOjQvOmFxYsq2y7bpF5hydQXrpp6D7nO3C CStnPq1B8eMlk+gDziUxXNVUF6y1g0R6v7J8OCdOJx/Lqnnb+7b6XzfkQHD2LGAc9xo/ VQuDpIRSUIxB53e01VsRT6K6DIqFgKhJY/TYEzk8rIsmm+6enDHlGKuikj/t+gmU7aPj SAMZS0iOILJM531zewsOuzY25haroxDqMx9KYK1dm75fX9se/Yeu+H9uwEdYvqSmyLpX 8qy6MNRoyWp8/8dGTbcS9dtnvgZMKUzYhybtpwAk+efMTaKB/qlAujQ+acFb4MO6vyoR bVRw== 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=klIuiYkZWbRMkCmGujIVKAt0cLr/WkyvgD6JQ+6Oul0=; b=Z79IvC7ayagmmP4RuVBOkkdo8n1gKPUBGoPT3mfdFZ/Vzbk9zfF3pClwCQ7OHh9g41 Y+c5hU5LOhljjA4gtpyA/yJKK4Cbiiu4PXudO4PIwnLJn0+/euFzDHqwLcN6CZ3kTqOy bWk0Psc6dJO58ko8xdKhrc34FpimWefB4Y043BNt2LjfXSLZYKFHYFFG41izxGD1HIrV uPsMxnxFVjo62FMHZ5F2DJmvblw9bHEcXFQ98d/GFG+87ZQWlwdttuEX9m1YcHaq5ZbL 20x6V2IsSptLU0fTTqU/73lEGEk5Cf6UQ+qfx5SuAfeWKoP449cK2ZpWC3pa2xE7CmgK 80bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UHGrVJVD; 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 l4-20020adfa384000000b002185a3090b8sor3876987wrb.74.2022.07.12.09.34.19 for (Google Transport Security); Tue, 12 Jul 2022 09:34: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:a5d:5087:0:b0:21d:9925:e15a with SMTP id a7-20020a5d5087000000b0021d9925e15amr16372612wrt.43.1657643659728; Tue, 12 Jul 2022 09:34:19 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-53-214.cust.vodafonedsl.it. [188.217.53.214]) by smtp.gmail.com with ESMTPSA id j16-20020a5d6050000000b0021db2dcd0aasm2321052wrt.108.2022.07.12.09.34.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 09:34:19 -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 v6 5/6] media: dt-bindings: ov5693: document YAML binding Date: Tue, 12 Jul 2022 18:33:48 +0200 Message-Id: <20220712163349.1308540-6-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220712163349.1308540-1-tommaso.merciai@amarulasolutions.com> References: <20220712163349.1308540-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=UHGrVJVD; 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 .../bindings/media/i2c/ovti,ov5693.yaml | 103 ++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 104 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..8974a2c746a7 --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml @@ -0,0 +1,103 @@ +# 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 + +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 66bffb24a348..5a7881ee15e1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14767,6 +14767,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 Tue Jul 12 16:33:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2114 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 6F2D53F081 for ; Tue, 12 Jul 2022 18:34:23 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id n18-20020a05600c501200b003a050cc39a0sf4277696wmr.7 for ; Tue, 12 Jul 2022 09:34:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657643663; cv=pass; d=google.com; s=arc-20160816; b=xcrZtMdM7AJLO51jxhVaxN+C12L/iPktzBHgykxB/g/Ra6NZaABho2adlKeR28ZZMX HrbgdzACc1pg7NCnVwd1Hr+734NwMziujJI36aUFcL+7vVgzmjUqJsxD8YniuZuWU0ts RbYpr8xT/fa6N80LquQrNZx6VyqMrXqr/qVqY8yjgJfPZzdK03nIuJPLdOtScE6L6fIS NKm0QiAYr6OpBOoHXSIlUzdpLc92vIreq/SiRCE4+9o2+VGOmkamiX6prB3mBfHcn6vo S5+kTN99Ji/bCFryKRGnAhd5GO6pxzfKqpCLRdMUcYE8mPBazmqbwWSdwTqwhEMcoFwe j+yg== 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=coWLrcuhcBE62oiyRXQmZzxDpesKnADzZt3O2HyHmTm6EMMWLlzfSBiqTnRx165Q7z G8wL/An+IfW1A6sMtGie/y4mqaqDzsOM09Dd+InWdfvkDadHFDvdh4zeKn1vyNZWN2DL rIUkx5qPyPo+O3lRVr91Ghrxh2XClejGlDmDSdvxlQqx9rAus0rSF5dqZT6KuzlGlvxM iqZun5rUmMwjIxEYM+OemOa3mdyuERmseFy1IF/ikS2LMDhVCJGWOrchUAjbtJ+erHCJ I3D0bTR3oacpDzRFwFw0i56sWNaMfX/PXKcSwmdkrbX+DOJpmeXDvsGW456dcL35Re/z Z3Jg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Sbj3OenG; 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=nFzogR3IyYoOVESuoVEi+bneTRdy8sc+iudWxWfkVoJcSb+XnVdqMsRcW9en4HQ7JE CnePGgqeFKgmqzgCJ9JNWmHVhgwKbYT6T8vdcoYU1PNkUFazPW3X6x8VMfqd7vdgcjhc GaNcEkGt3UB4qSTcB5BPA/XclvZTdXS2TIIlA= 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=SE/btdg5mUxv3rR40McvlbEMgMAobLLN5/mSjzlzvVfKckiEcn9dFGfa3DSMiPiADt 28nKces65wpEjHhPboT/IAc6nrBaWu7n1PC0M6v4pIzVCFa47yDpAtg6s5HOc88GqJNG JOhnhKVoPxVpAz/OlIIdw+CuhH8gtBZtQo5Gis2Rym1P+hIenjnMDB0oUkvcw35uw5K0 7uojeYsdmdUViTxcYADq61Xu5akx+jLUC/76hm9zJhV7QYPKoxpHBZX+spsIw4Md1vzR a7CjuMtCtAzrx1RQ5CjSlG2ja9nXMKbxZKNWQVDi3qlMFnRrRGCQadKv9xu0xb3J8nr8 KI7g== X-Gm-Message-State: AJIora+1C4m2RnhzyZfsGIfBSufUyOUD7FsjhgzC4bkluWWHOfkfZmwB WAJJQ5lK60itjaEColc4GreDCbTq X-Google-Smtp-Source: AGRyM1u2333OVeqHmxyh2WrAavpiDMSLnpUIlDtsrimxuwCTC2vQTioVE7fXdvAjQBi+GPiBHoNgHg== X-Received: by 2002:a05:600c:2e53:b0:3a2:e51c:a6a with SMTP id q19-20020a05600c2e5300b003a2e51c0a6amr4742691wmf.168.1657643663248; Tue, 12 Jul 2022 09:34:23 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:1ca8:b0:3a2:cfae:ca38 with SMTP id k40-20020a05600c1ca800b003a2cfaeca38ls1643966wms.0.gmail; Tue, 12 Jul 2022 09:34:22 -0700 (PDT) X-Received: by 2002:a05:600c:35c1:b0:3a1:7a5b:64ba with SMTP id r1-20020a05600c35c100b003a17a5b64bamr4815810wmq.33.1657643662146; Tue, 12 Jul 2022 09:34:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657643662; cv=none; d=google.com; s=arc-20160816; b=E4FsxjGBy6AJSfNIsJC8VGXO2woNSSXka/pexexWbkfKfv1NBOlU6EKTPazX0PLwXA R2VNMAAVfO0BnUXaXsFJb9gOGFMa1De/JDwICRW6LKS0J/PU72ia3nesAqjOpLDNytet JO3E/bg3ZDfLMUqYPCretu9/wDHBKs9K/u0Oo0Kd1CSmUt78QxhfOpqreI0iu04wr/y7 W1mLe2cWS8GRn0htatcrFCHVW11aWfg+g4yKfZfk3jdbS4JnwIXHA5KczxIlAaxKuXSQ 626Groq0LmTklpFXKtgNWCzsqJQdejdriq9S8yAChtpHKVOb+pKxD33GK7VIQeAcX9yi vuxg== 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=BR4gbcx85+IAsXixo/blVww6aIrLR8ValETuU9XmbaQnPOd4vN6bGovvPfCMo3xUNF BSCURIB9SkuwwTXu6UDAA0EsDnp3kUCa0Gu9eLxiNCpfLF9VONOX6NIFfJpKzTn9WoS8 zjEIaXUTxbaUe0vjmFOAWY56qwk+OuMFQnBkzOJus5gQ1tTFcELghtGAaB44REQMrySU /aNuiExD98WSBoC43Vlkl/GyJ8YZE19hpuMaVc3qbnchPXxrWejFLNij2mPfHw5KCK9B n+g/PN3khskn/n4CETTE7b6AsJjdvrhrk/ABZoiAX8EYJCiMJwR5NgIDn2ExELZB13x1 jsDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Sbj3OenG; 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 y1-20020a056000168100b0021d3295632bsor4167565wrd.45.2022.07.12.09.34.22 for (Google Transport Security); Tue, 12 Jul 2022 09:34:22 -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:4c49:0:b0:21d:6df5:beb7 with SMTP id n9-20020a5d4c49000000b0021d6df5beb7mr23158622wrt.286.1657643661957; Tue, 12 Jul 2022 09:34:21 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-53-214.cust.vodafonedsl.it. [188.217.53.214]) by smtp.gmail.com with ESMTPSA id j16-20020a5d6050000000b0021db2dcd0aasm2321052wrt.108.2022.07.12.09.34.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 09:34:21 -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 v6 6/6] media: ov5693: add ov5693_of_match, dts support Date: Tue, 12 Jul 2022 18:33:49 +0200 Message-Id: <20220712163349.1308540-7-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220712163349.1308540-1-tommaso.merciai@amarulasolutions.com> References: <20220712163349.1308540-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=Sbj3OenG; 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,