From patchwork Mon Jul 22 17:32:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 169413 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp7790398ilk; Mon, 22 Jul 2019 10:32:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEaaM6Sq9o6ACge+QYyoNQaU93xoIjpD6NyRRSFQDiYVgy7E2ID4sZ70ATl5sAOxbNPZf5 X-Received: by 2002:a17:902:9041:: with SMTP id w1mr77927960plz.132.1563816761917; Mon, 22 Jul 2019 10:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563816761; cv=none; d=google.com; s=arc-20160816; b=mpsP9H4wFBfpO6FGi73VECH0BRS7hSnxjetCYJjAo/k2hRrPF8Oqwd2mCo/xdMB2eu maKppe9hqdFLr3Yv7PgNxxV4bPCyT3eX/v3DnWAxPP4lu+4LSuJshK3ZDbHNIa03YZ/W J+0qk+k2C3/XrTwfir1ScE1PxKBCgw8wELzgNRZXmjdEyHknNzW3aeJ9v+nqZ7vIyWgn 1jt48lmDkPqvbb4pYwlnXEiTv9+TG6xrHhyV878yer0c7hBAaYl0+3pt9xNxImzMWrQc O6CtUboFoTz2JxPddb9om+G2DZkql2noJXeM3/E4lcrx/hvE/1a0rBqffaPvmSmXXGT/ em7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=85hIYZIUSz2sajlTBWW2bBjChuGeN2EeF//kqgRb2D0=; b=Emp8GH5UEJ74/Q8Vrk+jwBYRf2lFJE8y4bECm+xXVtrsSlKUusRCS27Nzz4iP4gXdn uRRDCwBGJSPpSLTU0xeAOxjf64t4bb6F8aVaiSZZMkV1Ar+eiAqxHRtyCnYS2v6Nijs/ SECG7vlu4tlI1QDX01v0G21GLdg+bXIuMgBRAT/zNnVx6CmCEVAj1sdlajQQnRVQtMv2 8NiMh8O45Vc5GczKDkf9TVFdawDGVwIhy7h6EjdedYA/EMcP5Y3m8OY2R3NwVDwzHdLK E/BGTSH1xQQ515/WnajhazaMLGFLNH5TTzdSrIbxlE/mc3y0d1jmkZqNMAkReUY+BObG eBmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="q+g/GyIi"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e13si11892588pfl.279.2019.07.22.10.32.41; Mon, 22 Jul 2019 10:32:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="q+g/GyIi"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727269AbfGVRck (ORCPT + 29 others); Mon, 22 Jul 2019 13:32:40 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:59751 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726590AbfGVRck (ORCPT ); Mon, 22 Jul 2019 13:32:40 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190722173237euoutp0199dddaa5a060b119797553e01d57ecbb~zyw5PB6CM2844428444euoutp01O for ; Mon, 22 Jul 2019 17:32:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190722173237euoutp0199dddaa5a060b119797553e01d57ecbb~zyw5PB6CM2844428444euoutp01O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1563816757; bh=85hIYZIUSz2sajlTBWW2bBjChuGeN2EeF//kqgRb2D0=; h=From:To:Cc:Subject:Date:References:From; b=q+g/GyIiCSk+dVn1nzJwAjrNZSpMtXOg1/tllmmhS+Sl5i/AI++KYFiXiYyibiv53 luWvZA4BcDUY9WYWRQNXBTHEtk4I7BgIuv8ZYVZ3DOItfhounaTih+HQ7jhVHCpsQH htkEQ5CuzsBAJXSbtre8VCiCrk+9cKxD3SZkFt0M= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190722173237eucas1p16e96da4835c4f0ac84c47c31cefda747~zyw4Z8IC11305913059eucas1p1v; Mon, 22 Jul 2019 17:32:37 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C8.DC.04298.433F53D5; Mon, 22 Jul 2019 18:32:36 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190722173236eucas1p171299dfaa34f3124622df488bfe57a89~zyw3m9yeP0714007140eucas1p1l; Mon, 22 Jul 2019 17:32:36 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190722173235eusmtrp1a484cb96a4f7d585c54b0134f26c21d9~zyw3Y7q9v0411704117eusmtrp1g; Mon, 22 Jul 2019 17:32:35 +0000 (GMT) X-AuditID: cbfec7f2-f13ff700000010ca-73-5d35f334eb5c Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 54.47.04146.333F53D5; Mon, 22 Jul 2019 18:32:35 +0100 (BST) Received: from AMDC2765.DIGITAL.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190722173235eusmtip1e2c9e2516c30587a1479aaf27bb423bc~zyw3DIbIi0484004840eusmtip15; Mon, 22 Jul 2019 17:32:35 +0000 (GMT) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , Marek Szyprowski , Bartlomiej Zolnierkiewicz Subject: [PATCH v2] phy: core: document phy_calibrate() Date: Mon, 22 Jul 2019 19:32:23 +0200 Message-Id: <20190722173223.19518-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrIIsWRmVeSWpSXmKPExsWy7djPc7omn01jDQ4tNbDYOGM9q8WFpz1s Fpd3zWGzmHF+H5PFomWtzBZrj9xld2Dz6NuyitHj+I3tTB6fN8kFMEdx2aSk5mSWpRbp2yVw ZUy7OYelYBNnxZy7s1gbGG+xdzFyckgImEhM3nmRtYuRi0NIYAWjxK65z1kgnC+MEp8X3oPK fGaUWPhxGStMy/nOzUwQieWMEhMbTyO0bNiwlwmkik3AUKLrbRcbiC0i4CCxZOkdNpAiZoH1 jBIrF38H2y4sYC4x4e9RMJtFQFWi988LRhCbV8BWYuW7WUwQ6+QlVm84wAzSLCGwh03i28of UHe4SExo+gVVJCzx6vgWqJdkJE5P7mGBaGhmlHh4bi07hNPDKHG5aQYjRJW1xOHjII9zAN2k KbF+lz5E2FFiTdt+dpCwhACfxI23giBhZiBz0rbpzBBhXomONiGIajWJWcfXwa09eOESVImH RPNcdZCwkECsRM+T5ywTGOVmIaxawMi4ilE8tbQ4Nz212DAvtVyvODG3uDQvXS85P3cTIzDi T/87/mkH49dLSYcYBTgYlXh4N+wxjRViTSwrrs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-MailID: 20190722173236eucas1p171299dfaa34f3124622df488bfe57a89 X-Msg-Generator: CA X-RootMTR: 20190722173236eucas1p171299dfaa34f3124622df488bfe57a89 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190722173236eucas1p171299dfaa34f3124622df488bfe57a89 References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 36914111e682 ("drivers: phy: add calibrate method") added support for generic phy_calibrate() method, but it didn't explain in detail when such method is supposed to be called. Add some more documentation directly to the phy.h to make it clean that it is intended to be called after every host controller reset. Signed-off-by: Marek Szyprowski --- drivers/phy/phy-core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.17.1 diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index e3880c4a15f2..b04f4fe85ac2 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -394,6 +394,16 @@ int phy_reset(struct phy *phy) } EXPORT_SYMBOL_GPL(phy_reset); +/** + * phy_calibrate() - Tunes the phy hw parameters for current configuration + * @phy: the phy returned by phy_get() + * + * Used to calibrate phy hardware, typically by adjusting some parameters in + * runtime, which are otherwise lost after host controller reset and cannot + * be applied in phy_init() or phy_power_on(). + * + * Returns: 0 if successful, an negative error code otherwise + */ int phy_calibrate(struct phy *phy) { int ret;