Message ID | 1509418996-25348-2-git-send-email-hl@rock-chips.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Oct 31, 2017 at 11:03:16AM +0800, Lin Huang wrote: > Document a "reset" and "assert-reset-us", it can be used for > driver control reset property. And reuse post-power-on-delay-ms > for deassert reset delay. "dt-bindings: input: " for the subject please. > > Signed-off-by: Lin Huang <hl@rock-chips.com> > --- > Documentation/devicetree/bindings/input/hid-over-i2c.txt | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/input/hid-over-i2c.txt b/Documentation/devicetree/bindings/input/hid-over-i2c.txt > index 28e8bd8..6ab0eed 100644 > --- a/Documentation/devicetree/bindings/input/hid-over-i2c.txt > +++ b/Documentation/devicetree/bindings/input/hid-over-i2c.txt > @@ -31,7 +31,9 @@ device-specific compatible properties, which should be used in addition to the > > - vdd-supply: phandle of the regulator that provides the supply voltage. > - post-power-on-delay-ms: time required by the device after enabling its regulators > - before it is ready for communication. Must be used with 'vdd-supply'. > + or deassert reset pin before it is ready for communication. > +- reset: phandle of the gpio that provides for hid reset pin. The kernel api takes "reset", but the property is "reset-gpios". And it's not just a phandle typically. > +- assert-reset-us: the device require reset assert time. > > Example: > > -- > 2.7.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Oct 30, 2017 at 8:03 PM, Lin Huang <hl@rock-chips.com> wrote: > Document a "reset" and "assert-reset-us", it can be used for > driver control reset property. And reuse post-power-on-delay-ms > for deassert reset delay. > > Signed-off-by: Lin Huang <hl@rock-chips.com> > --- > Documentation/devicetree/bindings/input/hid-over-i2c.txt | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/input/hid-over-i2c.txt b/Documentation/devicetree/bindings/input/hid-over-i2c.txt > index 28e8bd8..6ab0eed 100644 > --- a/Documentation/devicetree/bindings/input/hid-over-i2c.txt > +++ b/Documentation/devicetree/bindings/input/hid-over-i2c.txt > @@ -31,7 +31,9 @@ device-specific compatible properties, which should be used in addition to the > > - vdd-supply: phandle of the regulator that provides the supply voltage. > - post-power-on-delay-ms: time required by the device after enabling its regulators > - before it is ready for communication. Must be used with 'vdd-supply'. > + or deassert reset pin before it is ready for communication. > +- reset: phandle of the gpio that provides for hid reset pin. > +- assert-reset-us: the device require reset assert time. If there was any point in adding the device-specific description around "wacom,w9013"...then you should probably mention these properties there too. The idea was to document possible properties here (where you're adding them already), and to note the property names under the devices (or so far, just 1 device) that support them. Or IOW, you need an addition like this: - compatible: * "wacom,w9013" (Wacom W9013 digitizer). Supports: - vdd-supply - post-power-on-delay-ms + - reset-gpios + - assert-reset-us Brian -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Saturday, November 04, 2017 12:35 PM, Brian Norris wrote: > On Mon, Oct 30, 2017 at 8:03 PM, Lin Huang <hl@rock-chips.com> wrote: >> Document a "reset" and "assert-reset-us", it can be used for >> driver control reset property. And reuse post-power-on-delay-ms >> for deassert reset delay. >> >> Signed-off-by: Lin Huang <hl@rock-chips.com> >> --- >> Documentation/devicetree/bindings/input/hid-over-i2c.txt | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/Documentation/devicetree/bindings/input/hid-over-i2c.txt b/Documentation/devicetree/bindings/input/hid-over-i2c.txt >> index 28e8bd8..6ab0eed 100644 >> --- a/Documentation/devicetree/bindings/input/hid-over-i2c.txt >> +++ b/Documentation/devicetree/bindings/input/hid-over-i2c.txt >> @@ -31,7 +31,9 @@ device-specific compatible properties, which should be used in addition to the >> >> - vdd-supply: phandle of the regulator that provides the supply voltage. >> - post-power-on-delay-ms: time required by the device after enabling its regulators >> - before it is ready for communication. Must be used with 'vdd-supply'. >> + or deassert reset pin before it is ready for communication. >> +- reset: phandle of the gpio that provides for hid reset pin. >> +- assert-reset-us: the device require reset assert time. > If there was any point in adding the device-specific description > around "wacom,w9013"...then you should probably mention these > properties there too. The idea was to document possible properties > here (where you're adding them already), and to note the property > names under the devices (or so far, just 1 device) that support them. > Or IOW, you need an addition like this: > > - compatible: > * "wacom,w9013" (Wacom W9013 digitizer). Supports: > - vdd-supply > - post-power-on-delay-ms > + - reset-gpios > + - assert-reset-us Okay, got it, will fix it next version. > > Brian > > > -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Rob, On Nov 01 2017 or thereabouts, Rob Herring wrote: > On Tue, Oct 31, 2017 at 11:03:16AM +0800, Lin Huang wrote: > > Document a "reset" and "assert-reset-us", it can be used for > > driver control reset property. And reuse post-power-on-delay-ms > > for deassert reset delay. > > "dt-bindings: input: " for the subject please. > > > > > Signed-off-by: Lin Huang <hl@rock-chips.com> > > --- > > Documentation/devicetree/bindings/input/hid-over-i2c.txt | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/input/hid-over-i2c.txt b/Documentation/devicetree/bindings/input/hid-over-i2c.txt > > index 28e8bd8..6ab0eed 100644 > > --- a/Documentation/devicetree/bindings/input/hid-over-i2c.txt > > +++ b/Documentation/devicetree/bindings/input/hid-over-i2c.txt > > @@ -31,7 +31,9 @@ device-specific compatible properties, which should be used in addition to the > > > > - vdd-supply: phandle of the regulator that provides the supply voltage. > > - post-power-on-delay-ms: time required by the device after enabling its regulators > > - before it is ready for communication. Must be used with 'vdd-supply'. > > + or deassert reset pin before it is ready for communication. > > +- reset: phandle of the gpio that provides for hid reset pin. > > The kernel api takes "reset", but the property is "reset-gpios". In the same way the generic regulator interface handles vdd-supply, is there any generic OF handling of reset lines? As far as I can tell, there are 97 references of reset-gpios in my tree, and I wonder if all the matching drivers need to rewrite the same code to set the reset line on power on/off. I am worried because here, 1/2 writes "arbitrary" 0 and 1 to the gpios, and nothing prevent a manufacturer to invert the required voltages on the reset lines, meaning there will be a need for a new OF property. Cheers, Benjamin > > And it's not just a phandle typically. > > > +- assert-reset-us: the device require reset assert time. > > > > Example: > > > > -- > > 2.7.4 > > -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On November 6, 2017 1:06:30 AM PST, Benjamin Tissoires <benjamin.tissoires@redhat.com> wrote: >Hi Rob, > >On Nov 01 2017 or thereabouts, Rob Herring wrote: >> On Tue, Oct 31, 2017 at 11:03:16AM +0800, Lin Huang wrote: >> > Document a "reset" and "assert-reset-us", it can be used for >> > driver control reset property. And reuse post-power-on-delay-ms >> > for deassert reset delay. >> >> "dt-bindings: input: " for the subject please. >> >> > >> > Signed-off-by: Lin Huang <hl@rock-chips.com> >> > --- >> > Documentation/devicetree/bindings/input/hid-over-i2c.txt | 4 +++- >> > 1 file changed, 3 insertions(+), 1 deletion(-) >> > >> > diff --git >a/Documentation/devicetree/bindings/input/hid-over-i2c.txt >b/Documentation/devicetree/bindings/input/hid-over-i2c.txt >> > index 28e8bd8..6ab0eed 100644 >> > --- a/Documentation/devicetree/bindings/input/hid-over-i2c.txt >> > +++ b/Documentation/devicetree/bindings/input/hid-over-i2c.txt >> > @@ -31,7 +31,9 @@ device-specific compatible properties, which >should be used in addition to the >> > >> > - vdd-supply: phandle of the regulator that provides the supply >voltage. >> > - post-power-on-delay-ms: time required by the device after >enabling its regulators >> > - before it is ready for communication. Must be used with >'vdd-supply'. >> > + or deassert reset pin before it is ready for communication. >> > +- reset: phandle of the gpio that provides for hid reset pin. >> >> The kernel api takes "reset", but the property is "reset-gpios". > >In the same way the generic regulator interface handles vdd-supply, is >there any generic OF handling of reset lines? As far as I can tell, >there are 97 references of reset-gpios in my tree, and I wonder if all >the matching drivers need to rewrite the same code to set the reset >line >on power on/off. > >I am worried because here, 1/2 writes "arbitrary" 0 and 1 to the gpios, >and nothing prevent a manufacturer to invert the required voltages on >the reset lines, meaning there will be a need for a new OF property. 1and 0 are logical high and low here. Gpiod API takes care of converting to the proper polarity. Thanks.
diff --git a/Documentation/devicetree/bindings/input/hid-over-i2c.txt b/Documentation/devicetree/bindings/input/hid-over-i2c.txt index 28e8bd8..6ab0eed 100644 --- a/Documentation/devicetree/bindings/input/hid-over-i2c.txt +++ b/Documentation/devicetree/bindings/input/hid-over-i2c.txt @@ -31,7 +31,9 @@ device-specific compatible properties, which should be used in addition to the - vdd-supply: phandle of the regulator that provides the supply voltage. - post-power-on-delay-ms: time required by the device after enabling its regulators - before it is ready for communication. Must be used with 'vdd-supply'. + or deassert reset pin before it is ready for communication. +- reset: phandle of the gpio that provides for hid reset pin. +- assert-reset-us: the device require reset assert time. Example:
Document a "reset" and "assert-reset-us", it can be used for driver control reset property. And reuse post-power-on-delay-ms for deassert reset delay. Signed-off-by: Lin Huang <hl@rock-chips.com> --- Documentation/devicetree/bindings/input/hid-over-i2c.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)