Re: [PATCH 2/2] mmc: sdhci: DT: Allow to specify that no write protect signal is present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 5 May 2015 at 11:04, Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:
> On 05/05/2015 10:36 AM, Ulf Hansson wrote:
> [...]
>>>
>>> diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt
>>> b/Documentation/devicetree/bindings/mmc/mmc.txt
>>> index 438899e..b068549 100644
>>> --- a/Documentation/devicetree/bindings/mmc/mmc.txt
>>> +++ b/Documentation/devicetree/bindings/mmc/mmc.txt
>>> @@ -21,6 +21,7 @@ Optional properties:
>>>     below for the case, when a GPIO is used for the CD line
>>>   - wp-inverted: when present, polarity on the WP line is inverted. See
>>> the note
>>>     below for the case, when a GPIO is used for the WP line
>>> +- disable-wp: When set no physical WP line is present
>>
>>
>> This requires some additional explanation, I believe. I assume this
>> property is only relevant for those controllers that have internal
>> logic to handle WP!?
>
>
> Yes, currently drivers for controllers that have a built-in WP detection
> logic typically assume that if no WP GPIO is specified the built-in WP logic
> should be used. But for some of them the value returned by the internal
> detection logic will be bogus if there is no WP signal connected. So we need
> a way to specify that that there is no WP signal and the internal detection
> logic shouldn't be used either.
>
>>
>> For those that uses GPIO, this can't ever be a correct configuration.
>> Right?
>
>
> It wouldn't make much sense to use it with a GPIO based detection logic,
> since you simply don't specify the wp-gpio property if it is not present.
> One the other hand it wouldn't cause any harm to specify it in addition to
> not specifying the wp-gpios property.
>
> How about:
>
> - disable-wp: When set no physical WP line is present. This property should
> only be specified when the controller has a dedicated write-protect
> detection logic. If a GPIO is used for write-protect detection logic is used

Remove the last "is used".

> it is sufficient to not specify wp-gpios property in the absence of a WP
> line.

Looks good!

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux