Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2192542imu; Thu, 10 Jan 2019 09:46:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN7qL+YkrI4aNfrWCOnPETQo6WKSHJAWdq0x1FEJd4oBY+qxvnNiPTAZj6TuUaQIU/Z5Ejdu X-Received: by 2002:a62:b511:: with SMTP id y17mr11188972pfe.199.1547142381445; Thu, 10 Jan 2019 09:46:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547142381; cv=none; d=google.com; s=arc-20160816; b=cvV0EB3ZyVEE5SluucBafMhJEGGkLTLznS1LsLZhhaq3hZyrCEdd7H7QOcx/UKSF83 xPC0VnQ15SP3y2m/YRtctmORdtl3z1Ky38N0GKZp2dEq3vx+A1H3ud9eLaQ8u0k6ijRP Qzin1MlR9pw+jsJt0VYNe1FpwfFw7SzmpdchsYkGb8SUDnKR86z3EGCCYRzKONBg18qm bKTJP+OZmg6v+QyQVFi7zU3WKJwtpIEQxutufDjSkS7MQruyaIREzjphCGilL4Z/AhOR t/Mk6UuxJ67KBzUhAByTVRWEheui9/3Voaal1DyYnR29MF0ieCsatOm9OyrHovAEzSRk 9PoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1Qc8YuntKPVB3Jr8uD6M80vnG/oRO05SSthJtLrjArA=; b=T+MwWUlRg0LuDMkXS35XGkkMPAL2e7FBMIog4HpdQkt1itZFQKHt4xGP4PuZRZCrDS CBd0G6F7ju0k8v/1FqSXG5Hal2/nkEXwYIu7vDeikdM45I56SzJgYvlD7NpKWniIvXn0 wacNk9kF1XnMlogJ1PFhu5JdpRwkaOZS/V/gIq4CvBd/pQzVS0m2Ry4qAyXmvmH0CmRD //uCLZ4y4xp7yPpeqYxGuqOPIOhCSynhMzl/Y/225sx6M8AwtXjeZQcFPZaPQXyzFNGD 3ytzZ7xKDbyTDrUeBdyC2pCYwdzU/buzFJskrFYSCZet5iZNsW6jkghQzXwY3GB3pSFL IZoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WG4yAuSx; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si24314030plc.241.2019.01.10.09.46.05; Thu, 10 Jan 2019 09:46:21 -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=@gmail.com header.s=20161025 header.b=WG4yAuSx; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730824AbfAJRnw (ORCPT + 99 others); Thu, 10 Jan 2019 12:43:52 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:33273 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730381AbfAJRnv (ORCPT ); Thu, 10 Jan 2019 12:43:51 -0500 Received: by mail-pl1-f193.google.com with SMTP id z23so5510780plo.0 for ; Thu, 10 Jan 2019 09:43:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1Qc8YuntKPVB3Jr8uD6M80vnG/oRO05SSthJtLrjArA=; b=WG4yAuSx2mdcj15oj2GwnNN0Mbp77Cg3GaOB3Vij66KXDj8ek3ZemwIgC03C1p3eEy 18Z1wjla6kAhNuKe89OCXBv+q6TYQCew79+XZcGENYW7n1I4Ovm81aajqoQcs5weJlpk o71puYdaB28xZkHw4FdrhircoUMWtJEvB2I3NRzCoXb4BD63cDLJ0Ogl0Zv3WuEskEFr JO5NtmmMmO906XKl7ZdwQA9NDqEuaAxd9iW5MoVNeMa1lp8lL60MRgQ5DMJ8Y3yJYRUP zzaQ/HIQN9PJfCXvMBOY7cBNtWvXwBCsGEbtQ6gDpdAY/hgVDU6PliXIBVc+9UZKM9fQ mGeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1Qc8YuntKPVB3Jr8uD6M80vnG/oRO05SSthJtLrjArA=; b=VM0cfzGisPm8axiMTESQlIjxyWpWoobN5IcvZKLRJ6GESLGhpVgyMgvumS3Frqobi7 G09GZ9IabWaAV3BRTIIC6MCC92O/bYD9Ew/XDFZmF4K+AQkQ2Gv8Qy+FuMwzLS9TOcBG 7fKoYOsg8u6qrICR9Qwob6IfwxHADviqxypixRrvw6/MmYl+2M4CgQXvqrnlocqhYggZ OF+Yyl0NQ4tfgv2k0BqR1N4uqgWoxKuRU3JNHj6LjDke9FyB4xetILN7vOMMqB4EhRE4 DTKE7c8gjL6jVDKxa0B/Tr44lJSPQn70/V4Uj6WeE2oZ2CXgXDAbIk/sWJCLaKRDpszC OGJw== X-Gm-Message-State: AJcUukeBVw46kZJ5Kib/BhUaulV5B7sRyuZ25XptmMllCfs86ewLC+EF WhcUPcJJKSLeqHFVKG3XxNM= X-Received: by 2002:a17:902:a601:: with SMTP id u1mr11178605plq.77.1547142230702; Thu, 10 Jan 2019 09:43:50 -0800 (PST) Received: from nishad ([106.51.25.107]) by smtp.gmail.com with ESMTPSA id g2sm102280566pfi.95.2019.01.10.09.43.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 09:43:50 -0800 (PST) Date: Thu, 10 Jan 2019 23:13:43 +0530 From: Nishad Kamdar To: Johan Hovold Cc: Johan Hovold , Greg Kroah-Hartman , Alex Elder , Rui Miguel Silva , greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, nishadkamdar@gmail.com Subject: Re: [PATCH v4 4/4] staging: greybus: arche-platform: Switch to the gpio descriptor interface Message-ID: <20190110174341.GD24566@nishad> References: <20190109113547.GL14782@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190109113547.GL14782@localhost> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 09, 2019 at 12:35:47PM +0100, Johan Hovold wrote: > On Sat, Dec 22, 2018 at 08:23:02PM +0530, Nishad Kamdar wrote: > > Use the gpiod interface instead of the deprecated > > old non-descriptor interface. > > > > Signed-off-by: Nishad Kamdar > > --- > > Changes in v4: > > - Move 'gpio_desc *svc_sysboot' below the reset flag > > as it is more logical to have reset flag below > > reset gpio. > > - Remove a few unnecessary line breaks. > > Changes in v3: > > - Add this patch to a patchset. > > Changes in v2: > > - Move comment to the same line as to what it applies to. > > --- > > > -static inline void svc_reset_onoff(unsigned int gpio, bool onoff) > > +static inline void svc_reset_onoff(struct gpio_desc *gpio, bool onoff) > > { > > - gpio_set_value(gpio, onoff); > > + gpiod_set_value(gpio, onoff); > > } > > Please use the raw interface here too, until we've done away with the > polarity properties and can honour the generic device tree flags. Please > make a comment about this in the commit message too. > Ok, I'll do that. > > @@ -444,61 +438,33 @@ static int arche_platform_probe(struct platform_device *pdev) > > /* setup svc reset gpio */ > > arche_pdata->is_reset_act_hi = of_property_read_bool(np, > > "svc,reset-active-high"); > > - arche_pdata->svc_reset_gpio = of_get_named_gpio(np, > > - "svc,reset-gpio", > > - 0); > > - if (!gpio_is_valid(arche_pdata->svc_reset_gpio)) { > > - dev_err(dev, "failed to get reset-gpio\n"); > > - return arche_pdata->svc_reset_gpio; > > - } > > - ret = devm_gpio_request(dev, arche_pdata->svc_reset_gpio, "svc-reset"); > > - if (ret) { > > - dev_err(dev, "failed to request svc-reset gpio:%d\n", ret); > > - return ret; > > - } > > - ret = gpio_direction_output(arche_pdata->svc_reset_gpio, > > - arche_pdata->is_reset_act_hi); > > - if (ret) { > > - dev_err(dev, "failed to set svc-reset gpio dir:%d\n", ret); > > + if (arche_pdata->is_reset_act_hi) > > + flags = GPIOD_OUT_HIGH; > > + else > > + flags = GPIOD_OUT_LOW; > > + > > + arche_pdata->svc_reset = devm_gpiod_get(dev, "svc,reset-gpio", flags); > > Again, you cannot just rename devicetree properties like this. Keep the > current names for now (and drop the -gpio suffix when requesting). > Ok, I'll so that. > Johan Regards, Nishad