diff mbox series

[v4,3/8] dt-bindings: i2c: iproc: make 'interrupts' optional

Message ID 20190204231554.87666-4-ray.jui@broadcom.com
State Superseded
Headers show
Series iProc I2C slave mode and NIC mode | expand

Commit Message

Ray Jui Feb. 4, 2019, 11:15 p.m. UTC
In prep for the introduction of polling mode into the driver, update the
binding document to make the 'interrupts' property optional

Signed-off-by: Ray Jui <ray.jui@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
---
 .../devicetree/bindings/i2c/brcm,iproc-i2c.txt         | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Comments

Rob Herring (Arm) Feb. 13, 2019, 9:16 p.m. UTC | #1
On Mon, Feb 04, 2019 at 03:15:49PM -0800, Ray Jui wrote:
> In prep for the introduction of polling mode into the driver, update the
> binding document to make the 'interrupts' property optional
> 
> Signed-off-by: Ray Jui <ray.jui@broadcom.com>
> Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
> ---
>  .../devicetree/bindings/i2c/brcm,iproc-i2c.txt         | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt b/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
> index 81f982ccca31..d3a3620b1f06 100644
> --- a/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
> +++ b/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
> @@ -9,9 +9,6 @@ Required properties:
>      Define the base and range of the I/O address space that contain the iProc
>      I2C controller registers
>  
> -- interrupts:
> -    Should contain the I2C interrupt
> -
>  - clock-frequency:
>      This is the I2C bus clock. Need to be either 100000 or 400000
>  
> @@ -21,6 +18,13 @@ Required properties:
>  - #size-cells:
>      Always 0
>  
> +Optional properties:
> +
> +- interrupts:
> +    Should contain the I2C interrupt. If unspecified, driver will fall back to
> +    polling mode

What determines when you want to use polling mode? I'm not sure DT 
is the best way to control this unless it's really a property of 
the h/w. Driver behavior is really outside the scope of the DT. u-boot 
would use polling even if an interrupt is specified, for example.

Rob
Ray Jui Feb. 13, 2019, 10:06 p.m. UTC | #2
Hi Rob,

On 2/13/2019 1:16 PM, Rob Herring wrote:
> On Mon, Feb 04, 2019 at 03:15:49PM -0800, Ray Jui wrote:
>> In prep for the introduction of polling mode into the driver, update the
>> binding document to make the 'interrupts' property optional
>>
>> Signed-off-by: Ray Jui <ray.jui@broadcom.com>
>> Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
>> ---
>>  .../devicetree/bindings/i2c/brcm,iproc-i2c.txt         | 10 +++++++---
>>  1 file changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt b/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
>> index 81f982ccca31..d3a3620b1f06 100644
>> --- a/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
>> +++ b/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
>> @@ -9,9 +9,6 @@ Required properties:
>>      Define the base and range of the I/O address space that contain the iProc
>>      I2C controller registers
>>  
>> -- interrupts:
>> -    Should contain the I2C interrupt
>> -
>>  - clock-frequency:
>>      This is the I2C bus clock. Need to be either 100000 or 400000
>>  
>> @@ -21,6 +18,13 @@ Required properties:
>>  - #size-cells:
>>      Always 0
>>  
>> +Optional properties:
>> +
>> +- interrupts:
>> +    Should contain the I2C interrupt. If unspecified, driver will fall back to
>> +    polling mode
> 
> What determines when you want to use polling mode? I'm not sure DT 
> is the best way to control this unless it's really a property of 
> the h/w. Driver behavior is really outside the scope of the DT. u-boot 
> would use polling even if an interrupt is specified, for example.
> 
It's tied to the particular revision of the I2C controller, i.e., the
iProc NIC i2c controller does not have interrupt line wired. In this
case, the behavior is determined by the DT compatible string of the
iProc I2C device. I thought that it makes sense to now move the
'interrupts' property to be under "Optional" than "Required" which is
basically what this change is.

