Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1624408iof; Tue, 7 Jun 2022 08:50:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznbqZio3mwdY+482/20a1iSL50/NT0/ZvIdjpDhDvKDIMJnhYMsmsrZnIeAFAzwR0ib9wm X-Received: by 2002:a17:906:aad9:b0:711:d024:4b9b with SMTP id kt25-20020a170906aad900b00711d0244b9bmr10610027ejb.490.1654617046940; Tue, 07 Jun 2022 08:50:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654617046; cv=pass; d=google.com; s=arc-20160816; b=ji6F/41qg3lsCBzjx/FFsFPyOGwUXkWLnWOwjIossJnYf6eYiFhx2bGib0CIRhdZr8 VreCYCNGwxRWWVI+AGiiTUKZqWy7P3CrJE4bxj8ybEKPQ4bxlSRoUhCSVX/7y/R9GgBv 93S5xqbJLEkX95Oddux+d+U76iKL5Op94VubYC3DKVJMtKQdb3LORgUAZO6CqDkDtyq9 cDdbW8LAAhPCOCYnU+Pcztuj8dR2G5DLWCVk092ps8L1wz2qnxBs0E9QIX0j2yQ0F2lb qXEslBQ2yPwQT3W8uvdhn0QkNHLYblTkwtHwTGGlgYK1v0Gfn1CoUyx5/lRdTINPIogy WdlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=AAv7ILwntnNsPEfp576+sR1pYrnPKoriHPQ0xZYZP6w=; b=HAdn5GFXxXwZUY2is8pl/swDZHs5rE8UUW0xeyzzraleyquPPdHfD5JRfVmalfa69T MYlaF/46ocEIlOl6bQtQA5wxM66NGp7H/zNjk7iaWvmb1EYpENuQZlvhoQdwv40zA45w OpnMpXuSfUXj/T4LDt021BLrlYldPsePniW8TVd5/6Pp5XyrNfhPE1jt8m83gho95wIo MNttRFFSEHFWBLhp/HLaCt00WHIR6RMKe9klneziuGX4quvP1srLhWy10Ui6c21meR4g heBjMzsbEHy/B4RMPoJnRnDfUQF3T8a4/u8li0UUp01k2UCaRoVrz0v2B99gAXZeLrO9 CHrQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cherrycloud.onmicrosoft.com header.s=selector2-cherrycloud-onmicrosoft-com header.b=eP4tMO4I; arc=pass (i=1 spf=pass spfdomain=theobroma-systems.com dkim=pass dkdomain=theobroma-systems.com dmarc=pass fromdomain=theobroma-systems.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb37-20020a1709077ea500b00711ed907e82si669068ejc.492.2022.06.07.08.50.20; Tue, 07 Jun 2022 08:50:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cherrycloud.onmicrosoft.com header.s=selector2-cherrycloud-onmicrosoft-com header.b=eP4tMO4I; arc=pass (i=1 spf=pass spfdomain=theobroma-systems.com dkim=pass dkdomain=theobroma-systems.com dmarc=pass fromdomain=theobroma-systems.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245107AbiFGOIv (ORCPT + 99 others); Tue, 7 Jun 2022 10:08:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239509AbiFGOIt (ORCPT ); Tue, 7 Jun 2022 10:08:49 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80089.outbound.protection.outlook.com [40.107.8.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17F46B19; Tue, 7 Jun 2022 07:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q6dWNsQpWdiFRXdg3q7PhPt/kdkwoZa1EXfb9HlZ7FRiVhihiXw+46aik5Crz+Q1zbY6OkAQZJneZ601e+J3aoHXwGXhbL7K9FguDhvr8FFalBlaVd0mTjimKU5Su+erNAM8wVy65lMXQETxNdMKRKzYlJHPL2+LsPhBdj0D7j4zCWrgvmZDciGbyL3pSkBvzZGu6fO5fP8YPRUm9MAP9L2oDNr5NcDry9yvAkvGxWltncqNV3w1XCoHa98la/c6Ez8vz8Js5tHQOIQjGGs93f3Q/yLzPaYP96hg2oNweW5lV617C7D6Mu6KXoR+XUyukh0o+KCPRChmt/ByvgySWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AAv7ILwntnNsPEfp576+sR1pYrnPKoriHPQ0xZYZP6w=; b=kY3EvpveukMrvpDX2tt8LM8/LCCMMKsDFgj5PTMMssg9SXVOrtJlxUW+DwJVBBC07UNxqN8w0JWLBDgcUojORJ0CQEBJF8r7Cs/8SBHgRX9/WUs4VN4USUcJTd9/ujlx9mzvqXUhf769p9eeKFIr0Ylce1VqZjfdbKDm/zEdqIR/3GsnEbMnoommRm5+tJxG5u7bhDHxrY5SGpt/YAQnSg317hDX6ROXxRJBejcHRKxlzAwsAdQR+GIcHxnEbzo/yFYGklua57cJV84h5Lb664aztbeFRAMYJfAcM4IeUFBQNfp/hr3slkY2HDQWifYxW42gP9qNQuLXm1j/X2LYjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=theobroma-systems.com; dmarc=pass action=none header.from=theobroma-systems.com; dkim=pass header.d=theobroma-systems.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cherrycloud.onmicrosoft.com; s=selector2-cherrycloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AAv7ILwntnNsPEfp576+sR1pYrnPKoriHPQ0xZYZP6w=; b=eP4tMO4IVl1vceesU5WVZirC7Ak++rzATthM7ZRmcJFNeZmV7q5oZdAEnOorxiEkCKZT7NWt56+9/SiZSXxBehdyPhkvM5jK26S4E2A/zsgP6skGt74w9NLlLQvyg9eqiqlvG7O5d8MZW0QAqqreQP1WXfYit71fgT18rHTLqhU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=theobroma-systems.com; Received: from PA4PR04MB9367.eurprd04.prod.outlook.com (2603:10a6:102:2aa::7) by DU0PR04MB9274.eurprd04.prod.outlook.com (2603:10a6:10:355::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.19; Tue, 7 Jun 2022 14:08:41 +0000 Received: from PA4PR04MB9367.eurprd04.prod.outlook.com ([fe80::880a:6606:6f57:dd0a]) by PA4PR04MB9367.eurprd04.prod.outlook.com ([fe80::880a:6606:6f57:dd0a%6]) with mapi id 15.20.5314.019; Tue, 7 Jun 2022 14:08:41 +0000 Message-ID: <249907c9-1d59-d8ab-1870-c01e8ace7d18@theobroma-systems.com> Date: Tue, 7 Jun 2022 16:08:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v5 2/4] media: ov5675: add device-tree support and support runtime PM Content-Language: en-US To: Jacopo Mondi , Quentin Schulz Cc: shawnx.tu@intel.com, mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220525145833.1165437-1-foss+kernel@0leil.net> <20220525145833.1165437-2-foss+kernel@0leil.net> <20220531131633.tjkp6q43kwwxtnvk@uno.localdomain> From: Quentin Schulz In-Reply-To: <20220531131633.tjkp6q43kwwxtnvk@uno.localdomain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AM7PR04CA0011.eurprd04.prod.outlook.com (2603:10a6:20b:110::21) To PA4PR04MB9367.eurprd04.prod.outlook.com (2603:10a6:102:2aa::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 97ca23b0-fc9f-43fd-c078-08da488f399f X-MS-TrafficTypeDiagnostic: DU0PR04MB9274:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T+ciiJP3DHmCBaRA12xJUoTN+g0gDpfC3XToW/jDHdb08uQ1gVMUt6fxmxy0UczWOU+abO7QP0rTNp/XRmPVcleRHY7deGHgNMhduMH8+ggv0cVRsZuPVUa2nLNErK3l0V3FMnK3StS5LGEUixSTZT9lTlswI4kdpKRU1Qp86qAOUVL6b2iRvtlmYX5CB9Q6FKpmpi0EV1qihww6AGs0SNgOzgfPl1OqSOUzdlpt164tbyvFZhDIzW/ZVYQSWiWkux7Tp3NUQyZ+HIwSqF59MPft1shlQDi5bZZSOPtQln/ePFa6Bpx6u8J/TxA5qZqC2RSqFio72B+8OYDg+KI/lKM6AoRA4Ac7LZIalHZfU04fxpgLFaJW3OzL/yW/Ds5tx7nNS1/tYXZ4UI7+E4hYfuDPYLtxRL0MPG9mFwrP5dDmRr+8qUnCCU10uE/btNA/qvkEECteLeFbTDLVJ4OxQ15IApd2O6hH7wrPxXYFs5TVRfJehtNdvY0WVoGvaJ8eEPW+hy4/FuweUkRjUsySIcWDmj1bG6Xna0AqTdOScomADpbjebKOlQKU6Ft9B7hrWLwjl+abw3AOaIIdIhlqUs0DNrTDCelSR+epjHS4NIyWI4gluVgKXyDLdvyhJPLYOhzZ/9THPXMRhz47cKCxW3UsrneMIlw7uKGqCdK76hvGfFCPznZwk9emD+vWLdz3LPGQwnzdFbq6whBaatXa+gOP1a1/c0w6TRKpRKvTF28= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR04MB9367.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(2616005)(186003)(86362001)(38100700002)(31696002)(83380400001)(36756003)(5660300002)(110136005)(8676002)(8936002)(44832011)(316002)(4326008)(2906002)(66476007)(66946007)(66556008)(6506007)(6512007)(53546011)(26005)(31686004)(6486002)(508600001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RkpudmE0RHJtdzBCd1FKWkNDZmoxSnY5anJzcUNJWTU5ck9nY1ZOMmJjR1NR?= =?utf-8?B?MFJFSzdOeEwyUEovMVhtaHo3VmlRNGhxVXh1L0FrWWlVM2dlc29xaDdkUkxn?= =?utf-8?B?TTM2aW5pSDF2LzIrNjdiTkZmb3JzLzV2ZkhCNzVIRVEyL1FpTCtBUHplRm1P?= =?utf-8?B?OExVWG9JeEErMjQwUXNVbUQ1ZmxOVWJ5TjlrcFVSbUw4UGRPSElPb3U2MXA5?= =?utf-8?B?WmNpT2c0MDk0NUg1cHNMUE5yK0g5clBWczFLZjgwR0xCSmkxVDBYRlpxNTRq?= =?utf-8?B?RWpZaGZxcGpCVi9QOUFTOVcrTkVaSHdVbjNLRUFjNUNIMjY2Ritac0p6YlpO?= =?utf-8?B?dk9BYldONE5QdUhpSTV0Tktic000Y2VpMGplSDIxajZmNS9VTXBZWVZid1lR?= =?utf-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zNLaUw5cklk?= =?utf-8?B?K0xmR2E5K0k1cVhOWXVZVmNvd1oxRG5FY0psY1VKdHVaRWNpL0NNc0hrZXJy?= =?utf-8?B?Q1BpSHRTV0RvVkUxcXhjZGZCVDd5SnRGVFZTei8xWnJicjhDYUR4dGpwMDZz?= =?utf-8?Q?lW71y7u1awbbw0ZsFgqrPuPfZVLJqMX/Vk+fB?= X-OriginatorOrg: theobroma-systems.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97ca23b0-fc9f-43fd-c078-08da488f399f X-MS-Exchange-CrossTenant-AuthSource: PA4PR04MB9367.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2022 14:08:41.4992 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5e0e1b52-21b5-4e7b-83bb-514ec460677e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cBQIWWVpYoN63AR0136T46Yh72bPcANFeO/NtwN6HbhqOVnHsjDhs5BFEHGu5efqCUMYtuVOETXDBmyQ4g8riClNNbSkF/s/Dl4Hz6a2EqX0TbJYsbO1bc6OpCaANZvK X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9274 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jacopo, On 5/31/22 15:16, Jacopo Mondi wrote: > Hi Quentin, > one more question > > On Wed, May 25, 2022 at 04:58:31PM +0200, Quentin Schulz wrote: >> From: Quentin Schulz >> >> Until now, this driver only supported ACPI. This adds support for >> Device Tree too while enabling clock and regulators in runtime PM. >> >> Signed-off-by: Quentin Schulz >> --- >> >> v5: >> - fixed -Wdeclaration-after-statement for delay_us, >> >> v4: >> - added delays based on clock cycles as specified in datasheet for >> pre-power-off and post-power-on, >> - re-arranged clk handling, shutdown toggling and regulator handling to >> better match power up/down sequence defined in datasheet, >> - added comment on need for regulator being stable before releasing >> shutdown pin, >> >> v3: >> - added linux/mod_devicetable.h include, >> - moved delay for reset pulse right after the regulators are enabled, >> - removed check on is_acpi_node in favor of checks on presence of OF >> properties (e.g. devm_clk_get_optional returns NULL), >> - moved power management out of system suspend/resume into runtime PM >> callbacks, >> - removed ACPI specific comment since it's not specific to this driver, >> - changed devm_clk_get to devm_clk_get_optional, >> - remove OF use of clock-frequency (handled by devm_clk_get_optional >> directly), >> - removed name of clock (only one, so no need for anything explicit) >> when requesting a clock from OF, >> - wrapped lines to 80 chars, >> >> v2: >> - fixed unused-const-variable warning by removing of_match_ptr in >> of_match_table, reported by kernel test robot, >> >> drivers/media/i2c/ov5675.c | 149 +++++++++++++++++++++++++++++++------ >> 1 file changed, 128 insertions(+), 21 deletions(-) >> >> diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c >> index 82ba9f56baec8..ea801edb8e408 100644 >> --- a/drivers/media/i2c/ov5675.c >> +++ b/drivers/media/i2c/ov5675.c >> @@ -3,10 +3,14 @@ >> >> #include >> #include >> +#include >> #include >> +#include >> #include >> +#include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -17,7 +21,7 @@ >> >> #define OV5675_LINK_FREQ_450MHZ 450000000ULL >> #define OV5675_SCLK 90000000LL >> -#define OV5675_MCLK 19200000 >> +#define OV5675_XVCLK_19_2 19200000 >> #define OV5675_DATA_LANES 2 >> #define OV5675_RGB_DEPTH 10 >> >> @@ -76,6 +80,14 @@ >> >> #define to_ov5675(_sd) container_of(_sd, struct ov5675, sd) >> >> +static const char * const ov5675_supply_names[] = { >> + "avdd", /* Analog power */ >> + "dovdd", /* Digital I/O power */ >> + "dvdd", /* Digital core power */ >> +}; >> + >> +#define OV5675_NUM_SUPPLIES ARRAY_SIZE(ov5675_supply_names) >> + >> enum { >> OV5675_LINK_FREQ_900MBPS, >> }; >> @@ -484,6 +496,9 @@ struct ov5675 { >> struct v4l2_subdev sd; >> struct media_pad pad; >> struct v4l2_ctrl_handler ctrl_handler; >> + struct clk *xvclk; >> + struct gpio_desc *reset_gpio; >> + struct regulator_bulk_data supplies[OV5675_NUM_SUPPLIES]; >> >> /* V4L2 Controls */ >> struct v4l2_ctrl *link_freq; >> @@ -944,6 +959,56 @@ static int ov5675_set_stream(struct v4l2_subdev *sd, int enable) >> return ret; >> } >> >> +static int ov5675_power_off(struct device *dev) > > Does this (and power_on) require __maybe_unused to avoid a warning > when compiling without CONFIG_PM support ? Have you tried that ? > It does not, because they are called manually in the probe function and its error path (but thanks for the heads up, because I definitely forgot about this one). I received some review outside of this mailing list telling me the error path is incorrect for pm_runtime so I'll have a look at it before sending a v6. Cheers, Quentin