[PATCH 1/2] ARM: dts: tegra: Header file for pinctrl constants
Laxman Dewangan
ldewangan at nvidia.com
Wed Dec 4 00:49:48 EST 2013
On Wednesday 04 December 2013 01:38 AM, Stephen Warren wrote:
> On 12/02/2013 11:04 PM, Laxman Dewangan wrote:
>> On Monday 02 December 2013 07:55 PM, Thierry Reding wrote:
>>> * PGP Signed by an unknown key
>>>
>>> On Mon, Dec 02, 2013 at 07:25:01PM +0530, Laxman Dewangan wrote:
>>>
>>> +
>>> +/* Schmitt enable/disable */
>>> +#define TEGRA_PIN_DRIVE_SCHMITT_DISABLE 0
>>> +#define TEGRA_PIN_DRIVE_SCHMITT_ENABLE 1
>>> These are all boolean, so I wonder if perhaps we should be simply
>>> defining a single pair and reuse that in different contexts:
>>>
>>> #define TEGRA_PIN_DISABLE 0
>>> #define TEGRA_PIN_ENABLE 1
>>>
>>> The property names should provide enough context for them to be used
>>> unambiguously.
>>>
>>>
>> I can make generic ENABLE/DISABLE macro as you suggested but datasheet
>> says as 0=NORMAL, 1 = TRISTATE. and that's why I kept name very near to
>> the datasheet.
> That documentation is relative to a specific field, whereas the
> namespace for #defines is global. Hence, we may have to name #defines
> using stricter rules than the TRM's field values, in order to make them
> unambiguous.
I send the V2 patches on which I have taken care of this.
Request you to please review.
Thanks,
Laxman
More information about the linux-arm-kernel
mailing list