Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933275AbcL1BPA (ORCPT ); Tue, 27 Dec 2016 20:15:00 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:43018 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756009AbcL1BO7 (ORCPT ); Tue, 27 Dec 2016 20:14:59 -0500 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 094F96134D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=sboyd@codeaurora.org Subject: Re: [PATCH v3 1/4] dt-bindings: phy: Add support for QUSB2 phy To: Vivek Gautam , Rob Herring References: <1482253431-23160-1-git-send-email-vivek.gautam@codeaurora.org> <1482253431-23160-2-git-send-email-vivek.gautam@codeaurora.org> <20161222211633.ldk3ykqiat6peyw7@rob-hp-laptop> Cc: kishon , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Mark Rutland , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org From: Stephen Boyd Message-ID: Date: Tue, 27 Dec 2016 17:13:27 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1204 Lines: 28 On 12/22/2016 08:52 PM, Vivek Gautam wrote: > >>> + >>> +Optional properties: >>> + - nvmem-cells: a list of phandles to nvmem cells that contain fused >>> + tuning parameters for qusb2 phy, one for each entry >>> + in nvmem-cell-names. >>> + - nvmem-cell-names: must be "tune2_hstx_trim" for cell containing >>> + HS Tx trim value. >> ditto. > nvmem doesn't allow, at this point, to get the cells by index. > Its APIs take 'const char' cell id and get the cell. > > We should add this support to get the cell by index. > Will create a patch for that, and drop the '-names' property from bindings. > If we introduce a cells based API just for this case of one phandle it may make sense to allow the cell id to be NULL and default to whatever cell is there without a names property. We do something similar with clks where a NULL connection id defaults to the first phandle in the list. Then we can avoid having a new set of DT specific APIs here. Of course, documentation should be updated to indicate that a NULL cell_id means use index 0 with DT. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project