Re: [PATCH] dp83640: Get gpio and master/slave configuration from DT

2014-02-11 Thread Stefan Sørensen
On Mon, 2014-02-10 at 19:46 +0100, Richard Cochran wrote: > On Mon, Feb 10, 2014 at 02:00:40PM +0100, Stefan Sørensen wrote: > > This patch removes the module parameters gpio_tab and chosen_phy in favour > > of > > retrieving the configuration from DT through the properti

[PATCH v2 2/2] dp83640: Get pin and master/slave configuration from DT

2014-02-11 Thread Stefan Sørensen
mdio busses can now have different pin configurations. Signed-off-by: Stefan Sørensen --- Documentation/devicetree/bindings/net/dp83640.txt | 29 + drivers/net/phy/dp83640.c | 152 ++ 2 files changed, 154 insertions(+), 27 deletions(-) create mode

[PATCH v2 1/2] dp83640: Support a configurable number of periodic outputs

2014-02-11 Thread Stefan Sørensen
The driver is currently limited to a single periodic output. This patch makes the number of peridodic output dynamic by dropping the gpio_tab module parameter and adding calibrate_pin, perout_pins, and extts_pins parameters. Signed-off-by: Stefan Sørensen --- drivers/net/phy/dp83640.c | 75

[PATCH v2 0/2] dp83640: Get pin and master/slave configuration from DT

2014-02-11 Thread Stefan Sørensen
fan Stefan Sørensen (2): dp83640: Support a configurable number of periodic outputs dp83640: Get pin and master/slave configuration from DT Documentation/devicetree/bindings/net/dp83640.txt | 29 +++ drivers/net/phy/dp83640.c | 205 +++--- 2 files changed,

Re: [PATCH v2 1/2] dp83640: Support a configurable number of periodic outputs

2014-02-13 Thread Stefan Sørensen
On Tue, 2014-02-11 at 21:09 +0100, Richard Cochran wrote: > > -#define EXT_EVENT 1 > > Regarding this EXT_EVENT thing ... > > > @@ -430,12 +419,12 @@ static int ptp_dp83640_enable(struct ptp_clock_info > > *ptp, > > switch (rq->type) { > > case PTP_CLK_REQ_EXTTS: > > index

Re: [PATCH v2 2/2] dp83640: Get pin and master/slave configuration from DT

2014-02-13 Thread Stefan Sørensen
On Tue, 2014-02-11 at 21:19 +0100, Richard Cochran wrote: > > +- dp83640,slave: If present, this phy will be slave to another dp83640 > > + on the same mdio bus. > > Wouldn't it be more natural to have one "dp83640,master" property > rather than multiple slave properties? I wanted to keep the co

[PATCH v3 1/3] net:phy:dp83640: Program pulsewidth2 values of perout triggers 0 and 1

2014-02-13 Thread Stefan Sørensen
ing to set the field can result in unstable/no trigger output. This patch add programming of the Pulsewidth2 field, setting it to the same value as the Pulsewidth field for a 50% duty cycle. Signed-off-by: Stefan Sørensen --- drivers/net/phy/dp83640.c | 5 + 1 file changed, 5 insertions(+) di

[PATCH v3 2/3] net:phy:dp83640: Support a configurable number of periodic outputs

2014-02-13 Thread Stefan Sørensen
The driver is currently limited to a single periodic output. This patch makes the number of peridodic output dynamic by dropping the gpio_tab module parameter and adding calibrate_pin, perout_pins, and extts_pins parameters. Signed-off-by: Stefan Sørensen --- drivers/net/phy/dp83640.c | 73

[PATCH v3 0/3] dp83640: Get pin and master/slave configuration from DT

2014-02-13 Thread Stefan Sørensen
bindings documentation - Keep module parameters - Rename gpio->pin - Split patch into DT part and dynamic periodic output support Stefan Sørensen (3): net:phy:dp83640: Program pulsewidth2 values of perout triggers 0 and 1 net:phy:dp83640: Support a configurable number of periodic outp

[PATCH v3 3/3] net:phy:dp83640: Get pin and master/slave configuration from DT

2014-02-13 Thread Stefan Sørensen
mdio busses can now have different pin configurations. Signed-off-by: Stefan Sørensen --- Documentation/devicetree/bindings/net/dp83640.txt | 29 + drivers/net/phy/dp83640.c | 139 ++ 2 files changed, 143 insertions(+), 25 deletions(-) create mode

[PATCH v3 3/3] net:phy:dp83640: Get pin and master/slave configuration from DT

2014-02-13 Thread Stefan Sørensen
mdio busses can now have different pin configurations. Signed-off-by: Stefan Sørensen --- Documentation/devicetree/bindings/net/dp83640.txt | 29 + drivers/net/phy/dp83640.c | 139 ++ 2 files changed, 143 insertions(+), 25 deletions(-) create mode

[PATCH v3 0/3] dp83640: Get pin and master/slave configuration from DT

2014-02-13 Thread Stefan Sørensen
bindings documentation - Keep module parameters - Rename gpio->pin - Split patch into DT part and dynamic periodic output support Stefan Sørensen (3): net:phy:dp83640: Program pulsewidth2 values of perout triggers 0 and 1 net:phy:dp83640: Support a configurable number of periodic outp

[PATCH v3 1/3] net:phy:dp83640: Program pulsewidth2 values of perout triggers 0 and 1

2014-02-13 Thread Stefan Sørensen
ing to set the field can result in unstable/no trigger output. This patch add programming of the Pulsewidth2 field, setting it to the same value as the Pulsewidth field for a 50% duty cycle. Signed-off-by: Stefan Sørensen --- drivers/net/phy/dp83640.c | 5 + 1 file changed, 5 insertions(+) di

[PATCH v3 2/3] net:phy:dp83640: Support a configurable number of periodic outputs

2014-02-13 Thread Stefan Sørensen
The driver is currently limited to a single periodic output. This patch makes the number of peridodic output dynamic by dropping the gpio_tab module parameter and adding calibrate_pin, perout_pins, and extts_pins parameters. Signed-off-by: Stefan Sørensen --- drivers/net/phy/dp83640.c | 73

[PATCH] dp83640: Get gpio and master/slave configuration from DT

2014-02-10 Thread Stefan Sørensen
clock device, allowing different gpio setups for each master. Furthermore the code is enhanced to handle more than one periodic output. Signed-off-by: Stefan Sørensen --- The slave configuration code is totally untested as I only have access to boards with a single DP3640. drivers/net/phy

Re: [PATCH] dp83640: Get gpio and master/slave configuration from DT

2014-02-10 Thread Stefan Sørensen
On Mon, 2014-02-10 at 13:42 +, Mark Rutland wrote: > Binding document please. Dang, I somehow managed to drop that from the patch. I will fix for the next version. > > + if (of_find_property(node, "dp83640,slave", NULL)) > > + dp83640->slave = true; > > Use of_property_read_bool