[v2] dt-binding: eeprom: at24: add supply properties
diff mbox series

Message ID 20191018082557.3696-2-bibby.hsieh@mediatek.com
State Rejected
Headers show
Series
  • [v2] dt-binding: eeprom: at24: add supply properties
Related show

Commit Message

Bibby Hsieh Oct. 18, 2019, 8:25 a.m. UTC
In some platforms, they disable the power-supply of eeprom and i2c due
to power consumption reduction.

This patch add two supply properties: vcc-supply, i2c-supply.

Changes since v1:
 - change supply name
 - rebase to next

Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
---
 Documentation/devicetree/bindings/eeprom/at24.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Bartosz Golaszewski Oct. 18, 2019, 10:07 a.m. UTC | #1
pt., 18 paź 2019 o 10:26 Bibby Hsieh <bibby.hsieh@mediatek.com> napisał(a):
>
> In some platforms, they disable the power-supply of eeprom and i2c due
> to power consumption reduction.
>
> This patch add two supply properties: vcc-supply, i2c-supply.
>
> Changes since v1:
>  - change supply name
>  - rebase to next
>
> Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> ---
>  Documentation/devicetree/bindings/eeprom/at24.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml
> index e8778560d966..578487a5d9b7 100644
> --- a/Documentation/devicetree/bindings/eeprom/at24.yaml
> +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml
> @@ -167,6 +167,14 @@ properties:
>      minimum: 1
>      maximum: 8
>
> +  vcc-supply:
> +    description:
> +      phandle of the regulator that provides the supply voltage.
> +
> +  i2c-sypply:
> +    description:
> +      phandle to the regulator that provides power to i2c.
> +
>  required:
>    - compatible
>    - reg
> --
> 2.18.0
>

Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Rob: if it looks good - can you take it through your branch together
with the conversion patch from this cycle?

Bart
Bartosz Golaszewski Oct. 24, 2019, 6:22 a.m. UTC | #2
pt., 18 paź 2019 o 10:26 Bibby Hsieh <bibby.hsieh@mediatek.com> napisał(a):
>
> In some platforms, they disable the power-supply of eeprom and i2c due
> to power consumption reduction.
>
> This patch add two supply properties: vcc-supply, i2c-supply.
>
> Changes since v1:
>  - change supply name
>  - rebase to next
>
> Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> ---
>  Documentation/devicetree/bindings/eeprom/at24.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml
> index e8778560d966..578487a5d9b7 100644
> --- a/Documentation/devicetree/bindings/eeprom/at24.yaml
> +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml
> @@ -167,6 +167,14 @@ properties:
>      minimum: 1
>      maximum: 8
>
> +  vcc-supply:
> +    description:
> +      phandle of the regulator that provides the supply voltage.
> +
> +  i2c-sypply:
> +    description:
> +      phandle to the regulator that provides power to i2c.
> +

Something was bothering me about this patch so I came back to take a
look. Can you explain what i2c actually stands for in this doc? I hope
I'm misinterpreting something and it isn't that the driver disables
the regulator powering the i2c bus controller?

Bart

>  required:
>    - compatible
>    - reg
> --
> 2.18.0
>
Peter Rosin Oct. 24, 2019, 6:48 a.m. UTC | #3
On 2019-10-18 10:25, Bibby Hsieh wrote:
> In some platforms, they disable the power-supply of eeprom and i2c due
> to power consumption reduction.
> 
> This patch add two supply properties: vcc-supply, i2c-supply.
> 
> Changes since v1:
>  - change supply name
>  - rebase to next
> 
> Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> ---
>  Documentation/devicetree/bindings/eeprom/at24.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml
> index e8778560d966..578487a5d9b7 100644
> --- a/Documentation/devicetree/bindings/eeprom/at24.yaml
> +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml
> @@ -167,6 +167,14 @@ properties:
>      minimum: 1
>      maximum: 8
>  
> +  vcc-supply:
> +    description:
> +      phandle of the regulator that provides the supply voltage.
> +
> +  i2c-sypply:

s/sypply/supply/

Cheers,
Peter

