From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751895AbcF3AfU (ORCPT ); Wed, 29 Jun 2016 20:35:20 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:59872 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751527AbcF3AfR (ORCPT ); Wed, 29 Jun 2016 20:35:17 -0400 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 X-AuditID: cbfee68f-f79476d000001429-57-577469358abe Content-transfer-encoding: 8BIT Message-id: <57746935.4030107@samsung.com> Date: Thu, 30 Jun 2016 09:35:01 +0900 From: Chanwoo Choi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Stephen Boyd , Chanwoo Choi Cc: linux-arm-msm@vger.kernel.org, linux-kernel , linux-arm-kernel , Roger Quadros Subject: Re: [PATCH] extcon: Add support for qcom SPMI PMIC USB id detection hardware References: <20160626055647.18898-1-stephen.boyd@linaro.org> <146705470025.30684.13257433085055355379@sboyd-linaro> <146715115921.31418.2315766296233007937@sboyd-linaro> <577369F5.8040907@samsung.com> <146722608622.16253.4347418438203284037@sboyd-linaro> In-reply-to: <146722608622.16253.4347418438203284037@sboyd-linaro> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOIsWRmVeSWpSXmKPExsWyRsSkUNc0syTc4Ei3gcWzo9oWmx5fY7WY uP8su8XlXXPYLHoeaVnMvXqAyYHNY+esu+wed67tYfPYvKTe4/iN7UwenzfJBbBGcdmkpOZk lqUW6dslcGWcnvuXpeCRREX3ma0sDYzPhLsYOTkkBEwk2m6cYoewxSQu3FvPBmILCaxglLj3 1A2m5tvX7UBxLqD4LEaJ3T8es4AkeAUEJX5Mvgdkc3AwC8hLHLmUDWGqS0yZkgtR/oBR4tSs XnaIci2JP58mM4PYLAKqEm1d7WC72IDi+1/cYAPpFRWIkOg+UQliigj4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8y/0QowAHoxIP7wvvknAh 1sSy4srcQ4wSHMxKIrxlyUAh3pTEyqrUovz4otKc1OJDjKZA701klhJNzgcmmLySeENjEzMj SyNzQwsjY3Mlcd7H/9eFCQmkJ5akZqemFqQWwfQxcXBKNTBmqEafy0zfuMxr4dONJ1fbLxc8 8XWDrUz0o7cB7g8XHmWQOyunV/vSJ2jZpngeh8h+rb7gI/23tlyfslTqTYT8rEwNy/gQGZe1 rl8slhh//mO6viE94pls6pHVk9OSJdo2P9q4c3XGwc2XuM4d7XV1UNllft22XP0Sl8i2KWeL 2Vmv/lWYePu/EktxRqKhFnNRcSIAQRsGlfgCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016년 06월 30일 03:48, Stephen Boyd wrote: > Quoting Chanwoo Choi (2016-06-28 23:25:57) >> On 2016년 06월 29일 06:59, Stephen Boyd wrote: >>> Quoting Chanwoo Choi (2016-06-28 05:06:48) >>>> 2016-06-28 4:11 GMT+09:00 Stephen Boyd : >>>>> Quoting Chanwoo Choi (2016-06-26 04:20:43) >>>>>> 2016-06-26 14:56 GMT+09:00 Stephen Boyd : >>>>>>> +PROPERTIES >>>>>>> + >>>>>>> +- compatible: >>>>>>> + Usage: required >>>>>>> + Value type: >>>>>>> + Definition: Should contain "qcom,pm8941-misc"; >>>>>>> + >>>>>>> +- reg: >>>>>>> + Usage: required >>>>>>> + Value type: >>>>>>> + Definition: Should contain the offset to the misc address space >>>>>> >>>>>> 'reg' property is used on extcon-qcom-spmi-misc.c? >>>>>> I think that you don't need to include this property. >>>>> >>>>> No it isn't used in the driver right now, but there is a register offset >>>>> for this module and there are registers that can be read/written in this >>>>> module. I'd like to keep it as required so we can easily read the >>>>> registers in the future if needed. >>>> >>>> OK. >>>> But, If you want to remain the reg property, you should add the code to get >>>> the register offset by using OF functions. This patch don't include the OF >>>> function to handle it. >>>> >>> >>> Sorry I don't follow the argument. I've put the reg property here for >>> future proofing so that the binding doesn't have to change in backwards >>> incompatible ways in the future if we do need to get the property later. >> >> I don't mention that 'reg' property should be removed. > > Ok good. We need to keep reg property as this device is on a bus that > uses reg property for addressing. > >> Just if you want to remain it, you should add some codes as following: >> For exmaple, >> - of_get_address() to get the address information from device-tree. >> >> If documentation include the some properties, you should add the handling code >> in device driver. When you add the code to get the offset from device-tree, >> it doesn't influence the some behavior in the future. > > Sorry I don't understand that argument. We can put properties into > bindings and not use them in drivers if there isn't any immediate need > to use them. > > From what I can tell you're suggesting we call of_get_address() in the > driver and then do nothing with the value of the property? Is that just > to check that the node is compliant with the binding and actually has a > reg property? We don't add code in the kernel to check dts compliance, > so I'm not inclined to do anything more here. I don't agree. When he DT binding document include the 'reg' property. But, the device driver don't include any code to handle the 'reg' property (just to get the offset). It is obviously wrong. It is just basic principle to write the Device-tree binding document. Other developer who don' know the history about 'reg' property would be embarrassed. Why don't extcon driver include the code to handle the 'reg' property? There is no method to explain it.