Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965487AbcLVVX5 (ORCPT ); Thu, 22 Dec 2016 16:23:57 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:59188 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755469AbcLVVXz (ORCPT ); Thu, 22 Dec 2016 16:23:55 -0500 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org D3DC160341 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=kimran@codeaurora.org Subject: Re: [PATCH v6] soc: qcom: Add SoC info driver To: Stephen Boyd References: <1481555889-29380-1-git-send-email-kimran@codeaurora.org> <20161214002617.GS5423@codeaurora.org> <20161217012615.GV5423@codeaurora.org> <05cdb699-6406-cff8-cce6-fcedf6ac6c4e@codeaurora.org> <20161220225007.GD5423@codeaurora.org> <1305f89c-2f9b-aa0b-4e22-951bf8af9344@codeaurora.org> <20161222003122.GY8288@codeaurora.org> Cc: andy.gross@linaro.org, lee.jones@linaro.org, David Brown , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org From: Imran Khan Message-ID: Date: Fri, 23 Dec 2016 02:53:47 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161222003122.GY8288@codeaurora.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2081 Lines: 37 On 12/22/2016 6:01 AM, Stephen Boyd wrote: > On 12/21, Imran Khan wrote: >> On 12/21/2016 4:20 AM, Stephen Boyd wrote: >>> >>> I'll wait to see what the next patch version has. We will >>> probably need to have some way to know which ODM the kernel is >>> running on, so we can interpret the platform type/subtype fields >>> properly. That part seems to be lacking from this patch right >>> now. We assume it's always qcom as the ODM, which isn't true. >>> >> Now I get this point. So far we don't have any mechanism in the driver that >> gives ODM information. As far as generic soc_device_attribute's vendor field >> is concerned we use Qualcomm since this will be true for SoC. >> For hardware type and sub-types the various relevant values in SMEM are numeric >> values and indeed it would be very difficult to estimate how some other ODM >> will use the same number. >> So for the h/w types and sub-types can we keep the numeric values rather than >> showing strings as attribute values. We can leave the interpretation of these >> values to ODM specific code. > > Raw numbers sounds fine, but how do we know what ODM it is to > understand how to parse the numbers appropriately? Perhaps the > smem DT entry needs to have a property indicating the ODM that > has configured these numbers, and then we can have an ODM sysfs > node that we use to expose that string property to userspace? > Okay smem DT entry can be used to provide ODM information but even after having this feature, I am not sure if we can provide a code in the driver that will act for all ODMs because we don't know how other ODMs will interpret platform types and subtypes numbers. Or do you mean here that we should keep string values corresponding to different platform type and subtype numbers in the smem DT entry itself. We will use socinfo from smem to get the raw number and then translate that raw number to a string, using the mapping given in DT itself. -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a\nmember of the Code Aurora Forum, hosted by The Linux Foundation