Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp714061ybt; Wed, 24 Jun 2020 09:24:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZW7xwv0MoAv6c1Tn0719MFJAEr/gbQTTNEcaGqeAGgCFoBFagvA7hEVFckkt2oH3OVADD X-Received: by 2002:a17:906:2b92:: with SMTP id m18mr27343546ejg.218.1593015898157; Wed, 24 Jun 2020 09:24:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593015898; cv=none; d=google.com; s=arc-20160816; b=TFg/cTADVzpmKkGIjIqIl1YsHj5Rpqa582vGtmO7hFdD0Xi7l3erwO1SaIr9utzyOn nEqWcRTl8ZADpbRYkyeX4UIzYDvGyThQOLi9dWM3FLe3lhujZPVloucLrARfIepqPCzJ h8nFDsB32aaG2IK5y1ma47pEtgARMCO6d1cDpOmsLvHXEIMghB2C1LcBB2NFZtll7oLm DfqpkxRj4lqmc04mWmRw/NalM13LrcJdJXdpEtvsdv4QTRraK96VZp6iKhWGNvrnE/ZC 0pl1OqXUcFhZKqlTnuupuWmFN9dux2I7nNbvBQGQh4mKDnDzYKnWYNJyD2V05NFDfsyh FYog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=STD7qLvWtpSzAtO1gXjXJztLXOvVuvn065ZWjIwBzm8=; b=Z066pR4cABqF15ea5Ev4B426rOj5yhAg36QYtBn8FpG/SSlMKELM3rS3T2h6XLCqW5 LH7nYng4snLWpffCYBFh7wnyeoLehCLyDAlUoi6PBIdxDwDs2E5eWjS5pvaNMHTERy3p U58sCR6vuvDxsmWpEek76ltyUqeT4wWhioqwSo4yz9jImN9tEbzpR/T53u8XS0wnh5Ly xMFtUBuETxheg5be0GbaP9C5sktCNr0Uz70YXIobsjhoyuamNZPtZvfBxY98hrZtxf4G AS2h1eAzu9e5VKGBHMpzoiiR4IXQA4pkyqZyvfY4j6VMjlzq9l9UcVx1UhtKrCjB8G3T /4tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b="GDbX4i4/"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 60si8850480edp.566.2020.06.24.09.24.34; Wed, 24 Jun 2020 09:24:58 -0700 (PDT) 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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b="GDbX4i4/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404834AbgFXQWV (ORCPT + 99 others); Wed, 24 Jun 2020 12:22:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404350AbgFXQWU (ORCPT ); Wed, 24 Jun 2020 12:22:20 -0400 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C06F2C061573 for ; Wed, 24 Jun 2020 09:22:19 -0700 (PDT) Received: by mail-il1-x142.google.com with SMTP id w9so2567347ilk.13 for ; Wed, 24 Jun 2020 09:22:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=STD7qLvWtpSzAtO1gXjXJztLXOvVuvn065ZWjIwBzm8=; b=GDbX4i4/9sFa2QnOyFKV3sAmgpvbd4H9sf69kAM0V93uCHV4aw7EViw8WQGFnmGhGL RCC+okJfghc3Wz2bz8HZeO7YwxG7/oL/0OfQHSSw8KaxqyDX+3pN+o3xIH3aODH5BQjK vTgBiV68m+YydOFw1YZbI/IzAxH09eBSYoeOnD2WwMhuNy5dRivxMDq8sxhdaJcPIFVE xpNn8lwne15R7K3Ux72CJTplglE9cuR4bjD2TZvXf3CiAqo230jAdvO8oHmtF2Psgl2p YadWLDh4Bl411uJHkly3hQX/7NFaklwQk0TAShizwVTPmjXzGeqZOsMfxFNXOJwnROdt D35Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=STD7qLvWtpSzAtO1gXjXJztLXOvVuvn065ZWjIwBzm8=; b=G7M7fUfAZ9AVn/jqCm69FC2ARO8JgmncC+PmhOcepHvzV4OL9WUGbwek6vuPzfMW2D IF2jt10c8TDKrfGPPfJVL4KKK6qo/PniJUxMR0VYs21P8ntheYHrquvoVuVzeJLZX8j9 lojUxGl29jeepi69gd5pgaAqjgCNiOLMuZO/O2LhY0YPBPgVsV4msfw7+j8CFOf9ErC0 DPB2a0S+MxR/Wsm7VjSsFtnvOIvABMMueVY7t9TxdVlzAJ4UPpGPpLLu5+XS7cw/xmj9 QtHDno4rjeE417Rs7pJ2T30wIj6odRkgCLr2LeZ7AFT/zdznKY+j97t6g+8UugRPZLEu eh6w== X-Gm-Message-State: AOAM530e9vyFOnu6xRWI00I8BfvMmXPV0fX+6Lu3UNTUMETOgRSWaFrV 85zZnffq/KwgtQnHBOi8rYInStH2B07dqZgBeV3jiQ== X-Received: by 2002:a92:c509:: with SMTP id r9mr28062372ilg.189.1593015739191; Wed, 24 Jun 2020 09:22:19 -0700 (PDT) MIME-Version: 1.0 References: <20200622093744.13685-1-brgl@bgdev.pl> <20200622093744.13685-6-brgl@bgdev.pl> <1da91144-076d-bf1e-f12a-2b4fe242febc@gmail.com> In-Reply-To: <1da91144-076d-bf1e-f12a-2b4fe242febc@gmail.com> From: Bartosz Golaszewski Date: Wed, 24 Jun 2020 18:22:08 +0200 Message-ID: Subject: Re: [PATCH 05/15] net: phy: reset the PHY even if probe() is not implemented To: Florian Fainelli Cc: Andrew Lunn , Heiner Kallweit , Russell King , "David S . Miller" , Jakub Kicinski , Rob Herring , Matthias Brugger , Microchip Linux Driver Support , Vladimir Oltean , Claudiu Manoil , Alexandre Belloni , Vivien Didelot , Tom Lendacky , Yisen Zhuang , Salil Mehta , Jassi Brar , Ilias Apalodimas , Iyappan Subramanian , Keyur Chudgar , Quan Nguyen , Frank Rowand , Philipp Zabel , Liam Girdwood , Mark Brown , netdev , devicetree , Linux Kernel Mailing List , Linux ARM , "moderated list:ARM/Mediatek SoC..." , Fabien Parent , Stephane Le Provost , Pedro Tsai , Andrew Perepech , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 23 cze 2020 o 21:14 Florian Fainelli napisa=C5= =82(a): > > On 6/22/20 2:37 AM, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Currently we only call phy_device_reset() if the PHY driver implements > > the probe() callback. This is not mandatory and many drivers (e.g. > > realtek) don't need probe() for most devices but still can have reset > > GPIOs defined. There's no reason to depend on the presence of probe() > > here so pull the reset code out of the if clause. > > > > Signed-off-by: Bartosz Golaszewski > > OK, but now let's imagine that a PHY device has two or more reset lines, > one of them is going to be managed by the core PHY library and the rest > is going to be under the responsibility of the PHY driver, that does not > sound intuitive or convenient at all. This is a hypothetical case, but > it could conceivable happen, so how about adding a flag to the driver > that says "let me manage it a all"? This sounds good as a new feature idea but doesn't seem to be related to what this patch is trying to do. The only thing it does is improve the current behavior. I'll note your point for the future work on the pre-probe stage. Bartosz