From patchwork Thu Jun 16 19:35:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2090 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id EECD13F1D5 for ; Thu, 16 Jun 2022 21:36:05 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id w22-20020a05640234d600b0043559f4c95asf799813edc.18 for ; Thu, 16 Jun 2022 12:36:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655408165; cv=pass; d=google.com; s=arc-20160816; b=d3aB4hi1oR8o5OntCGz9YjhJY3ZMjYzw9ejGKAnSCuiik9H5rza2kxiDfrECgD1ie6 qE5b8TXUIueMBILtK1YzWRrZvFd4vTchxLMLSdQ6zr7svLzfo8drrTc9DGA1/8PY0Cuy /w32RDj8QpHmW9fVnb5Eak1eKFqc/FJ4CKU02nKAaBV83gkl93LeEXpEdSshF6mu9JaO AjFiI58EztZ8ViBNHl53EOtaOp+Oiv3vZhp2tqGksLYnsBH9EijITJS68jINEQm3e8x9 wXa/mFlfTaFpjBk/Ibsl3x3JIi/figFk6IiqN7LVKPrjA8pZcE5/R/Sam7wA0KiYtrDn f6HQ== 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=Qb7mwVc1mZ647uZVoMN0I0OFFx+R9eSDy0PHA7LrraY=; b=05FMZlbrfTW+VJxiTPhQJfM6zb5v6wLM8QLo3ooQEFYIRmn3agHMSNF9HAfLWUpgg7 P/2QmMSZmEfOWM6IHuzhNlDsTj7Wpzwo/IVU9xpMzBovUAXejIkO21dma8g5OO7aWHbk 9m1O+Bn0D47nI0AAo3N0xhbxqMZf4X4c5FEYKP3h2fpkYXkUskQJQ/HI6l0MRl0SZXcA TUAsgAABBzmOjqaRO3QXz3Gi7YNmntV0TguFkrhSnqlxJTCY+81IQUChKCfg6DtzTblr gwB5zPFZMlZNCpsQnqTeMxzX8oy1wGPh5xFTF+Nbg3Thk5JrAOubzTsFlmuxi7KE+ohy Am8w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="kr5f/MW6"; 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=Qb7mwVc1mZ647uZVoMN0I0OFFx+R9eSDy0PHA7LrraY=; b=IZINNJiRCFEhvuAFzYrSRGtm8IMg77M2P3iUtBz/+BQCfcaN0PY+kpSZZbOGDVeI06 pUWMCUjwLtxe6k2aElN0hT8LqOW/tmXPV5CJc3W4mDLZ7lZJXMoC++tYtqP1FFEaD91g k6k4RyjhV5cwGRN84RQdZVDlXpm4qaGgqw9e4= 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=Qb7mwVc1mZ647uZVoMN0I0OFFx+R9eSDy0PHA7LrraY=; b=OYTtpqB/YcOAXY1OOHn+6jEprbwcq02QNO0F0wgLlsjNqxQkBwQRx5nKXpjkbFewQ4 vPm/rYItu7sIS9avp6ZAcf7NE8f55IESg5eVS5Zy+nQ3X8GUGYE7pHcNOVxclbdhL91P PNrHRPYZOYENow5wM1peMYL44Z2bdAr1mExjATFsCM4GyhNYMhw3iO4lzkRQbjjLZ+Xv l9kQxsJDEgmTS0H9hfRx2bQGSCSjklaCeKxhnMm6PXnq9bNrD7BUN+9moEZsSryL3thY jnDUPdXFCUEUbm+BbfaVgUYQpu2pa7fY6frlBjMlm/hr0CpHQGoMA80wTZFleShsj+gK GjBg== X-Gm-Message-State: AJIora8nmQlbUmV2CTPSuo4om8UfZhcmjnjxCnlHY9CqarFBwKeL74/x 2dbZW6uKodJqFLEAR3gR0hACCUy3 X-Google-Smtp-Source: AGRyM1s7mjOOfN3wXTX4Y5Jg0W0ZUEa4X3eDIdzFtpgFFvO7XE7PDpGmqR8aefOzl15S9drYtPrHpA== X-Received: by 2002:a17:906:5197:b0:712:2223:d3d0 with SMTP id y23-20020a170906519700b007122223d3d0mr6057951ejk.74.1655408165640; Thu, 16 Jun 2022 12:36:05 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:35d0:b0:434:fe11:7447 with SMTP id z16-20020a05640235d000b00434fe117447ls201066edc.3.gmail; Thu, 16 Jun 2022 12:36:04 -0700 (PDT) X-Received: by 2002:a05:6402:5114:b0:42f:b5f3:1f96 with SMTP id m20-20020a056402511400b0042fb5f31f96mr8539732edd.260.1655408164576; Thu, 16 Jun 2022 12:36:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655408164; cv=none; d=google.com; s=arc-20160816; b=aHFuQ8pcsV4hQdCgtjrKF5xCZKgK1Bn8YPI1ICkycup8wuEqKOf0hr/M1jC4JGOJnc KT0Bz42TX+pzOa33QuEGGi0IaD316DaiAW4a6tQFdW5NqbUpm5qSZ2vVbKwB7v6JUL9H udpArrcLXX/B7l4cmwaO8xeLunqI6N6VULgRd5YYM5c9Wg7FNPkdwxwjZFhvKLUld5rv JTTijAQ3uEUXjmbayVWej0w1WYcVt8Rgc+C4r1/epvMYYMs/A8Q5IWqmT6OXY8zR1zmy BJNH2mBWIlSQ+5etN0Dxh4WuSmghg0ZE1LZylMll0heZslObmoTj6p54N0seqfAFT+Hc BdzQ== 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=PfwQ1+SHFcz+b/nBJI5ZLj10Ytkkbr7VGW8sb/obm3Q=; b=nys/9AM5sk6U8QHR2w5FKWWyuGVBaqUv5hbeQr0fBnRzbbpMt+JXqoOP8DkuetfgPl Hn7Tp/SwSrhLDsB0hLFDQOQCnjA2q7OcWGhQouiA68Roy5C4/Ht3AG0Gud+EY9PjWCkO OTv9+L+HpRW/diEimqvzpqJUrnNo0lm0j7rJLG0l8FG59lnpRzKX+wfLgYhbDY3qf1iC EneJXjODshwUPJ1SXFhsjvKkvsh0oizsVtzyXKOnzYu4bWeXzLh4EDWyjR6bDst2a9OF vI1S+0IQkgB5JliKidiNRJxHcdOFkRzYT4TagzwRjVZyBBNBTVeMy6t8pL1y6LBB7bT1 tPUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="kr5f/MW6"; 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 f20-20020a50d554000000b004288e77d84dsor1924937edj.20.2022.06.16.12.36.04 for (Google Transport Security); Thu, 16 Jun 2022 12:36:04 -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:6402:51c7:b0:42d:f4ea:c09 with SMTP id r7-20020a05640251c700b0042df4ea0c09mr8297489edd.319.1655408164247; Thu, 16 Jun 2022 12:36:04 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-34.cust.vodafonedsl.it. [188.217.51.34]) by smtp.gmail.com with ESMTPSA id x24-20020a170906711800b006fec2097d53sm1130255ejj.118.2022.06.16.12.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 12:36:04 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, dario.binacchi@amarulasolutions.com, angelo@amarulasolutions.com, Tommaso Merciai Subject: [PATCH v2 1/6] media: ov5693: count num_supplies using array_size Date: Thu, 16 Jun 2022 21:35:55 +0200 Message-Id: <20220616193600.1835-2-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616193600.1835-1-tommaso.merciai@amarulasolutions.com> References: <20220616193600.1835-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="kr5f/MW6"; 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: Dario Binacchi --- Changes since v1: - Add 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 Thu Jun 16 19:35:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2091 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 132153F0B6 for ; Thu, 16 Jun 2022 21:36:07 +0200 (CEST) Received: by mail-ej1-f69.google.com with SMTP id n2-20020a170906724200b006fed87ccbb8sf1008353ejk.7 for ; Thu, 16 Jun 2022 12:36:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655408166; cv=pass; d=google.com; s=arc-20160816; b=k9K34kpWDHoBcjIwqtV2nFQa+pXuuFH7Dx7AO1+7kkVWQhhGZYIWEcKHlXhpEHMDdT wVw0ZNqdm4pQt9W5h78s6OfEpMSSwK73r0Adq47GJj2dHEa/j7UUNCaFKn++dKcZAvxL inue3LNmUv9m9aDOqCG1/7ivUDu09tMV664z0HpiGqtOxUMJMMls5L+DuEqHUe2zoMWX YCEMbxqRmyDTDw7KhkKHA2dU8+UMNdLgPyFVWrKLY/L+laDqdcudI4agZPW8WUdDgw/o a6iQ/vGnXCiCTrDFZt8bakIw+yYTdpsVsGbVKMx8pb7YD8/xOy0II7DI0iFbcV4B1QA1 mjsA== 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=smK6z9nGDLWOCksQ3x/Z7VbT5+Wioxz7UAVMCTPAMew=; b=h7vdhNcs4dU5tG/0DPFg02v0ZoZLSI/7AsHhj5n8+EjeOH0/RGtnDHnCrx85/vyd+L byC2xZA+enA7aiGn2TgSFrgQNLyoCyZsqZ+b9ytkpjQeIpdCaIbDUh3KnJADdlSzKOMq Cd1h+pPQcD9cCQkgzlusgeqkRSvuGTM2VKcCVsFyKrglSFbdqCk9BpTyfiWgFWX/WvGp V6u1wtBMglEXNRXrVDAi/FPFIWOY5mn9xbc6Qp9ohQkLe4XgDZJZNp+SyviXEVkF173O WuUsHUbej8vlgxEr5Z0T2AfECJG188bR8wG0unIUO0trC+vdULQ1oaYhOcZQ4gz5nwhW NUKQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QNetDB0b; 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=smK6z9nGDLWOCksQ3x/Z7VbT5+Wioxz7UAVMCTPAMew=; b=MhzFTgUi/xx3Dq5yKeDg+ud53Vha9Na1kYLksL8xg5a2zBZPN1CUnb71eAHNn2A9F1 EZokxTLIHi4+JTwNfiO63+xDon9lJUC/jO7xM8ZQhmeJKJXMjlpnJGZSxHvWvFY5/3yo 9AZ+gKGkRBI4vrHdLjM5JhBavE2nujOJJQ0Hg= 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=smK6z9nGDLWOCksQ3x/Z7VbT5+Wioxz7UAVMCTPAMew=; b=BccXd1CcWp0Vz2J8ktXvd3eaYYFrT5PdlbOfeDdz+r1Pw/lNC+CCFAd6SmNaxxZ4GX t+PedXTLduhfbcNBEpe8zPVdSDjgvduM8zi69g4G5Sh3NE/PGHZDNPblD9KLneboalrw h77XoGoJGxe8+ARfD6eUZekbv4KIH+9yeASreFQkLucCPsJj5p+EmvJkcC/JN4UdIDKL ZTjnoIlIcEW0oHdtBKggOZs2hrgiyDM0mGqcwAP01NZog+co4qTEEv5oirtzrCO2nUYT 9/0Gxfo0nmG4dccgq+ug3geQghDJ9lBY7lWpQootuzqtH0or04ZFf7Bya/XHNAbO4ecr uhBw== X-Gm-Message-State: AJIora8mRc+jFCSijjM0wRgXt0Ot4KX15nOcujJPeWs4gtRzosnTyq8j NEPmk+yDwXz7I06dRUYKLL+Vm0CH X-Google-Smtp-Source: AGRyM1vTvL8rrd+tx7vyVDQ8ev/CWAVq2SzXU10V/FvibdHHaVfsp0sZh6pk0baPxSI6ciaGgj7nCQ== X-Received: by 2002:a17:906:6947:b0:711:a86b:6780 with SMTP id c7-20020a170906694700b00711a86b6780mr6112948ejs.686.1655408166875; Thu, 16 Jun 2022 12:36:06 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:5ac1:b0:6ff:ab8:e8f with SMTP id x1-20020a1709065ac100b006ff0ab80e8fls150888ejs.6.gmail; Thu, 16 Jun 2022 12:36:06 -0700 (PDT) X-Received: by 2002:a17:906:2001:b0:6f3:bd7f:d878 with SMTP id 1-20020a170906200100b006f3bd7fd878mr6028607ejo.133.1655408165816; Thu, 16 Jun 2022 12:36:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655408165; cv=none; d=google.com; s=arc-20160816; b=hvRmF4hLS+ckwOlv+h2KTivKs5IZcukRFYgnUZ21pZMH6jGqswOzl+o364FXVsH7di pOUKPlaQ0ylP1jRHm6bZrmyisXRdutGL+vt6xnpaBSrAt/gzDMHCgFH753QpRwvdMY/9 OPyAjh1VvYZYZQ4cMjEoO8NYdQ8v5gNX4UuMe1ch0S19doyYVh7v/4z+vMyGh8XsEWJH 9lZkWMIDdQsGE+2rMLSe/fVDwNY4ighhtjmjnCaLf73wY0iblzoYG1GCK3rMrWq1jSyd c7Lcq0cQtMYImkfo+QlFC2O4hZxFCOgSDKspV/3qQzTch3OOryOwDOyARvkq8prmcHXX 7KzQ== 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=YzjZTddT6ot0vVSR+YoWVpPVQkdXOJsJv/zXn5zw+N4=; b=f/rUp1DFy6dNq1EoRCtLy7zgagMpilrcQ+e6m+sQF6SP58og3fOUR9KmsXke6sUxap 2o9kGLAmcoGpkb1hUxQXN7sBM1aMpTvbAKSgC1e+bbro3AZLrBByEEZS/v4WCEoqNwGJ 4LbQ+tBtBWQ++ITazCqozPnW6mKIG1RlHm6/nDub8uhGjZPPToAWHERpRrxkqVqWkrkk XYcVxh9afQf1ClIISIU7koOKZsaoqHPs3QWXBTUQnoN+eQTG8mpVFIrL6RaHy6Zyo5p7 qciQdDWqHFcI/56zVh/LwjVG6jGISLNJTPF1KML0lMXj2JUmhbRNW5l2sVzoglIW1Vqe 5shw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QNetDB0b; 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 a26-20020aa7cf1a000000b0042dd07cf8c4sor1841419edy.42.2022.06.16.12.36.05 for (Google Transport Security); Thu, 16 Jun 2022 12:36:05 -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:a50:fd01:0:b0:42e:1e73:955d with SMTP id i1-20020a50fd01000000b0042e1e73955dmr8440065eds.148.1655408165482; Thu, 16 Jun 2022 12:36:05 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-34.cust.vodafonedsl.it. [188.217.51.34]) by smtp.gmail.com with ESMTPSA id x24-20020a170906711800b006fec2097d53sm1130255ejj.118.2022.06.16.12.36.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 12:36:05 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, dario.binacchi@amarulasolutions.com, angelo@amarulasolutions.com, Tommaso Merciai Subject: [PATCH v2 2/6] media: ov5693: add dvdd into ov5693_supply_names array Date: Thu, 16 Jun 2022 21:35:56 +0200 Message-Id: <20220616193600.1835-3-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616193600.1835-1-tommaso.merciai@amarulasolutions.com> References: <20220616193600.1835-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=QNetDB0b; 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: Dario Binacchi --- Changes since v1: - Add 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 Thu Jun 16 19:35:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2092 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 58A603F0B6 for ; Thu, 16 Jun 2022 21:36:08 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id h17-20020a056402281100b0043555086cdcsf1325460ede.15 for ; Thu, 16 Jun 2022 12:36:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655408168; cv=pass; d=google.com; s=arc-20160816; b=klR/wQP0W89v14JDfN0qEwnmHwzN4Eo0W53KMUX+0yEmz+D1jvWXBXrOQZ4xWtmIC4 NkCa81J8rK5hqd4B9ptfYPP4o8sn3qbcpZ8oc8aGfjQvdAnvcQWETXliSixASHJniNir eML9la787FQNPPyfQKuB/ef1NCoTYmgHROFiCOBy1nGeBRoGBnCXDyInaoBHKFVhItf8 52nZ6pzIgqv4i5HVshq4idDsUMvz3w7ROuVn0aZtM3TmWP3d7G5EZvELs5QT0UiMKzA3 VIFQv6i+zFajmBONXwdKOtvyzIzgMWxo37eMVYGdaqeXQToNC+riZOZm7OAMteC7Ra5j l2jA== 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=QP0BuH3nLh9zk0mKfB7QMQu6SILSMg3dCBY7yPQEeI4=; b=LzwBB67G8DV28GH0Drg1Yv7Wsm9U5FXFY6ZAia8h6x23iF7mF+tRCkb3FbdfMlsLeV ND1s3m1cB7KTgq6uL6pKot9QWUKsJVNPsrBA3DAIbVXmePdZEzM0Y0deo2SnC17E3YS1 VldrXBSrNVE69237kRGepe6Kd3fNVU91W9+21INYE0ufkw4yt5XqAK97UqnYxnQLzMg5 KnwmLgLFi/mj1hBLRrHdM6ViE9s8gg+0Xz28BoC8kcnKe7ZEFQMn6wgdBW405PfgEr+V Vr6c4rTIZCi0c5Cv3GAfaY4wrWgmFNHKCU0BwNXLjUlI2Yv6nSZL3+44+FNZSsWX0vDG srPw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DO9+vEKH; 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=QP0BuH3nLh9zk0mKfB7QMQu6SILSMg3dCBY7yPQEeI4=; b=emQlCJo+TIGJu1wBi9x62/hxnUIHPCWjG4KxSlnu0D98fjm5zGdksp28GdvEAJgU3N Dt7B6OrIf3qxhYrKpS3DkAzmQx/NZR6yD3YL1MU+W+Xne/Kl+9+/3+HlWjc0Y7PKDOfd KB5K7OCY2u/+ga22tJPPCNNN4HHKWveM3DYhk= 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=QP0BuH3nLh9zk0mKfB7QMQu6SILSMg3dCBY7yPQEeI4=; b=LxU8ib27LlaAHBCp/kA2nqxRd/5iCv4Fcvc8Cw5PSY/Jc3AvbKvy7tT3dRX5mSikov IUbAJm32dRgvDubBpK/kGml9pVH+dAJuLNxztHqY+vgkfHtJiSv+U4F1o7jxudf5QBXN Am+2S+UuQik/9j8gSG39pnRF/B6Sa1KELY/iYW4sJsDhQKHpDDuoPF0amKUJRCviXzju tYn/xV3kmgrXIxx1QAO2TSZpp9QeuTGuak2Lvi4clL1QuA+FQqk0hB8i0D5iA2t4Yntl 9npr+96w3PSv0ybv61HTdAqbX5hEnQqxPRPzQIiHa1MVJ5VZt/Uk1N8UFfwm38dDTHic sWdA== X-Gm-Message-State: AJIora9kzRQ3Q8hXdRfAfl2hRwUktTaQKQo4hmg3S1hT7hDlDqggWkTE YbAA90+cd1BZhmAmp8sj+LEE7CeJ X-Google-Smtp-Source: AGRyM1vfcHClp05UH1TRxs7/va02roSn9Fi1xHVUceLJMu+8fLL8hAe2wP4Sm9GIV8YrJUuxSkI8Fw== X-Received: by 2002:a05:6402:2741:b0:434:fe8a:1f96 with SMTP id z1-20020a056402274100b00434fe8a1f96mr8359080edd.331.1655408168189; Thu, 16 Jun 2022 12:36:08 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:709:b0:431:3a5e:75b3 with SMTP id w9-20020a056402070900b004313a5e75b3ls201699edx.1.gmail; Thu, 16 Jun 2022 12:36:07 -0700 (PDT) X-Received: by 2002:a05:6402:35ce:b0:430:cbae:d8d with SMTP id z14-20020a05640235ce00b00430cbae0d8dmr8482542edc.369.1655408167093; Thu, 16 Jun 2022 12:36:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655408167; cv=none; d=google.com; s=arc-20160816; b=LWRETJiMu82doU7a1Rpot1mzXSVsCHmGJlffiHCDcNQUtucpIV/F6LtBheOZgXwxcW qUqdfHOS63o760vIzaQkjyI+vxTA7srmnhoALcicnlwrxYNLkGlZqjNbBSmiWi9R9t8m cw+9kgkEqj04sPHB6xbnQBYrcVRd3HXZ9WD6IrdYPH7R7eVjhW9Xof7wJ702MI+39pMT mqITsHspaRatiaO0QDJM8jd9KHzd1Y1O/rS9rbcHoGHTQkYEMgp0lG/72kOuX4pfKPFn sZ7+EOj2M77PuNEL2wXN/nJnFZ9UUgLEAojHo9sdhW08t4AY5NAQqvW0brtS0cJcoZIN u+MQ== 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=G4OEOXi0phbd1Q1xDXnKIdPad9oihs5sqbpj/6rQA1c=; b=hiZ54tgCLNP6f+1WWcIljjutm0nKk5uifBFTIrqgyM6UYKHN/MNyTCM3KImuSCD5zy jjXMUgoV0hd+go52twIp17fSY6QkJv1IDm5jkXF6RmvfkF6mDXbIxomx4oxJsX4uKJYX iVmUJ5UiE74c6dEojxYD1Lcn+s40Rn5PJZK3xr2q+bX0VgJsmi5rfLOPqQ44RsrFUOLA B0IY6iMqrkjAydDas7robA6YWlhJm7d/xw3f9EhvAWTSunp28ipIhO+AGEbL9Rc6Dw74 PBo/D1PlyHvTghTdnm9Jc8PmTBzaftBKcVzKfWWXUUmoQExLoc3k/4+i1uSxjM3exrWS UNzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DO9+vEKH; 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 u26-20020aa7db9a000000b0042aa8e4cadfsor1867376edt.70.2022.06.16.12.36.07 for (Google Transport Security); Thu, 16 Jun 2022 12:36: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:aa7:dbd7:0:b0:433:55a6:e3c4 with SMTP id v23-20020aa7dbd7000000b0043355a6e3c4mr8677193edt.74.1655408166689; Thu, 16 Jun 2022 12:36:06 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-34.cust.vodafonedsl.it. [188.217.51.34]) by smtp.gmail.com with ESMTPSA id x24-20020a170906711800b006fec2097d53sm1130255ejj.118.2022.06.16.12.36.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 12:36:06 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, dario.binacchi@amarulasolutions.com, angelo@amarulasolutions.com, Tommaso Merciai Subject: [PATCH v2 3/6] media: ov5693: rename clk into xvclk Date: Thu, 16 Jun 2022 21:35:57 +0200 Message-Id: <20220616193600.1835-4-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616193600.1835-1-tommaso.merciai@amarulasolutions.com> References: <20220616193600.1835-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=DO9+vEKH; 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: Dario Binacchi --- Changes since v1: - Add reviewed by tag - Squash 0003 and 0004 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 Thu Jun 16 19:35:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2093 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E55263F0B6 for ; Thu, 16 Jun 2022 21:36:09 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id v7-20020a056402348700b004351fb80abasf1876992edc.14 for ; Thu, 16 Jun 2022 12:36:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655408169; cv=pass; d=google.com; s=arc-20160816; b=YNxXPleyXZYuv3vZcXAiOnhsKTHZXu3zSHoXiHfR0yDJAchUWlxzPggee7X0MJxjQ+ uvQ1ZzGdZu+kvOsLgTpwryOndOKykNXF6k6Rvx0/xT6vUw024O7u5s5g/pcSWRmb5KqM ACFoyHolY1PCc5m0c4KK6W8R0QzQAn/NcyoeOrwkLRAaFMLrU6UaO4lnzmbdvJsKkBAB MxOKv4kovi9I03BJhNXR+ZsGV341Dbz83+dLp4fv2Mg7HQ0Xvrx7BlyyZT3POiuqbPJi 0+0DJmyFoVJxjDsdNdxQdJwzqdJBct9B1vbjdZzPtCVkMafdKEfK/dnTMaGJUI7y6Gk+ EVAw== 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=Nj5pprS1LE4yxGp9zASkSVlx/JZ9S9Gj64ACLHKKTqg=; b=A9tNgQbvKyQTckUBRNstAyJ8c0M+xJdZXjmZggddX1k1DK8249zQjDyk8y2D++ANsr UP4HjFnHfxE9bxJsa5zHI9Qn/Gp6ilaeUUVIBc8+uzy/qCAo0pjp4012ux0AROQICjIt jfqVnNY6QKZTyd8WeFfh65hjVewFvvppK0LmehbZC5pqN2cbV9UEnVt24SjHXuuWkoiO J5vcCe0ln86kbjVm0sLb/UsuFBPepL5yCY5ZUJRcITml3ENy4pIsc4azXP4csXPt9VPx EkjLloffoqRn5mTuMgZ2uq3lLpJ10Xbxwp6hq2M2S7uABwiJtZz5A6Bpe4dy2NqYDE+M 8oLA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=duW1yvKL; 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=Nj5pprS1LE4yxGp9zASkSVlx/JZ9S9Gj64ACLHKKTqg=; b=NEwXJEKjFLLRv2t1ILcZKWEjfBPyDz0vyVrgwUkj7vM0W1y1q+YideCqAAsy0PeuB2 +OUJLCrFsJGa004BLC6j2sXNZ/97sJe13N+y+hhUrgjM20o5NLMpQZ2uHhpBb4WPkCPf EaBNUs1fJXSY0YkF+MgEhifqJSx5X5R8fAZU0= 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=Nj5pprS1LE4yxGp9zASkSVlx/JZ9S9Gj64ACLHKKTqg=; b=GLfQc6+9Z67SYnoZk1ortWn6KoGaU9p4VgO+MQDZlMs5mmw2YrHdM2gmbVHWxp4DfH Q6mKRxvPnH77zdv9tHzuwwUFcYLtkskhNGRNvR3WuFYbWkvmLlDnQq04HPt49+JGWGA4 v/yPjwwQmD1fb+HQAnGmGv09Kq7WVhPHeIqF0DWEEViVn74fg8ojG5T1mdO9bUs45S5q juNLTf6qnBP4JbhCPekUrYVlL3/sIcR75Nja4ypG08MLL+knb5QFQpmxn9ft6Kieen9i 7bJdpG9tLuPU/XFC993mf0IiLoufv68AOPVk2W9075lfs6BBV0rP+nRwD+stekOGWubl x0kw== X-Gm-Message-State: AJIora8/9KG0X8o9KX/uFKTAEOBTMcICaPcyrsJlT9LbTH8rA6ZGFs+i 7+w+KDx9dBjHWtXOumPdyz3wfV8S X-Google-Smtp-Source: AGRyM1sBRI/wvfqbgfPNEVxgzBRZJVB35dtPNqKCIabkMGl1WzzJyzTLMfXLmyVHjaZkYflJsGjgdQ== X-Received: by 2002:a05:6402:2490:b0:433:5d15:ea71 with SMTP id q16-20020a056402249000b004335d15ea71mr8433825eda.12.1655408169598; Thu, 16 Jun 2022 12:36:09 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:907:9705:b0:70d:ff46:7086 with SMTP id jg5-20020a170907970500b0070dff467086ls150748ejc.4.gmail; Thu, 16 Jun 2022 12:36:08 -0700 (PDT) X-Received: by 2002:a17:906:c154:b0:711:ce44:a0a0 with SMTP id dp20-20020a170906c15400b00711ce44a0a0mr6071774ejc.420.1655408168500; Thu, 16 Jun 2022 12:36:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655408168; cv=none; d=google.com; s=arc-20160816; b=KrltIkEdx6xTZZC+5hxTuT9bhLtmCBc+c8h7s/RvqYkOwKH9lE6JHEGLP3S6zPxKWz 6KS33LSnXth0B59OzkLEPUBqvvHvS3ygHCaFTJKL6qnywSZBWvA1wrY1IehNzKnIYRgJ Bor2NP1ZFkDQoKaOyhClLuNmwc52p66amAC44FhLrWqrlB5UWLi8BISH2pB47CRYmqp2 5zULCR3a+03BYNWCcgDHf3/YV4H1P48kp+oi/m5qRg/sbqEuIRfweEOVDrsL46pFACyE k4DzJA0SudcwcJy6rwPhitzBMfl+mFI8PO3JE1+DK0ES5uZXiTE1EUHnn794HaNoTIJw k7yA== 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=D9I5L95o8S0by+A9cVvxmobcEEcHkrFh8vGIKK7RWyo=; b=YXlqMYvyiUBKDEyLW6HZRj8+VWOjqauU9iwJ1nzrdA4oS9gnYUCZYPyOPCJnKN8yBm ZlDIY+H3SVb/RgyrZaPnwZ8CgDCRGI0/to73CzJqLpKThQQi77JyZYOIvCnD2uYmdoqA XvFU2QlUwxXm145ZW3j1Q84IfcwFgIcRjg2UkqpnVKOpaNmzb50ot7MxMs0KtAawV7j5 t6w6xQ8X1+nSWdJGEEoqvYHyJtHtzJkICPZ/MxtS7n9ZLM6Sb27+OLKrvwkdYwjby/EG 5FmwISQwgsS3mUOk3nMFhEIuAaahOb9fgw6hsDgWYsiftgnjJozW+7z1qL4Cg3jIl5Zm LW7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=duW1yvKL; 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 c4-20020aa7c744000000b0042defd3be86sor1895929eds.67.2022.06.16.12.36.08 for (Google Transport Security); Thu, 16 Jun 2022 12:36:08 -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:6402:388b:b0:42b:5f20:c616 with SMTP id fd11-20020a056402388b00b0042b5f20c616mr8460238edb.50.1655408168166; Thu, 16 Jun 2022 12:36:08 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-34.cust.vodafonedsl.it. [188.217.51.34]) by smtp.gmail.com with ESMTPSA id x24-20020a170906711800b006fec2097d53sm1130255ejj.118.2022.06.16.12.36.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 12:36:07 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, dario.binacchi@amarulasolutions.com, angelo@amarulasolutions.com, Tommaso Merciai Subject: [PATCH v2 4/6] media: ov5693: move hw cfg functions into ov5693_check_hwcfg Date: Thu, 16 Jun 2022 21:35:58 +0200 Message-Id: <20220616193600.1835-5-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616193600.1835-1-tommaso.merciai@amarulasolutions.com> References: <20220616193600.1835-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=duW1yvKL; 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: , Move hw configuration functions into ov5693_check_hwcfg. This is done to separe the code that handle the hw cfg from probe in a clean way Signed-off-by: Tommaso Merciai Reviewed-by: Dario Binacchi --- Changes since v1: - Fix commit msg as suggested by Dario - Add reviewed by tag drivers/media/i2c/ov5693.c | 53 +++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index d2adc5513a21..d5a934ace597 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -1348,6 +1348,38 @@ static int ov5693_check_hwcfg(struct ov5693_device *ov5693) struct fwnode_handle *endpoint; unsigned int i; int ret; + u32 xvclk_rate; + + ov5693->xvclk = devm_clk_get(ov5693->dev, "xvclk"); + if (IS_ERR(ov5693->xvclk)) + return dev_err_probe(ov5693->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(fwnode, "clock-frequency", + &xvclk_rate); + + if (ret) { + dev_err(ov5693->dev, "can't get clock frequency"); + return ret; + } + } + + if (xvclk_rate != OV5693_XVCLK_FREQ) + dev_warn(ov5693->dev, "Found clk freq %u, expected %u\n", + xvclk_rate, OV5693_XVCLK_FREQ); + + ret = ov5693_configure_gpios(ov5693); + if (ret) + return ret; + + ret = ov5693_get_regulators(ov5693); + if (ret) + return dev_err_probe(ov5693->dev, ret, + "Error fetching regulators\n"); endpoint = fwnode_graph_get_next_endpoint(fwnode, NULL); if (!endpoint) @@ -1390,7 +1422,6 @@ static int ov5693_check_hwcfg(struct ov5693_device *ov5693) static int ov5693_probe(struct i2c_client *client) { struct ov5693_device *ov5693; - u32 xvclk_rate; int ret = 0; ov5693 = devm_kzalloc(&client->dev, sizeof(*ov5693), GFP_KERNEL); @@ -1408,26 +1439,6 @@ 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); - } - - 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); - - ret = ov5693_configure_gpios(ov5693); - if (ret) - return ret; - - ret = ov5693_get_regulators(ov5693); - if (ret) - return dev_err_probe(&client->dev, ret, - "Error fetching regulators\n"); - ov5693->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; ov5693->pad.flags = MEDIA_PAD_FL_SOURCE; ov5693->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; From patchwork Thu Jun 16 19:35:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2094 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1CF163F0B6 for ; Thu, 16 Jun 2022 21:36:11 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id s15-20020a056402520f00b004327f126170sf1905436edd.7 for ; Thu, 16 Jun 2022 12:36:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655408171; cv=pass; d=google.com; s=arc-20160816; b=JAbOl+tcWnvziCSrDKuBKPjvzoJVaJcQQleeKyAOSy4xpLO9YBCkOX5ehWU6NvoN/+ VS68YEwHh1Dj6PyYuRN5dJK560HUTjTMUSvrK0gVlqhpwWy29oxrxwZmUvL1xmiVENB8 40roX10Ckn7KEVe5Aq3PD27Az8l/FNtotXLPhgWa7iUcMR5f85vD5tFOGxUb0L0gMD1M 01GdOZhfO1kMFTd40n11KTa86vkuqa/xPbhqqHsRJcARmnjfmPQOfBfwks2hEbXSmDY0 chh1HvZnqRr2iF8riyjFxxYhOmuz5nHhV8SOsJtQTO7aXNlZXWsVmtiEXobHdH4vehtw GFlw== 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=6Fky2ph5AWoyQy/64MwUk/BccvfHUUSqevjXpus02pU=; b=m/FiM0FzQg0nWwHAypc9bcRDw56RQMFUxlF23FUf/nhLq1huhCbC/c6JTE41tqax56 YTmDey9S/3+kSJjF0oSU4SBFQuucxJDkiSnECXK6C87yDrP+QEGjgoKnQTmeNVYqUKsK E2acK8bLkFg2oihA/jddUnsycuxrQVtQ2d6qtluzG6NaVDs6ndgmNSK8L5G5jB6c+VTo azBEXAfRTCyia9kkazzpWYKsYdUkqtwMBPDuMP3dP/akB8DSMYPdknIoc7hAqYtPWEBv JOkzhCmyCWSoQ7nT0G5dIqgPEN7yD0Q2KRnu00thDYbPy/0HGNDVta9XFxQp4Dv0wQW1 8A2w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cTMKNwBN; 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=6Fky2ph5AWoyQy/64MwUk/BccvfHUUSqevjXpus02pU=; b=haslo70eE2VsHBeITWek5LcsP3ejzAjLYKXyKV1GKKKr3vSNlyv7KlAmtK+SXsjyoC 3HF/R1JKQBX0PlDjonhCGiFRJbbA5nIZDKnsQ7WS9EhSrh4HMBORG4Yj9Ii7yu/NW1Uh RarexMPZeRuSm0p9BKhEQTQAwDVKdZ4zEbDy0= 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=6Fky2ph5AWoyQy/64MwUk/BccvfHUUSqevjXpus02pU=; b=NMB/FhPukeS28FyIqP9gA7+Xi37u8EQ6eJB5GVYaThtY0m/h4RSUkOUpk2veqikV06 7KOQvxkG48wlY5zB1/JFurIvWwlgjHhzdfR7Gq91noktxMoKJhgshmqZCKD7IVmbaR73 P8iG7vqQKPeF/QFz37sWJku2YsNI7yKGvFu0iM09Kqf1fOXwlPqTy5IJKD5hjjvElDWM jsq4rGs/EzcDWTEut4NmWO27oA3UaZqfjj0qR0NTwB9e5d7q9wMb+wI4OfdswiS9aVRX njRthDPHC4aAHG8qf/i43ao57f3w+Mes/P3Xz6mxTtquI1iQlX78nSIf405LgK7YC0Jg Dhmw== X-Gm-Message-State: AJIora/M+1r6jJHQ9/+VQG77/1AkTmCamd6ZIHYpZFlYnvI/Ol1iIDBQ k8qzeDOuSvGslmlbXWtnWjVdRE+3 X-Google-Smtp-Source: AGRyM1trWgoAYVs0zqHqEJ5pHHW5qAz1f2F3xTxTUlJNkQA8NtoudmRzw5Pxk+U8O3RoKuEhH6bHcg== X-Received: by 2002:a17:906:685:b0:6fa:8e17:e9b5 with SMTP id u5-20020a170906068500b006fa8e17e9b5mr6154448ejb.522.1655408170947; Thu, 16 Jun 2022 12:36:10 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:907:9705:b0:70d:ff46:7086 with SMTP id jg5-20020a170907970500b0070dff467086ls150777ejc.4.gmail; Thu, 16 Jun 2022 12:36:10 -0700 (PDT) X-Received: by 2002:a17:906:77d1:b0:712:57a7:e897 with SMTP id m17-20020a17090677d100b0071257a7e897mr5789070ejn.431.1655408169851; Thu, 16 Jun 2022 12:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655408169; cv=none; d=google.com; s=arc-20160816; b=ladoIVuLyONjCBu9Km477rfTAVomJN+q/9p5JRqBttVDUTdjYVK7Ez5cUIt28eiE4f f5kthJujSAc7RD8XSLvroFcYYHDoqucMdpG5OVt2LWTCQdK/JcM4aYdVSlXXaFdOBg49 Lo4GRUfqhYXajkPc7H6Sy7OiGOrfRKRGixWHgYTVDTF8RyAxaB0Rh0XMhetUlJR2F9au AAwgPrz2Axk6P84YMku0xIy9IZYiwYvxIdCT6lot7t3dFPYsjabYHlDW0LWOVUa6vq7b Zzwx9gi2Y/vmpdW7c8MxYcCVG4PwhncEa2CKpuT5q0ry7F4jk1YNdCu7Boaj8FEnQSJj jFsA== 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=HjnFuza1rcU0b5B3ler2u6VkYPEl7zx5pFR8VOgwRLk=; b=tJFAzQ6edVR9njw5RwUvI6ntfNKcLXx+77gAUsIAk1EyBCzWZBA6lY0cyh4kdkb8SD 0IbKtXX6UZaeb+Z73Jz5dM49tc26M3YHtJEL4YVaHyFx6MFHd8q2Kk52mmZ0WSHlvfEd yJwbqOByl74akrCK9zjN6gwT13kxFEXJeXcpxx08yf6Qu/O1jFpyIKId9+zykJh9aLDV Sva4T6Czawarh0Lp9V7C/reegHwsvZXQHrEL6jdEQNYH2AoyZPn0PPeSQRXUGQThAg2t 8tJ4eWywR99dTdavdApGuBHJLP8ENSuqknDHGZ++OLhWvPd/5TESfjvqO8uUVbT4+fdq XVsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cTMKNwBN; 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 hw19-20020a170907a0d300b00710dac1894dsor1211920ejc.118.2022.06.16.12.36.09 for (Google Transport Security); Thu, 16 Jun 2022 12:36: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:a17:906:7786:b0:712:3c92:4335 with SMTP id s6-20020a170906778600b007123c924335mr5735084ejm.610.1655408169485; Thu, 16 Jun 2022 12:36:09 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-34.cust.vodafonedsl.it. [188.217.51.34]) by smtp.gmail.com with ESMTPSA id x24-20020a170906711800b006fec2097d53sm1130255ejj.118.2022.06.16.12.36.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 12:36:09 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, dario.binacchi@amarulasolutions.com, angelo@amarulasolutions.com, Tommaso Merciai Subject: [PATCH v2 5/6] media: ov5693: rename ov5693_check_hwcfg into ov5693_get_hwcfg Date: Thu, 16 Jun 2022 21:35:59 +0200 Message-Id: <20220616193600.1835-6-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616193600.1835-1-tommaso.merciai@amarulasolutions.com> References: <20220616193600.1835-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=cTMKNwBN; 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: , Function ov5693_check_hwcfg don't only check the hw configuration but also get the hw configuration. Is better better to rename this into ov5693_get_hwcfg Signed-off-by: Tommaso Merciai Reviewed-by: Dario Binacchi --- Changes since v1: - Add reviewed by tag drivers/media/i2c/ov5693.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index d5a934ace597..273caef467fe 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -1339,7 +1339,7 @@ static int ov5693_get_regulators(struct ov5693_device *ov5693) ov5693->supplies); } -static int ov5693_check_hwcfg(struct ov5693_device *ov5693) +static int ov5693_get_hwcfg(struct ov5693_device *ov5693) { struct fwnode_handle *fwnode = dev_fwnode(ov5693->dev); struct v4l2_fwnode_endpoint bus_cfg = { @@ -1431,7 +1431,7 @@ static int ov5693_probe(struct i2c_client *client) ov5693->client = client; ov5693->dev = &client->dev; - ret = ov5693_check_hwcfg(ov5693); + ret = ov5693_get_hwcfg(ov5693); if (ret) return ret; From patchwork Thu Jun 16 19:36:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 2095 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 979E43F0B6 for ; Thu, 16 Jun 2022 21:36:12 +0200 (CEST) Received: by mail-ej1-f69.google.com with SMTP id hg21-20020a1709072cd500b00718cd4dcf6esf991980ejc.19 for ; Thu, 16 Jun 2022 12:36:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655408172; cv=pass; d=google.com; s=arc-20160816; b=pL1RLl+dVTAv22dc/+PTGRpQydWZV9xNuCQ482LuoeAgzf3L9qPH97zu6QAcYZvsDn /FZvsDekXQ3SloihxAZzYXt07XaE3PXJC8jRxrx5MH2dsufkTROfzYu1Ndze4esv8fxV TEcL+qkB8cL0LAEYHkHS1fl3G/mhbGLBpIw0e7BhiMwD6BLhH4XBERxgBJMLs5jJeE+v 90qP5+UM0cpChgq9PhUVe3cXLewr65yqixM2vSTnWYFPlvcvdAvwtOuvIJ3lMkEXakdE K+NcjTXoE/6JQo9CroxIIdqFpnq8q1Ho6Efnh2dXvsNlkbHpeRxNCplX4b7NI9ZmFQyb 4xxw== 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=sHJrRbcO+9gUYCw4T9s4Rwc51B5POzESb2ojQGPAaSo=; b=pvPIrsktdzoOfEOwVjX2MR4Kok7wsyn29nQCfRUlxwNIEzln7AOIcanbQjwAn9iNZh k1NZGaTZJ1WVmJnArgVkpuangwjg7A5jYqOtoGPOT2GnoZees7CxLTnXkb8h+aAKih5W 2eu57wj81EW961uPhfeJRNWx044i46CiUaaRnJWNBGg8JyIpDwrLGoHPNctDO8qKyTy5 lViY9M5qehJ4IwANigw3WBR8+uPnwc4yXRTX/95qqvrEaRiYZgr0zFLTiVvXKIg8isjW UQCyCTUSKJ81fM5Z0uVENiQpIaxLveF4QrHWpXWfhWfohM95e/J9t//o38ZTlhUS/hH1 uIfA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kqGrP6Na; 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=sHJrRbcO+9gUYCw4T9s4Rwc51B5POzESb2ojQGPAaSo=; b=CQOqMdJKoaWk7hzk6bIshSYyuFe8RHTUph5tOxOYnukJErzBI78Chm4e3cpxwDOMtq +HnKOeySFIfkhFqNNyYzwLJTsd2DGPMci7c2WDjXor4aaOeLXzkPK/gStCdKRTQlg+/J Ai+780M9qEtF0FrMXYtIRHTwjfG/Xps7AW/XE= 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=sHJrRbcO+9gUYCw4T9s4Rwc51B5POzESb2ojQGPAaSo=; b=L88ADZl2zqNz8hW/XsX9znHYpkvP7e2KAWdi19Al64mxcPZ6ysP4Qnl7nbzqg1ixul 8v22unwQ1JRlyMwkYYbLbC7pHdXK9QA9gmiifKJ4Bzi9E4wkIj9vTQ6UaqaJ/N+Yenqk vUNSwRU6fGZDYWkof7+uJIxw5pWuQXmevJsfbaLy2RVs7T/acN0XCG4fyBILzORG1COi HG3lm7DXE0W/ll5GIHE0/m4objAXwEypwyqqq/J0USyS0dR2GV5CB1k2M9p6UWpptwzF NaHufR9H/xwcsTpL6AuYV2Dl9pEUckPgxiJmkrz4J0hxeXERlqlmZ0dsgycvcvhzXdC+ 4GRA== X-Gm-Message-State: AJIora9YrEL6cHqsxtB+31facUMFbdo+CM3IlriPyz0KXJseRZemmcvn 4BjheoFmHHraeo4RaOposi+4/bZg X-Google-Smtp-Source: AGRyM1tuHyA1EtKaW+eoyLH9cNmq8soRJnaUIDr+S9sUufsZNtjBV+SaDnXjncmyBO/GTcVjLQoxIQ== X-Received: by 2002:a17:906:2f92:b0:711:cfe6:b117 with SMTP id w18-20020a1709062f9200b00711cfe6b117mr5734261eji.665.1655408172397; Thu, 16 Jun 2022 12:36:12 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:907:97c4:b0:711:d2c2:9fa4 with SMTP id js4-20020a17090797c400b00711d2c29fa4ls150119ejc.9.gmail; Thu, 16 Jun 2022 12:36:11 -0700 (PDT) X-Received: by 2002:a17:906:1018:b0:718:dd3f:f28c with SMTP id 24-20020a170906101800b00718dd3ff28cmr6088525ejm.55.1655408171286; Thu, 16 Jun 2022 12:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655408171; cv=none; d=google.com; s=arc-20160816; b=VNUtKdOMoys6lMYtkf9eYOp3InnYb/ovt0dlkDYa+PCkDRhqobfklJ0Vs68ChiphnF wHHCMINate606ZDLJakU3vLorF7V9+s4tMwNysujvE7zQ+1g2opQgTQVBYCOokKJdt6k mO2xbdnCxQVBEGeOuVUF3cdkksHFEmYR0vFU5TAMLyNYw/O7yN7ojY74UpC1kpohhcgA V/p+dswUKfJ7kLbWduBEjDi+KgjZZxw8XJGpng8fNZ0Uk4d2tnzx88VP9wdfUut0O/KB aMu4oQ7ID88yPRkPKFeVkcZ2eoC2lTripr7WCVQPGrw6F89APb8tyVvp2frejomHt7H1 WUTQ== 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=8a3jxjwuLV/vO5C4NVPChWfokDcoIRW2Z6C3TphMEgw=; b=w75vUwXAzYUgVEbm+rC0L8lYI0yhs5CITSDdkJMVM81p66Bfj2ZftFRTOVdjiDe5Vx XZjWZ9Q6zd0vKKAngWo+SCijqWQgJ01KI/ArNvFqyOHjGNX3DXP+QQfluDHL6FDrFbFS JYEPc4HB5d9DzhLQDAx+jdFgK/lKhaoiSbJNR0Ga0uga1dAvb4B2kfPPqVkCzgXVcsoZ Bw+JuU75aFZ8BILK6Qn4EIFJXE+5RNm75OhI7tdVLlGZWKzku9SBqWJX44Dr8VrvbG+k xuaUh+RsU6lPZkmdr+6QoKdquEnpY4iw5fuVHlh9h7SqzEg/YLNsfqGkRfD7+9Fo658Y MZsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kqGrP6Na; 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 a24-20020aa7d758000000b0042db6e89d12sor1909297eds.17.2022.06.16.12.36.11 for (Google Transport Security); Thu, 16 Jun 2022 12:36: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:6402:1f0f:b0:42d:d4a5:a38c with SMTP id b15-20020a0564021f0f00b0042dd4a5a38cmr8366291edb.140.1655408170944; Thu, 16 Jun 2022 12:36:10 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-34.cust.vodafonedsl.it. [188.217.51.34]) by smtp.gmail.com with ESMTPSA id x24-20020a170906711800b006fec2097d53sm1130255ejj.118.2022.06.16.12.36.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 12:36:10 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, dario.binacchi@amarulasolutions.com, angelo@amarulasolutions.com, Tommaso Merciai Subject: [PATCH v2 6/6] media: ov5693: add ov5693_of_match, dts support Date: Thu, 16 Jun 2022 21:36:00 +0200 Message-Id: <20220616193600.1835-7-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616193600.1835-1-tommaso.merciai@amarulasolutions.com> References: <20220616193600.1835-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=kqGrP6Na; 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 Reviewed-by: Dario Binacchi Signed-off-by: Tommaso Merciai --- Changes since v1: - Add 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 273caef467fe..0854226dc140 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -1532,10 +1532,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,