From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chanwoo Choi Subject: Re: [PATCH] extcon: Add support for qcom SPMI PMIC USB id detection hardware Date: Wed, 29 Jun 2016 15:25:57 +0900 Message-ID: <577369F5.8040907@samsung.com> References: <20160626055647.18898-1-stephen.boyd@linaro.org> <146705470025.30684.13257433085055355379@sboyd-linaro> <146715115921.31418.2315766296233007937@sboyd-linaro> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mailout1.samsung.com ([203.254.224.24]:55317 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbcF2G0A (ORCPT ); Wed, 29 Jun 2016 02:26:00 -0400 In-reply-to: <146715115921.31418.2315766296233007937@sboyd-linaro> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Stephen Boyd , Chanwoo Choi Cc: linux-arm-msm@vger.kernel.org, linux-kernel , linux-arm-kernel , Roger Quadros On 2016=EB=85=84 06=EC=9B=94 29=EC=9D=BC 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 sp= ace >>>> >>>> '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 o= ffset >>> 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. >> >=20 > 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 backwar= ds > incompatible ways in the future if we do need to get the property lat= er. I don't mention that 'reg' property should be removed. Just if you want to remain it, you should add some codes as following: =46or exmaple, - of_get_address() to get the address information from device-tree. If documentation include the some properties, you should add the handli= ng code in device driver. When you add the code to get the offset from device-t= ree, it doesn't influence the some behavior in the future. Thanks, Chanwoo Choi