> +    description:
> +      phandle to the regulator that provides power to i2c.
> +
>  required:
>    - compatible
>    - reg
>
Tomasz Figa Oct. 24, 2019, 7:01 a.m. UTC | #4
On Thu, Oct 24, 2019 at 3:22 PM Bartosz Golaszewski
<bgolaszewski@baylibre.com> wrote:
>
> pt., 18 paź 2019 o 10:26 Bibby Hsieh <bibby.hsieh@mediatek.com> napisał(a):
> >
> > In some platforms, they disable the power-supply of eeprom and i2c due
> > to power consumption reduction.
> >
> > This patch add two supply properties: vcc-supply, i2c-supply.
> >
> > Changes since v1:
> >  - change supply name
> >  - rebase to next
> >
> > Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> > ---
> >  Documentation/devicetree/bindings/eeprom/at24.yaml | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > index e8778560d966..578487a5d9b7 100644
> > --- a/Documentation/devicetree/bindings/eeprom/at24.yaml
> > +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > @@ -167,6 +167,14 @@ properties:
> >      minimum: 1
> >      maximum: 8
> >
> > +  vcc-supply:
> > +    description:
> > +      phandle of the regulator that provides the supply voltage.
> > +
> > +  i2c-sypply:
> > +    description:
> > +      phandle to the regulator that provides power to i2c.
> > +
>
> Something was bothering me about this patch so I came back to take a
> look. Can you explain what i2c actually stands for in this doc? I hope
> I'm misinterpreting something and it isn't that the driver disables
> the regulator powering the i2c bus controller?

In our case it's the regulator that the I2C bus is pulled up to.

Best regards,
Tomasz
Bartosz Golaszewski Oct. 24, 2019, 8:40 a.m. UTC | #5
czw., 24 paź 2019 o 09:02 Tomasz Figa <tfiga@chromium.org> napisał(a):
>
> On Thu, Oct 24, 2019 at 3:22 PM Bartosz Golaszewski
> <bgolaszewski@baylibre.com> wrote:
> >
> > pt., 18 paź 2019 o 10:26 Bibby Hsieh <bibby.hsieh@mediatek.com> napisał(a):
> > >
> > > In some platforms, they disable the power-supply of eeprom and i2c due
> > > to power consumption reduction.
> > >
> > > This patch add two supply properties: vcc-supply, i2c-supply.
> > >
> > > Changes since v1:
> > >  - change supply name
> > >  - rebase to next
> > >
> > > Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> > > ---
> > >  Documentation/devicetree/bindings/eeprom/at24.yaml | 8 ++++++++
> > >  1 file changed, 8 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > index e8778560d966..578487a5d9b7 100644
> > > --- a/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > @@ -167,6 +167,14 @@ properties:
> > >      minimum: 1
> > >      maximum: 8
> > >
> > > +  vcc-supply:
> > > +    description:
> > > +      phandle of the regulator that provides the supply voltage.
> > > +
> > > +  i2c-sypply:
> > > +    description:
> > > +      phandle to the regulator that provides power to i2c.
> > > +
> >
> > Something was bothering me about this patch so I came back to take a
> > look. Can you explain what i2c actually stands for in this doc? I hope
> > I'm misinterpreting something and it isn't that the driver disables
> > the regulator powering the i2c bus controller?
>
> In our case it's the regulator that the I2C bus is pulled up to.
>

Then it has nothing to do with a generic EEPROM driver IMO. I think
you need to add the control for this regulator to your i2c controller
driver and create a power domain where the EEPROM would be lower in
hierarchy.

Bart

