diff mbox series

[v2,1/2] dt-bindings: at24: add new optional power-supply property

Message ID 20220822105830.22790-2-farbere@amazon.com
State Superseded
Delegated to: Bartosz Golaszewski
Headers show
Series add power-supply control to enable eeprom usage | expand

Commit Message

Farber, Eliav Aug. 22, 2022, 10:58 a.m. UTC
Boards using the AT24 EEPROMs might have a GPIO that controls the power
supply of the chip, and it must be set to enable the usage of it.

Add a new optional property to the device tree binding document, which
allows to specify a GPIO regulator for the pin that controls the power.

On Linux this means that we need to enable the GPIO at the beginning of
probe function, before trying to access the chip.

Signed-off-by: Eliav Farber <farbere@amazon.com>
---
V1 -> V2:
Change pointed out by Rob Herring:
- Use a gpio regulator for power-supply control.

 Documentation/devicetree/bindings/eeprom/at24.txt | 3 +++
 1 file changed, 3 insertions(+)

Comments

Rob Herring (Arm) Aug. 22, 2022, 9:46 p.m. UTC | #1
On Mon, Aug 22, 2022 at 10:58:29AM +0000, Eliav Farber wrote:
> Boards using the AT24 EEPROMs might have a GPIO that controls the power
> supply of the chip, and it must be set to enable the usage of it.
> 
> Add a new optional property to the device tree binding document, which
> allows to specify a GPIO regulator for the pin that controls the power.
> 
> On Linux this means that we need to enable the GPIO at the beginning of
> probe function, before trying to access the chip.
> 
> Signed-off-by: Eliav Farber <farbere@amazon.com>
> ---
> V1 -> V2:
> Change pointed out by Rob Herring:
> - Use a gpio regulator for power-supply control.
> 
>  Documentation/devicetree/bindings/eeprom/at24.txt | 3 +++
>  1 file changed, 3 insertions(+)

This file doesn't exist any more. Use the latest -rc1 kernel unless 
there is a reason you need a different (even later) base.

Rob
Farber, Eliav Aug. 28, 2022, 3:45 p.m. UTC | #2
On 8/23/2022 12:46 AM, Rob Herring wrote:
>>  Documentation/devicetree/bindings/eeprom/at24.txt | 3 +++
>>  1 file changed, 3 insertions(+)
>
> This file doesn't exist any more. Use the latest -rc1 kernel unless
> there is a reason you need a different (even later) base.
I applied the change on top of v6.0-rc1

--
Thanks, Eliav
Krzysztof Kozlowski Aug. 30, 2022, 5:05 p.m. UTC | #3
On 28/08/2022 18:45, Farber, Eliav wrote:
> On 8/23/2022 12:46 AM, Rob Herring wrote:
>>>  Documentation/devicetree/bindings/eeprom/at24.txt | 3 +++
>>>  1 file changed, 3 insertions(+)
>>
>> This file doesn't exist any more. Use the latest -rc1 kernel unless
>> there is a reason you need a different (even later) base.
> I applied the change on top of v6.0-rc1

Not really. The file is gone since v5.5-rc1 as you can easily see in the
sources.

Since you did not Cc-me, it's another proof you based your work on some
old kernel.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/eeprom/at24.txt b/Documentation/devicetree/bindings/eeprom/at24.txt
index f9a7c984274c..6d23ceac5fdc 100644
--- a/Documentation/devicetree/bindings/eeprom/at24.txt
+++ b/Documentation/devicetree/bindings/eeprom/at24.txt
@@ -73,6 +73,9 @@  Optional properties:
 
   - wp-gpios: GPIO to which the write-protect pin of the chip is connected.
 
+  - power-supply: phandle of the gpio regulator that provides the supply
+                  voltage.
+
   - address-width: number of address bits (one of 8, 16).
 
 Example: