Re: [PATCH 2/2] pps-gpio: Set echo GPIO pin via devicetree
On 15/02/18 16:08, Lukas Senger wrote: @@ -20,18 +21,20 @@ target = <>; __overlay__ { pps_pins: pps_pins@12 { - brcm,pins = <18>; - brcm,function = <0>;// in - brcm,pull = <0>;// off + brcm,pins = <18 17>; + brcm,function = <0 1>;// in out + brcm,pull = <0 0>;// off off These modifications are not PPS related. }; }; }; __overrides__ { - gpiopin = <>,"gpios:4", + gpiopin = <>,"in-gpios:4", <>,"reg:0", <_pins>,"brcm,pins:0", <_pins>,"reg:0"; + echopin = <>,"out-gpios:4", + <_pins>,"brcm,pins:4"; Ditto. I don't understand why these modifications are unrelated. Especially the echopin-option should exist, shouldn't it? These modifications are needed to define a custom instance of a PPS device which is not part of the PPS subtree, that's why they should be put into another patch. Ciao, Rodolfo -- HCE Engineering e-mail: giome...@hce-engineering.it GNU/Linux Solutions giome...@enneenne.com Linux Device Driver giome...@linux.it Embedded Systems phone: +39 349 2432127 UNIX programming skype: rodolfo.giometti Cosino Project - the quick prototyping embedded system - www.cosino.it Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
Re: [PATCH 2/2] pps-gpio: Set echo GPIO pin via devicetree
On 15/02/18 16:08, Lukas Senger wrote: @@ -20,18 +21,20 @@ target = <>; __overlay__ { pps_pins: pps_pins@12 { - brcm,pins = <18>; - brcm,function = <0>;// in - brcm,pull = <0>;// off + brcm,pins = <18 17>; + brcm,function = <0 1>;// in out + brcm,pull = <0 0>;// off off These modifications are not PPS related. }; }; }; __overrides__ { - gpiopin = <>,"gpios:4", + gpiopin = <>,"in-gpios:4", <>,"reg:0", <_pins>,"brcm,pins:0", <_pins>,"reg:0"; + echopin = <>,"out-gpios:4", + <_pins>,"brcm,pins:4"; Ditto. I don't understand why these modifications are unrelated. Especially the echopin-option should exist, shouldn't it? These modifications are needed to define a custom instance of a PPS device which is not part of the PPS subtree, that's why they should be put into another patch. Ciao, Rodolfo -- HCE Engineering e-mail: giome...@hce-engineering.it GNU/Linux Solutions giome...@enneenne.com Linux Device Driver giome...@linux.it Embedded Systems phone: +39 349 2432127 UNIX programming skype: rodolfo.giometti Cosino Project - the quick prototyping embedded system - www.cosino.it Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
Re: [PATCH 2/2] pps-gpio: Set echo GPIO pin via devicetree
> > @@ -20,18 +21,20 @@ > > target = <>; > > __overlay__ { > > pps_pins: pps_pins@12 { > > - brcm,pins = <18>; > > - brcm,function = <0>;// in > > - brcm,pull = <0>;// off > > + brcm,pins = <18 17>; > > + brcm,function = <0 1>;// in > > out > > + brcm,pull = <0 0>;// off > > off > > These modifications are not PPS related. > > > }; > > }; > > }; > > > > __overrides__ { > > - gpiopin = <>,"gpios:4", > > + gpiopin = <>,"in-gpios:4", > > <>,"reg:0", > > <_pins>,"brcm,pins:0", > > <_pins>,"reg:0"; > > + echopin = <>,"out-gpios:4", > > + <_pins>,"brcm,pins:4"; > > Ditto. I don't understand why these modifications are unrelated. Especially the echopin-option should exist, shouldn't it? Cheers, Lukas
Re: [PATCH 2/2] pps-gpio: Set echo GPIO pin via devicetree
> > @@ -20,18 +21,20 @@ > > target = <>; > > __overlay__ { > > pps_pins: pps_pins@12 { > > - brcm,pins = <18>; > > - brcm,function = <0>;// in > > - brcm,pull = <0>;// off > > + brcm,pins = <18 17>; > > + brcm,function = <0 1>;// in > > out > > + brcm,pull = <0 0>;// off > > off > > These modifications are not PPS related. > > > }; > > }; > > }; > > > > __overrides__ { > > - gpiopin = <>,"gpios:4", > > + gpiopin = <>,"in-gpios:4", > > <>,"reg:0", > > <_pins>,"brcm,pins:0", > > <_pins>,"reg:0"; > > + echopin = <>,"out-gpios:4", > > + <_pins>,"brcm,pins:4"; > > Ditto. I don't understand why these modifications are unrelated. Especially the echopin-option should exist, shouldn't it? Cheers, Lukas
Re: [PATCH 2/2] pps-gpio: Set echo GPIO pin via devicetree
On 15/02/18 13:59, Lukas Senger wrote: --- arch/arm/boot/dts/overlays/pps-gpio-overlay.dts | 13 - drivers/pps/clients/pps-gpio.c | 26 ++--- include/linux/pps-gpio.h| 1 + 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts index 9ee4bdfa6167..06e6cf5fc6ea 100644 --- a/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts +++ b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts @@ -10,7 +10,8 @@ compatible = "pps-gpio"; pinctrl-names = "default"; pinctrl-0 = <_pins>; - gpios = < 18 0>; + in-gpios = < 18 0>; Please, don't break backward compatibility! You can leave "gpios" as is and using, for instance, "echo-gpios" for echoing purposes. -+ | ++ | v + out-gpios = < 17 0>; status = "okay"; }; }; @@ -20,18 +21,20 @@ target = <>; __overlay__ { pps_pins: pps_pins@12 { - brcm,pins = <18>; - brcm,function = <0>;// in - brcm,pull = <0>;// off + brcm,pins = <18 17>; + brcm,function = <0 1>;// in out + brcm,pull = <0 0>;// off off These modifications are not PPS related. }; }; }; __overrides__ { - gpiopin = <>,"gpios:4", + gpiopin = <>,"in-gpios:4", <>,"reg:0", <_pins>,"brcm,pins:0", <_pins>,"reg:0"; + echopin = <>,"out-gpios:4", + <_pins>,"brcm,pins:4"; Ditto. assert_falling_edge = <>,"assert-falling-edge?"; }; }; diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c index 35c3b14fc9b9..ce3065889a7e 100644 --- a/drivers/pps/clients/pps-gpio.c +++ b/drivers/pps/clients/pps-gpio.c @@ -37,10 +37,6 @@ #include #include -/* TODO: this should work like gpio_pin below but I don't know how to work with - * devicetree overlays. - */ -#define PPS_GPIO_ECHO_PIN 17 Please provide patches against current kernel code and not against your old patches. I stop reviewing here since following modifications are similar to just reviewed and not acceptable. I'm sorry. Ciao, Rodolfo -- HCE Engineering e-mail: giome...@hce-engineering.it GNU/Linux Solutions giome...@enneenne.com Linux Device Driver giome...@linux.it Embedded Systems phone: +39 349 2432127 UNIX programming skype: rodolfo.giometti Cosino Project - the quick prototyping embedded system - www.cosino.it Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
Re: [PATCH 2/2] pps-gpio: Set echo GPIO pin via devicetree
On 15/02/18 13:59, Lukas Senger wrote: --- arch/arm/boot/dts/overlays/pps-gpio-overlay.dts | 13 - drivers/pps/clients/pps-gpio.c | 26 ++--- include/linux/pps-gpio.h| 1 + 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts index 9ee4bdfa6167..06e6cf5fc6ea 100644 --- a/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts +++ b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts @@ -10,7 +10,8 @@ compatible = "pps-gpio"; pinctrl-names = "default"; pinctrl-0 = <_pins>; - gpios = < 18 0>; + in-gpios = < 18 0>; Please, don't break backward compatibility! You can leave "gpios" as is and using, for instance, "echo-gpios" for echoing purposes. -+ | ++ | v + out-gpios = < 17 0>; status = "okay"; }; }; @@ -20,18 +21,20 @@ target = <>; __overlay__ { pps_pins: pps_pins@12 { - brcm,pins = <18>; - brcm,function = <0>;// in - brcm,pull = <0>;// off + brcm,pins = <18 17>; + brcm,function = <0 1>;// in out + brcm,pull = <0 0>;// off off These modifications are not PPS related. }; }; }; __overrides__ { - gpiopin = <>,"gpios:4", + gpiopin = <>,"in-gpios:4", <>,"reg:0", <_pins>,"brcm,pins:0", <_pins>,"reg:0"; + echopin = <>,"out-gpios:4", + <_pins>,"brcm,pins:4"; Ditto. assert_falling_edge = <>,"assert-falling-edge?"; }; }; diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c index 35c3b14fc9b9..ce3065889a7e 100644 --- a/drivers/pps/clients/pps-gpio.c +++ b/drivers/pps/clients/pps-gpio.c @@ -37,10 +37,6 @@ #include #include -/* TODO: this should work like gpio_pin below but I don't know how to work with - * devicetree overlays. - */ -#define PPS_GPIO_ECHO_PIN 17 Please provide patches against current kernel code and not against your old patches. I stop reviewing here since following modifications are similar to just reviewed and not acceptable. I'm sorry. Ciao, Rodolfo -- HCE Engineering e-mail: giome...@hce-engineering.it GNU/Linux Solutions giome...@enneenne.com Linux Device Driver giome...@linux.it Embedded Systems phone: +39 349 2432127 UNIX programming skype: rodolfo.giometti Cosino Project - the quick prototyping embedded system - www.cosino.it Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it