> Best regards,
> Tomasz
Tomasz Figa Oct. 24, 2019, 9:32 a.m. UTC | #6
On Thu, Oct 24, 2019 at 5:40 PM Bartosz Golaszewski
<bgolaszewski@baylibre.com> wrote:
>
> czw., 24 paź 2019 o 09:02 Tomasz Figa <tfiga@chromium.org> napisał(a):
> >
> > On Thu, Oct 24, 2019 at 3:22 PM Bartosz Golaszewski
> > <bgolaszewski@baylibre.com> wrote:
> > >
> > > pt., 18 paź 2019 o 10:26 Bibby Hsieh <bibby.hsieh@mediatek.com> napisał(a):
> > > >
> > > > In some platforms, they disable the power-supply of eeprom and i2c due
> > > > to power consumption reduction.
> > > >
> > > > This patch add two supply properties: vcc-supply, i2c-supply.
> > > >
> > > > Changes since v1:
> > > >  - change supply name
> > > >  - rebase to next
> > > >
> > > > Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> > > > ---
> > > >  Documentation/devicetree/bindings/eeprom/at24.yaml | 8 ++++++++
> > > >  1 file changed, 8 insertions(+)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > index e8778560d966..578487a5d9b7 100644
> > > > --- a/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > @@ -167,6 +167,14 @@ properties:
> > > >      minimum: 1
> > > >      maximum: 8
> > > >
> > > > +  vcc-supply:
> > > > +    description:
> > > > +      phandle of the regulator that provides the supply voltage.
> > > > +
> > > > +  i2c-sypply:
> > > > +    description:
> > > > +      phandle to the regulator that provides power to i2c.
> > > > +
> > >
> > > Something was bothering me about this patch so I came back to take a
> > > look. Can you explain what i2c actually stands for in this doc? I hope
> > > I'm misinterpreting something and it isn't that the driver disables
> > > the regulator powering the i2c bus controller?
> >
> > In our case it's the regulator that the I2C bus is pulled up to.
> >
>
> Then it has nothing to do with a generic EEPROM driver IMO. I think
> you need to add the control for this regulator to your i2c controller
> driver and create a power domain where the EEPROM would be lower in
> hierarchy.

While I agree that the generic EEPROM driver may not be the best place
to do it, neither is a driver for a specific SoC i2c controller. The
hardware design is not specific to any particular i2c controller.

Perhaps we need the generic i2c core to take into account an
i2c-supply? Wolfram, any thoughts on this?

Best regards,
Tomasz
Rob Herring Oct. 25, 2019, 9:10 p.m. UTC | #7
On Thu, Oct 24, 2019 at 06:32:38PM +0900, Tomasz Figa wrote:
> On Thu, Oct 24, 2019 at 5:40 PM Bartosz Golaszewski
> <bgolaszewski@baylibre.com> wrote:
> >
> > czw., 24 paź 2019 o 09:02 Tomasz Figa <tfiga@chromium.org> napisał(a):
> > >
> > > On Thu, Oct 24, 2019 at 3:22 PM Bartosz Golaszewski
> > > <bgolaszewski@baylibre.com> wrote:
> > > >
> > > > pt., 18 paź 2019 o 10:26 Bibby Hsieh <bibby.hsieh@mediatek.com> napisał(a):
> > > > >
> > > > > In some platforms, they disable the power-supply of eeprom and i2c due
> > > > > to power consumption reduction.
> > > > >
> > > > > This patch add two supply properties: vcc-supply, i2c-supply.
> > > > >
> > > > > Changes since v1:
> > > > >  - change supply name
> > > > >  - rebase to next
> > > > >
> > > > > Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> > > > > ---
> > > > >  Documentation/devicetree/bindings/eeprom/at24.yaml | 8 ++++++++
> > > > >  1 file changed, 8 insertions(+)
> > > > >
> > > > > diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > > index e8778560d966..578487a5d9b7 100644
> > > > > --- a/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > > +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > > @@ -167,6 +167,14 @@ properties:
> > > > >      minimum: 1
> > > > >      maximum: 8
> > > > >
> > > > > +  vcc-supply:
> > > > > +    description:
> > > > > +      phandle of the regulator that provides the supply voltage.
> > > > > +
> > > > > +  i2c-sypply:
> > > > > +    description:
> > > > > +      phandle to the regulator that provides power to i2c.
> > > > > +
> > > >
> > > > Something was bothering me about this patch so I came back to take a
> > > > look. Can you explain what i2c actually stands for in this doc? I hope
> > > > I'm misinterpreting something and it isn't that the driver disables
> > > > the regulator powering the i2c bus controller?
> > >
> > > In our case it's the regulator that the I2C bus is pulled up to.
> > >
> >
> > Then it has nothing to do with a generic EEPROM driver IMO. I think
> > you need to add the control for this regulator to your i2c controller
> > driver and create a power domain where the EEPROM would be lower in
> > hierarchy.
> 
> While I agree that the generic EEPROM driver may not be the best place
> to do it, neither is a driver for a specific SoC i2c controller. The
> hardware design is not specific to any particular i2c controller.
> 
> Perhaps we need the generic i2c core to take into account an
> i2c-supply? Wolfram, any thoughts on this?

