Received: by 10.223.185.116 with SMTP id b49csp2042146wrg; Thu, 15 Feb 2018 05:45:14 -0800 (PST) X-Google-Smtp-Source: AH8x226NDdZdiwaqGQfQ0Jjy+wkU2dg/IFm2ZfyWkzRTScudOfsj+mKXwQo2ueEq53Yt6hQIohZR X-Received: by 10.99.170.77 with SMTP id x13mr2267628pgo.393.1518702314479; Thu, 15 Feb 2018 05:45:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518702314; cv=none; d=google.com; s=arc-20160816; b=OA4pWk0wBJ49CnEzXgSoDB6NiOIfvBdutQb5sa85gD0gohSBT6pJ1jOpN9IfLknpm9 GE6jswyBfqEhr65t/coed9KRGiSSD7sVkHHt79KLbzY7E/+JpXR1edcvujnGzNCAs/t3 59/VgepoFP339s4b2FlzqNp7NctroOpzXklrhVSGqRDO0rTtzInaxUjamzUyVkUaXqNr 7Yh3o7AzX1oEyLxxGe/76+d9rNwspmGSEl9mecQpdLEFrGbKmVQ30euvFY0f+1pGStAC KOMiw1EEkKVQ24fnCLFY9DQUUTj27jBzOVqjeH40fQOJ3iW4WmUW5pgpEcRKWBwIW7+f CZXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=SLNzt9tMuJf5YkzkYBM2+OlwXUHpQuPiHVt2QAkKjdc=; b=KURhjFaLNXFZjU3KXm6+J6JpDR9m0o2+oNdTYZ2q80BGmskMmdB7YLw16J0gnMRfYr V4dQ2q4seW8znK5q7nve6XKwioY2WcHbyLkCKY4X3scMUEPtrP1d3w+yIP4FC+j1oLlo tVeOviQCPeJTXX/54H8VDB5Snzg9VV8fsG4Gr5aLNLy5tGL7S1RS8kcUA4rFGWtmmIvK xrwQwH6pVCKj6L5J1+sfL/qkfcggOGpfAcGoDozC+acn/MM4uNHo8SyU5wwGGmUlKa6R 694AEwdf6aHijrzrrMDqHRthg3KIPzJ4dpfx4McfO3bb6ZIkUXxTOQIan0H/NBydAvg4 BU+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b=bBMDsJqY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u198si1309748pgc.775.2018.02.15.05.45.00; Thu, 15 Feb 2018 05:45:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b=bBMDsJqY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033009AbeBONoB (ORCPT + 99 others); Thu, 15 Feb 2018 08:44:01 -0500 Received: from smtpweb130.aruba.it ([62.149.158.130]:37858 "EHLO smtpweb130.aruba.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032959AbeBONn7 (ORCPT ); Thu, 15 Feb 2018 08:43:59 -0500 X-Greylist: delayed 427 seconds by postgrey-1.27 at vger.kernel.org; Thu, 15 Feb 2018 08:41:43 EST Received: from [192.168.1.7] ([93.146.66.165]) by smtpcmd03.ad.aruba.it with bizsmtp id B1jy1x0093Zw7e5011jyXQ; Thu, 15 Feb 2018 14:43:58 +0100 Subject: Re: [PATCH 2/2] pps-gpio: Set echo GPIO pin via devicetree To: Lukas Senger Cc: linux-kernel@vger.kernel.org References: <20180215125921.29494-1-lukas@fridolin.com> <20180215125921.29494-3-lukas@fridolin.com> From: Rodolfo Giometti Message-ID: Date: Thu, 15 Feb 2018 14:43:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180215125921.29494-3-lukas@fridolin.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1518702238; bh=SLNzt9tMuJf5YkzkYBM2+OlwXUHpQuPiHVt2QAkKjdc=; h=Subject:To:From:Date:MIME-Version:Content-Type; b=bBMDsJqY/WGlp1tAimRLGzbL1FlRDEH7HofEvHnrLOhFZzW9Q2iyUYRJfAbxtdbC3 rvJouoPJ8yrNM9GSEfoBa9wLlzFEVF1lie8qKvwOKIt/Seq4++BGAEdhEoO4Hd+Mky RdEVcS6FJYg7rhogakd3Ifud6dlSixy7vh7g6krzwiFnFzn4qHLYIDX6eqQw44/KgP x+XRwpSEb2r7cv7bMbt04Gehdw4CIQeQvqOMt6qSmTJ5hmkmx6GzKsb3gxPapeMLRK IiUQa0b5p29j0a+LFDM/RhxSBPdky6QevU+rN8oirX8y80/8+Jkk9R4IcDIgG98S2b y1hrRhPRErUNA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 = <&pps_pins>; > - gpios = <&gpio 18 0>; > + in-gpios = <&gpio 18 0>; Please, don't break backward compatibility! You can leave "gpios" as is and using, for instance, "echo-gpios" for echoing purposes. -+ | +--------------------+ | vvvvvvvvv > + out-gpios = <&gpio 17 0>; > status = "okay"; > }; > }; > @@ -20,18 +21,20 @@ > target = <&gpio>; > __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 = <&pps>,"gpios:4", > + gpiopin = <&pps>,"in-gpios:4", > <&pps>,"reg:0", > <&pps_pins>,"brcm,pins:0", > <&pps_pins>,"reg:0"; > + echopin = <&pps>,"out-gpios:4", > + <&pps_pins>,"brcm,pins:4"; Ditto. > assert_falling_edge = <&pps>,"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: giometti@hce-engineering.it GNU/Linux Solutions giometti@enneenne.com Linux Device Driver giometti@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