Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp195648imu; Sun, 4 Nov 2018 22:25:59 -0800 (PST) X-Google-Smtp-Source: AJdET5efnAKmPgGZjILs7t5zM1Xz6dew7Sx7msC+BqraOn/BAZePWBTSVUhiyoGhGU9ta9krQAZk X-Received: by 2002:a62:ea03:: with SMTP id t3-v6mr21768575pfh.228.1541399159800; Sun, 04 Nov 2018 22:25:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541399159; cv=none; d=google.com; s=arc-20160816; b=Y1I1eiFFUHMpnRgRX7V0tvfyVZr5Abw0a3ivenKFTkz5kuYqi6iXDtPg9fFmxHBrn/ q1MJvzoIxokDwWfHeBVHzwnuAv5+RfJhHA2Stc0uCHCqZOIayGJjJpXfnEGnCXYeUgN8 JM+ud/Y9gOfT1NHw6+OHo13rw9Cj+psHmVvaLEPEL3i/84Rwh622jUhLwax+wo7sLj5w OeNv26JSAGxwuCfrGsL1YahtuQT9kzBq/R7gN304nkGgMl3XVvvZFP3MV5rDz9DITTfZ FadOUJGF/FEBFIG+Dr3ILqYf2q+4b6uNVwRygHaNB24/3/buFcc8xhJhryy13SiipzH9 5taQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=0PppT9mIaehdR4ZaC0+tEzCfp+TKjPHiJwNnjg6c5WY=; b=EuvshAhHwPeMRNOhFX8EM1iD89tUcVb6yXcvmUGkg5mdnJxLB2Tl+4fAQiFamoQfDd vElMMaSjgaYzyc4x9Zl7sEBK7pZMpZZHv8jnn68MpgXw+Bf7obpqfri/J+KwTtHQW4xW wSFEbiBE3p1cThP/9iLELJ9pcu0yhR6vq2UbyzK/1IEhwdbZHPNK4ZM2ChJBj6omNmfC fXRSgxmrUk8RJJ6g+eWXdyM5vdn+PlQ8b5Q7jiNo8bIa2I87b1UTN9kDJiyWkoVIbnhR EH/XuMdYKlVbVz9+28Xoo21oOo7yZF2tR7X8pD1nW5XGqw3O+Hp0RlzG78tISF3mXMZw /UJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Jch0orA/"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si15169725plk.397.2018.11.04.22.25.44; Sun, 04 Nov 2018 22:25:59 -0800 (PST) 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=@ti.com header.s=ti-com-17Q1 header.b="Jch0orA/"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729370AbeKEPnZ (ORCPT + 99 others); Mon, 5 Nov 2018 10:43:25 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:36020 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729321AbeKEPnZ (ORCPT ); Mon, 5 Nov 2018 10:43:25 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id wA56PBCB035927; Mon, 5 Nov 2018 00:25:11 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1541399111; bh=0PppT9mIaehdR4ZaC0+tEzCfp+TKjPHiJwNnjg6c5WY=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=Jch0orA/z5rv2CM5RY+A/+eh6BA4An5lNM7ID1FAW3HxSipxV1sLUmNx1NlRMsESN CDLF+4E4Iz5WnZXj42+Yzza6rQNMO4pPdsfVplo1s9sLdKMpfoCOePXd+xX6b9Vgp4 1bXBziHKczc4gG1alFe4oCyigZPVv7rFNAxPWtZo= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wA56PB8P036073 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 5 Nov 2018 00:25:11 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 5 Nov 2018 00:25:11 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Mon, 5 Nov 2018 00:25:11 -0600 Received: from [172.24.190.215] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id wA56P8Fp031313; Mon, 5 Nov 2018 00:25:08 -0600 Subject: Re: [PATCH 1/6] phy: Add max_bitrate attribute & phy_get_max_bitrate() To: Marc Kleine-Budde , , , , CC: , , , References: <20181102192616.28291-1-faiz_abbas@ti.com> <20181102192616.28291-2-faiz_abbas@ti.com> <5e1a0b67-510a-5512-d477-0b363e4733fe@pengutronix.de> From: Faiz Abbas Message-ID: Date: Mon, 5 Nov 2018 11:57:41 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <5e1a0b67-510a-5512-d477-0b363e4733fe@pengutronix.de> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On Saturday 03 November 2018 03:06 PM, Marc Kleine-Budde wrote: > On 11/02/2018 08:26 PM, Faiz Abbas wrote: >> In some subsystems (eg. CAN) the physical layer capabilities are >> the limiting factor in the datarate of the device. Typically, the >> physical layer transceiver does not provide a way to discover this >> limitation at runtime. Thus this information needs to be represented as >> a phy attribute which is read from the device tree. >> >> Therefore, add an optional max_bitrate attribute to the generic phy >> sybsystem. Also add the complementary API which enables the consumer >> to get max_bitrate. >> >> Signed-off-by: Faiz Abbas > > NACK - We already have such a functionality in the CAN subsystem. > Please have a look at the patches: > > e759c626d826 can: m_can: Support higher speed CAN-FD bitrates > b54f9eea7667 dt-bindings: can: m_can: Document new can transceiver binding > 2290aefa2e90 can: dev: Add support for limiting configured bitrate > 54a7fbcc17bc dt-bindings: can: can-transceiver: Document new binding > I remove the transceiver child node binding documentation in patch 5/6. The existing implementation is pretty limiting as it just has a child node with no associated device. What if a transceiver requires its own configurations before it can start sending/receiving messages (for example, my usecase requires it to pull the standby line low)? I think that can be solved by implementing the transceiver as a phy and exposing a generic get_max_bitrate API. That way, the transceiver device can do all its startup configuration in the phy probe function. In any case, do suggest if you have a better idea on how to implement pull gpio low requirement. Thanks, Faiz