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

From: Eliav Farber
Date: Sun Aug 28 2022 - 11:49:41 EST


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@xxxxxxxxxx>
---
V2 -> V3:
Apply on top of v6.0-rc1

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

diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml
index d14e0accbda8..82f0046f67a9 100644
--- a/Documentation/devicetree/bindings/eeprom/at24.yaml
+++ b/Documentation/devicetree/bindings/eeprom/at24.yaml
@@ -179,6 +179,10 @@ properties:
description:
phandle of the regulator that provides the supply voltage.

+ power-supply:
+ description:
+ phandle of the gpio regulator that provides the supply voltage.
+
required:
- compatible
- reg
--
2.37.1