> Rob
>
Rob Herring (Arm) Feb. 14, 2019, 2:16 p.m. UTC | #3
On Wed, Feb 13, 2019 at 4:06 PM Ray Jui <ray.jui@broadcom.com> wrote:
>
> Hi Rob,
>
> On 2/13/2019 1:16 PM, Rob Herring wrote:
> > On Mon, Feb 04, 2019 at 03:15:49PM -0800, Ray Jui wrote:
> >> In prep for the introduction of polling mode into the driver, update the
> >> binding document to make the 'interrupts' property optional
> >>
> >> Signed-off-by: Ray Jui <ray.jui@broadcom.com>
> >> Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
> >> ---
> >>  .../devicetree/bindings/i2c/brcm,iproc-i2c.txt         | 10 +++++++---
> >>  1 file changed, 7 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt b/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
> >> index 81f982ccca31..d3a3620b1f06 100644
> >> --- a/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
> >> +++ b/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
> >> @@ -9,9 +9,6 @@ Required properties:
> >>      Define the base and range of the I/O address space that contain the iProc
> >>      I2C controller registers
> >>
> >> -- interrupts:
> >> -    Should contain the I2C interrupt
> >> -
> >>  - clock-frequency:
> >>      This is the I2C bus clock. Need to be either 100000 or 400000
> >>
> >> @@ -21,6 +18,13 @@ Required properties:
> >>  - #size-cells:
> >>      Always 0
> >>
> >> +Optional properties:
> >> +
> >> +- interrupts:
> >> +    Should contain the I2C interrupt. If unspecified, driver will fall back to
> >> +    polling mode
> >
> > What determines when you want to use polling mode? I'm not sure DT
> > is the best way to control this unless it's really a property of
> > the h/w. Driver behavior is really outside the scope of the DT. u-boot
> > would use polling even if an interrupt is specified, for example.
> >
> It's tied to the particular revision of the I2C controller, i.e., the
> iProc NIC i2c controller does not have interrupt line wired. In this
> case, the behavior is determined by the DT compatible string of the
> iProc I2C device. I thought that it makes sense to now move the
> 'interrupts' property to be under "Optional" than "Required" which is
> basically what this change is.

Okay, please put this detail into the commit msg.

Rob
Ray Jui Feb. 14, 2019, 5:36 p.m. UTC | #4
On 2/14/2019 6:16 AM, Rob Herring wrote:
> On Wed, Feb 13, 2019 at 4:06 PM Ray Jui <ray.jui@broadcom.com> wrote:
>>
>> Hi Rob,
>>
>> On 2/13/2019 1:16 PM, Rob Herring wrote:
>>> On Mon, Feb 04, 2019 at 03:15:49PM -0800, Ray Jui wrote:
>>>> In prep for the introduction of polling mode into the driver, update the
>>>> binding document to make the 'interrupts' property optional
>>>>
>>>> Signed-off-by: Ray Jui <ray.jui@broadcom.com>
>>>> Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
>>>> ---
>>>>  .../devicetree/bindings/i2c/brcm,iproc-i2c.txt         | 10 +++++++---
>>>>  1 file changed, 7 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt b/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
>>>> index 81f982ccca31..d3a3620b1f06 100644
>>>> --- a/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
>>>> +++ b/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
>>>> @@ -9,9 +9,6 @@ Required properties:
>>>>      Define the base and range of the I/O address space that contain the iProc
>>>>      I2C controller registers
>>>>
>>>> -- interrupts:
>>>> -    Should contain the I2C interrupt
>>>> -
>>>>  - clock-frequency:
>>>>      This is the I2C bus clock. Need to be either 100000 or 400000
>>>>
>>>> @@ -21,6 +18,13 @@ Required properties:
>>>>  - #size-cells:
>>>>      Always 0
>>>>
>>>> +Optional properties:
>>>> +
>>>> +- interrupts:
>>>> +    Should contain the I2C interrupt. If unspecified, driver will fall back to
>>>> +    polling mode
>>>
>>> What determines when you want to use polling mode? I'm not sure DT
>>> is the best way to control this unless it's really a property of
>>> the h/w. Driver behavior is really outside the scope of the DT. u-boot
>>> would use polling even if an interrupt is specified, for example.
>>>
>> It's tied to the particular revision of the I2C controller, i.e., the
>> iProc NIC i2c controller does not have interrupt line wired. In this
>> case, the behavior is determined by the DT compatible string of the
>> iProc I2C device. I thought that it makes sense to now move the
>> 'interrupts' property to be under "Optional" than "Required" which is
>> basically what this change is.
> 
> Okay, please put this detail into the commit msg.

Will do! Thanks.

> 
> Rob
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt b/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
index 81f982ccca31..d3a3620b1f06 100644
--- a/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt
@@ -9,9 +9,6 @@  Required properties:
     Define the base and range of the I/O address space that contain the iProc
     I2C controller registers
 
-- interrupts:
-    Should contain the I2C interrupt
-
 - clock-frequency:
     This is the I2C bus clock. Need to be either 100000 or 400000
 
@@ -21,6 +18,13 @@  Required properties:
 - #size-cells:
     Always 0
 
+Optional properties:
+
+- interrupts:
+    Should contain the I2C interrupt. If unspecified, driver will fall back to
+    polling mode
+
+
 Example:
 	i2c0: i2c@18008000 {
 		compatible = "brcm,iproc-i2c";