Sounds good to me. Maybe 'bus-supply' instead to indicate it's supposed 
to be for the bus and not other things. It should reside in the I2C 
controller's node (or mux ports) though.

Rob
Bartosz Golaszewski Oct. 26, 2019, 12:05 p.m. UTC | #8
pt., 25 paź 2019 o 23:10 Rob Herring <robh@kernel.org> napisał(a):
>
> On Thu, Oct 24, 2019 at 06:32:38PM +0900, Tomasz Figa wrote:
> > On Thu, Oct 24, 2019 at 5:40 PM Bartosz Golaszewski
> > <bgolaszewski@baylibre.com> wrote:
> > >
> > > czw., 24 paź 2019 o 09:02 Tomasz Figa <tfiga@chromium.org> napisał(a):
> > > >
> > > > On Thu, Oct 24, 2019 at 3:22 PM Bartosz Golaszewski
> > > > <bgolaszewski@baylibre.com> wrote:
> > > > >
> > > > > pt., 18 paź 2019 o 10:26 Bibby Hsieh <bibby.hsieh@mediatek.com> napisał(a):
> > > > > >
> > > > > > In some platforms, they disable the power-supply of eeprom and i2c due
> > > > > > to power consumption reduction.
> > > > > >
> > > > > > This patch add two supply properties: vcc-supply, i2c-supply.
> > > > > >
> > > > > > Changes since v1:
> > > > > >  - change supply name
> > > > > >  - rebase to next
> > > > > >
> > > > > > Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> > > > > > ---
> > > > > >  Documentation/devicetree/bindings/eeprom/at24.yaml | 8 ++++++++
> > > > > >  1 file changed, 8 insertions(+)
> > > > > >
> > > > > > diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > > > index e8778560d966..578487a5d9b7 100644
> > > > > > --- a/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > > > +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > > > @@ -167,6 +167,14 @@ properties:
> > > > > >      minimum: 1
> > > > > >      maximum: 8
> > > > > >
> > > > > > +  vcc-supply:
> > > > > > +    description:
> > > > > > +      phandle of the regulator that provides the supply voltage.
> > > > > > +
> > > > > > +  i2c-sypply:
> > > > > > +    description:
> > > > > > +      phandle to the regulator that provides power to i2c.
> > > > > > +
> > > > >
> > > > > Something was bothering me about this patch so I came back to take a
> > > > > look. Can you explain what i2c actually stands for in this doc? I hope
> > > > > I'm misinterpreting something and it isn't that the driver disables
> > > > > the regulator powering the i2c bus controller?
> > > >
> > > > In our case it's the regulator that the I2C bus is pulled up to.
> > > >
> > >
> > > Then it has nothing to do with a generic EEPROM driver IMO. I think
> > > you need to add the control for this regulator to your i2c controller
> > > driver and create a power domain where the EEPROM would be lower in
> > > hierarchy.
> >
> > While I agree that the generic EEPROM driver may not be the best place
> > to do it, neither is a driver for a specific SoC i2c controller. The
> > hardware design is not specific to any particular i2c controller.
> >
> > Perhaps we need the generic i2c core to take into account an
> > i2c-supply? Wolfram, any thoughts on this?
>
> Sounds good to me. Maybe 'bus-supply' instead to indicate it's supposed
> to be for the bus and not other things. It should reside in the I2C
> controller's node (or mux ports) though.
>
> Rob

Thanks,

in that case Bibby: please just use a single regulator for vcc-supply in at24.

