Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp118020pxb; Thu, 20 Jan 2022 09:58:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEpCGdxwdYMv7Y/4KWqpanY/k2MZfM8JkEeCYUPBWo+tFdR1zdktvz1dgx9RF9pmCF3QEO X-Received: by 2002:a63:81c6:: with SMTP id t189mr55851pgd.417.1642701533102; Thu, 20 Jan 2022 09:58:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1642701533; cv=pass; d=google.com; s=arc-20160816; b=ZglsDtOnQq89is9O4imAl/uQXUyc44J2pF/i1PT83z1cQ5fuTyKmmBA8/O+2cS1qHk UUI5YFbpazQCSoMwBYukylmcxZbff2UzgkgBT6oKDRtKIRSDWjEbEkhVw7BuZVL/Mtgh 7nfyOU52Vw00AvNGC3hDZSPS+VkzycZIBLSvBrhwb+cfS8KASurjHqH7Y66S6+uljx5t qSgWch9BzBVHzMTLNmjrDkx38VxL8I23lfnHMOdiCtjSEP05SZ41rcQQdWNIJkRn+Bxd LS5fk1pk/qhP09MgzLnAUe8NisTlmJw0zkzqpyzpoR3bpQYpN3PFAf+Md2eGXruDctBf vu1g== 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 :content-language:in-reply-to:user-agent:date:message-id:references :cc:to:subject:from:dkim-signature; bh=w3tYqaqXxd6BG0QvJYXtxU5bjQ6UydXoo0d2qiN+DbQ=; b=AlgitqZ+VbHKrPd1qblEgAozNIxbJGnbqZ16O8+YUG0xkqTsM8//O1NlpAB6N9FBPt mOOHzo9p1yW6GISDDGX/3TUix4pEgaATbc32+hZ3GnrRPmzRvbhuq/jSU4+WDCr/a2YT 4B2Trgob1YefbqL6xibwfneUm/PVjDg+VRUHSw7/H9ozEgX5LuFcBwukVh1J8DB1M8ks UEMN094n6Jk4hMRdXr14rv4QPc5FVQ7bGlLA3GhBTDbKL9QdC2UMVgcDOwboRxL2BdBd 0IwkKFHvvqj7EHDZ4HOWIu3XilkcqVQQB1TQSH/4Qln/BiL2o9L2OPkOwIVErO7sSg1c IXAQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@seco.com header.s=selector2 header.b=mdfBy25s; arc=pass (i=1 spf=pass spfdomain=seco.com dkim=pass dkdomain=seco.com dmarc=pass fromdomain=seco.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=seco.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b17si4089535plg.609.2022.01.20.09.58.13; Thu, 20 Jan 2022 09:58:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@seco.com header.s=selector2 header.b=mdfBy25s; arc=pass (i=1 spf=pass spfdomain=seco.com dkim=pass dkdomain=seco.com dmarc=pass fromdomain=seco.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=seco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346596AbiARQxi (ORCPT + 99 others); Tue, 18 Jan 2022 11:53:38 -0500 Received: from mail-eopbgr80083.outbound.protection.outlook.com ([40.107.8.83]:48868 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1346450AbiARQxe (ORCPT ); Tue, 18 Jan 2022 11:53:34 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l4sMq7gx4i8d1iXMyTzsl0xWvM1bTjcoo3jz1VuHh/KeFXG4E0bMU01ZdL9rHrz7rAXOHb1HzTXQrOdVPA53jurUEpsEo3dvK9b15erYjz0+XKd3AeWBGILQ3eTq2ovd7m6t2M/n2GkjxKFE02ZHiU0uL+7QGkXiaOdXH0FPEkaDaJA+nIRHLJ8YyXAG4euQn3tEsz+ArcsMblF/91Iop6pXLTvgDdDkaSd5fSOqmwJDZVyBkIpOGQEtiM1Ilq/3twH67Qj4uUUC7NQv6CvWwOTqNHLnMrXnqLWsKJFIEculECp38DjvbnzWB24kfe0QNP3hf7sC2xfgRyHh7OTP9w== 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=w3tYqaqXxd6BG0QvJYXtxU5bjQ6UydXoo0d2qiN+DbQ=; b=CmfZiIM8/hkMfgP7sFCRwPx8lxz8Ij3wEQkuRxHEfz+F7ZqPgqaRNxA20ooBXelbCynMutvKZ196oEud8VZqjEM0xtdG8l49rotz49TiGco1EW4Yl4cH/LYsarkkAHqGHt7C7rXd69/rGWcIFuxgDskLfV2nir+fwjmk7E8L2STaMZ30Y2r7lCOAqDHdeODIUbw/8SLt1MmI58cj8HWZzj1mK6N4PBj0QQeMefuQv6/krDjS6/ocjZPlHWODD80VS3VItRfGEvegrNWij/zbcmDnAWg3kamhBRSDRHUr0xUM57Qo++L6QTVRFseuPHfU74+rJz/N9qiW+6jbQNu8lA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w3tYqaqXxd6BG0QvJYXtxU5bjQ6UydXoo0d2qiN+DbQ=; b=mdfBy25sc/6EnuZo6tESbme+5dArQ/fpODp4wRaHYHJgZ8gTqkzfBnh/6572YMrUF3J9KJZJxrnXFxSdLPG9jo2tolXriJmp7E45E7gOKTfw1lrlmrziiMGt+9YX6vkRsky9NLhPkfu5B/fQnCciuv3MUzxz/ogy4YpfL1+t7yHyvUTS+FaGrRYst+8+a01LeXFwm/b+OzrTGJLs5zkWEGamwiNdwKo2nIxVWCCkEWlS4HfAyK68/MqWV81+ytsPFmq+Ud4Xf75iv08NcEZHm/kRXlvxUEyvsWIvCieRy3fazmW/vWVb6mjvfcrYZWWlydVYKiBmjTStHwwKLWsTFw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) by AM7PR03MB6216.eurprd03.prod.outlook.com (2603:10a6:20b:137::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Tue, 18 Jan 2022 16:53:29 +0000 Received: from DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005]) by DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005%4]) with mapi id 15.20.4888.014; Tue, 18 Jan 2022 16:53:29 +0000 From: Sean Anderson Subject: Re: [PATCH 2/6] usb: dwc3: Get clocks individually To: Robert Hancock , "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" Cc: "linux-kernel@vger.kernel.org" , "bjagadee@codeaurora.org" , "balbi@kernel.org" , "baruch@tkos.co.il" References: <20220114233904.907918-1-sean.anderson@seco.com> <20220114233904.907918-3-sean.anderson@seco.com> <1c242d0114554b72f8f0b1f6507973a0dea50b3d.camel@calian.com> Message-ID: <614267d5-4cfa-94d4-3f2a-c2467b3b9cd6@seco.com> Date: Tue, 18 Jan 2022 11:53:25 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 In-Reply-To: <1c242d0114554b72f8f0b1f6507973a0dea50b3d.camel@calian.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BL1P222CA0028.NAMP222.PROD.OUTLOOK.COM (2603:10b6:208:2c7::33) To DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 830181f9-2af7-4386-8a4a-08d9daa30d67 X-MS-TrafficTypeDiagnostic: AM7PR03MB6216:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q4Qj9oIJ/wAjBBAl1umARClMriBcpAnEHKJDQ9yXcbtShRJ2uCGgVL90PiKY/sQJGQncbV4sYRfDhytzsYoF6Es0/QJGk/nspG6FAYZOoZDPMdnL/kw2hVlgy5Ngt/6RAkKZSdolpO5fKhRhDMRt5NQSFWnHiRIWh3USFNpQBQil+EWYWJxjf4MFhkq98RRNgjqIDsQIkA0dqXqi5rdj20vyzZAIZDEEO+rfii5O/O6hg5BQjs5kCIfCN+/ouitboOA9VUuT2NmkGJ883sxN21iGSzUKY5ZWzv/AF4NE+wvP1y/AdqHsdHljAekgfzJfdtnIVJ+7taka13nTiCM59llSoQ7vMsP7E33oAF+PH+TN4y8kJZ/BAlD0h7Ks8miOdalzYlne1VE6msU/6eVVM+xIxCBb2w2LxRFtpchUntCUL6K6sFf0jBIhtznJVYldp2pOoEXRm1nhYMsPlpiUIKi0YCrAEZnj3ClOQytuKCa9Tf/2rOtw3lbffUu8BSIBOcuteJ8j28clCc+P5jyezmQHTPKcrm+9lDXGI2/EgLJML980hqn8B61fUL2f4Zt2ZIrzRIgEPJIZ4NXfUKBzayhHMVzXWY03J0BFXAPzm6CsEVVfLqcpMjvwDReK1bb/XeGs8Aupe5XUMTNseBRA3a3KmkfqksBOmgFLrzT6HpSTUV6Is2QN6JlTrhxvC+PcjUCi5pAK3OXD7uyrJO4/ez0TxKu8wZTZmIlgCM/rkX4iQ31F5lkCIUEEbVZqAi/MjZkRjzx1HGzCXiWf3/scfw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR03MB4523.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(4326008)(8936002)(44832011)(36756003)(26005)(38350700002)(54906003)(86362001)(66476007)(186003)(66556008)(6486002)(316002)(110136005)(508600001)(66946007)(6512007)(6666004)(2906002)(38100700002)(8676002)(2616005)(52116002)(5660300002)(31696002)(53546011)(83380400001)(6506007)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QUN3ZTR6ZkZXT3VNVjYyQXZ6N2NQZTVFb0lFTWFIWm1vd2RoZ1VYbHkvVXY3?= =?utf-8?B?Mm1hQnZhTW5NNW1VS0dtcDJWaldETVk2M29FU0xlR0xTdEdxdk1aT2xXU09M?= =?utf-8?B?MkZpV29hMndJWEZ0NHAzYWo1ZGp2Y3VUVlJxdTBHRHRhMXRhYnpHbEVuU3NK?= =?utf-8?B?aXcvK2docHZTc21jUUk2T1c5SjFMQ3I3Z0xBd2ZGdXZBMW1NSWlYWTRJSmVt?= =?utf-8?B?cEEvY2JlSzliUVkwR2tpcVI1TkgyRXB3UUd1U2ZtaWwrMVExaVE0aElhby9n?= =?utf-8?B?Yk44MjFONHYrZG8wU3VQM1A0VVZOU3dBOTZqMmVrQXhSK3Y1bVhFVmcwZVhj?= =?utf-8?B?aVA3aHROY2NEaHdQL3JGQ1dpUEZhK003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oTNB3gVanw7C/HFpO2FRLY=3D?= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 830181f9-2af7-4386-8a4a-08d9daa30d67 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4523.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2022 16:53:28.9830 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: w3koFZxjg4xMdRGp8BGwyzLh/+ulbUEhYiJDIYvEdd0Z6ZbNY5YeT4rF+74Fyod9pNBuVaYYGiBgXY7wMbtd3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR03MB6216 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On 1/14/22 8:04 PM, Robert Hancock wrote: > On Fri, 2022-01-14 at 18:39 -0500, Sean Anderson wrote: >> Instead of grabbing all clocks in bulk, grab them individually. This will >> allow us to get the frequency or otherwise deal with discrete clocks. This >> may break some platforms if they use a clock which doesn't use one of the >> documented names. > > Another approach would be to keep the bulk get and prepare_enable and just > search through the clocks in the bulk data to find the "ref" clock, i.e. > something like: > > for (i = 0; i < dwc->num_clks; ++i) > if (!strcmp("ref", dwc->clks[i].id)) { > ref_clk_rate = clk_get_rate(dwc->clks[i].clk); > break; > } > > That's probably simpler than all the extra complexity to get each of the clocks > individually and release them in the right order. Hm, maybe. But in the future, we may want to access other clocks as well. E.g. perhaps PM might be enhanced by treating the bus/suspend clock specially for some modes. I think grabbing the clocks up front will make later patches easier to write. --Sean