Thanks,
Bartosz
Bibby Hsieh Oct. 28, 2019, 2:36 a.m. UTC | #9
On Sat, 2019-10-26 at 14:05 +0200, Bartosz Golaszewski wrote:
> pt., 25 paź 2019 o 23:10 Rob Herring <robh@kernel.org> napisał(a):
> >
> > On Thu, Oct 24, 2019 at 06:32:38PM +0900, Tomasz Figa wrote:
> > > On Thu, Oct 24, 2019 at 5:40 PM Bartosz Golaszewski
> > > <bgolaszewski@baylibre.com> wrote:
> > > >
> > > > czw., 24 paź 2019 o 09:02 Tomasz Figa <tfiga@chromium.org> napisał(a):
> > > > >
> > > > > On Thu, Oct 24, 2019 at 3:22 PM Bartosz Golaszewski
> > > > > <bgolaszewski@baylibre.com> wrote:
> > > > > >
> > > > > > pt., 18 paź 2019 o 10:26 Bibby Hsieh <bibby.hsieh@mediatek.com> napisał(a):
> > > > > > >
> > > > > > > In some platforms, they disable the power-supply of eeprom and i2c due
> > > > > > > to power consumption reduction.
> > > > > > >
> > > > > > > This patch add two supply properties: vcc-supply, i2c-supply.
> > > > > > >
> > > > > > > Changes since v1:
> > > > > > >  - change supply name
> > > > > > >  - rebase to next
> > > > > > >
> > > > > > > Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> > > > > > > ---
> > > > > > >  Documentation/devicetree/bindings/eeprom/at24.yaml | 8 ++++++++
> > > > > > >  1 file changed, 8 insertions(+)
> > > > > > >
> > > > > > > diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > > > > index e8778560d966..578487a5d9b7 100644
> > > > > > > --- a/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > > > > +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > > > > @@ -167,6 +167,14 @@ properties:
> > > > > > >      minimum: 1
> > > > > > >      maximum: 8
> > > > > > >
> > > > > > > +  vcc-supply:
> > > > > > > +    description:
> > > > > > > +      phandle of the regulator that provides the supply voltage.
> > > > > > > +
> > > > > > > +  i2c-sypply:
> > > > > > > +    description:
> > > > > > > +      phandle to the regulator that provides power to i2c.
> > > > > > > +
> > > > > >
> > > > > > Something was bothering me about this patch so I came back to take a
> > > > > > look. Can you explain what i2c actually stands for in this doc? I hope
> > > > > > I'm misinterpreting something and it isn't that the driver disables
> > > > > > the regulator powering the i2c bus controller?
> > > > >
> > > > > In our case it's the regulator that the I2C bus is pulled up to.
> > > > >
> > > >
> > > > Then it has nothing to do with a generic EEPROM driver IMO. I think
> > > > you need to add the control for this regulator to your i2c controller
> > > > driver and create a power domain where the EEPROM would be lower in
> > > > hierarchy.
> > >
> > > While I agree that the generic EEPROM driver may not be the best place
> > > to do it, neither is a driver for a specific SoC i2c controller. The
> > > hardware design is not specific to any particular i2c controller.
> > >
> > > Perhaps we need the generic i2c core to take into account an
> > > i2c-supply? Wolfram, any thoughts on this?
> >
> > Sounds good to me. Maybe 'bus-supply' instead to indicate it's supposed
> > to be for the bus and not other things. It should reside in the I2C
> > controller's node (or mux ports) though.
> >
> > Rob
> 
> Thanks,
> 
> in that case Bibby: please just use a single regulator for vcc-supply in at24.

To my understanding, there are something I need to do.
1. remove i2c-supply property from DT.
2. just control vcc-supply in at24 driver.
3. add i2c-supply control in i2c and i2c-supply property in DT?

Is there any mistakes?

Bibby

> 
> Thanks,
> Bartosz
Tomasz Figa Nov. 7, 2019, 2:32 p.m. UTC | #10
Hi Bibby,

On Mon, Oct 28, 2019 at 11:36 AM Bibby Hsieh <bibby.hsieh@mediatek.com> wrote:
>
> On Sat, 2019-10-26 at 14:05 +0200, Bartosz Golaszewski wrote:
> > pt., 25 paź 2019 o 23:10 Rob Herring <robh@kernel.org> napisał(a):
> > >
> > > On Thu, Oct 24, 2019 at 06:32:38PM +0900, Tomasz Figa wrote:
> > > > On Thu, Oct 24, 2019 at 5:40 PM Bartosz Golaszewski
> > > > <bgolaszewski@baylibre.com> wrote:
> > > > >
> > > > > czw., 24 paź 2019 o 09:02 Tomasz Figa <tfiga@chromium.org> napisał(a):
> > > > > >
> > > > > > On Thu, Oct 24, 2019 at 3:22 PM Bartosz Golaszewski
> > > > > > <bgolaszewski@baylibre.com> wrote:
> > > > > > >
> > > > > > > pt., 18 paź 2019 o 10:26 Bibby Hsieh <bibby.hsieh@mediatek.com> napisał(a):
> > > > > > > >
> > > > > > > > In some platforms, they disable the power-supply of eeprom and i2c due
> > > > > > > > to power consumption reduction.
> > > > > > > >
> > > > > > > > This patch add two supply properties: vcc-supply, i2c-supply.
> > > > > > > >
> > > > > > > > Changes since v1:
> > > > > > > >  - change supply name
> > > > > > > >  - rebase to next
> > > > > > > >
> > > > > > > > Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> > > > > > > > ---
> > > > > > > >  Documentation/devicetree/bindings/eeprom/at24.yaml | 8 ++++++++
> > > > > > > >  1 file changed, 8 insertions(+)
> > > > > > > >
> > > > > > > > diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > > > > > index e8778560d966..578487a5d9b7 100644
> > > > > > > > --- a/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > > > > > +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml
> > > > > > > > @@ -167,6 +167,14 @@ properties:
> > > > > > > >      minimum: 1
> > > > > > > >      maximum: 8
> > > > > > > >
> > > > > > > > +  vcc-supply:
> > > > > > > > +    description:
> > > > > > > > +      phandle of the regulator that provides the supply voltage.
> > > > > > > > +
> > > > > > > > +  i2c-sypply:
> > > > > > > > +    description:
> > > > > > > > +      phandle to the regulator that provides power to i2c.
> > > > > > > > +
> > > > > > >
> > > > > > > Something was bothering me about this patch so I came back to take a
> > > > > > > look. Can you explain what i2c actually stands for in this doc? I hope
> > > > > > > I'm misinterpreting something and it isn't that the driver disables
> > > > > > > the regulator powering the i2c bus controller?
> > > > > >
> > > > > > In our case it's the regulator that the I2C bus is pulled up to.
> > > > > >
> > > > >
> > > > > Then it has nothing to do with a generic EEPROM driver IMO. I think
> > > > > you need to add the control for this regulator to your i2c controller
> > > > > driver and create a power domain where the EEPROM would be lower in
> > > > > hierarchy.
> > > >
> > > > While I agree that the generic EEPROM driver may not be the best place
> > > > to do it, neither is a driver for a specific SoC i2c controller. The
> > > > hardware design is not specific to any particular i2c controller.
> > > >
> > > > Perhaps we need the generic i2c core to take into account an
> > > > i2c-supply? Wolfram, any thoughts on this?
> > >
> > > Sounds good to me. Maybe 'bus-supply' instead to indicate it's supposed
> > > to be for the bus and not other things. It should reside in the I2C
> > > controller's node (or mux ports) though.
> > >
> > > Rob
> >
> > Thanks,
> >
> > in that case Bibby: please just use a single regulator for vcc-supply in at24.
>
> To my understanding, there are something I need to do.
> 1. remove i2c-supply property from DT.
> 2. just control vcc-supply in at24 driver.
> 3. add i2c-supply control in i2c and i2c-supply property in DT?
>
> Is there any mistakes?

Sorry for the late reply, just came back from a trip.

With the replacement of i2c-supply to bus-supply in 3), as suggested
by Rob, sounds good to me.

Best regards,
Tomasz

Patch
diff mbox series

diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml
index e8778560d966..578487a5d9b7 100644
--- a/Documentation/devicetree/bindings/eeprom/at24.yaml
+++ b/Documentation/devicetree/bindings/eeprom/at24.yaml
@@ -167,6 +167,14 @@  properties:
     minimum: 1
     maximum: 8
 
+  vcc-supply:
+    description:
+      phandle of the regulator that provides the supply voltage.
+
+  i2c-sypply:
+    description:
+      phandle to the regulator that provides power to i2c.
+
 required:
   - compatible
   - reg