Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp646568imu; Wed, 9 Jan 2019 04:07:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN6w2i3dv57Hr/tq42r9QQi06ROch3qw6dRqjBD5fC8vJne08tLkohoy1uTYRfUnIoriSBKJ X-Received: by 2002:a63:a35c:: with SMTP id v28mr5120714pgn.205.1547035677051; Wed, 09 Jan 2019 04:07:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547035677; cv=none; d=google.com; s=arc-20160816; b=zRwBB7Ffw3///DY2jY0+7H8ViNH9t6SSJIo+yLwn01ZFkJK5Cf9mnH9E5ieNcI/0aR wu6YN9pxNTEM080Ux4wzEGdHU6BVFQx7/nqbD/9XwJLxJCz6+v+EWukRX9oeWlc6dlOL 32q1+N6a0gxBUAae1ZPJlxg+YPnAll57weCvQq2Kt/PoSbYv3uspk5YS0M6LCLy+30Pl 7P9qvOsjudHaitVC+Rj9SqzR1cdXEQ6n5rDBRpqqNh4jA3/zPW0DAqQasTY6E/evN4LV shRVOkieQGIkEG3fCZ+z4zmum73xtiUSYq5gwP7oDsXw1NWmurA59q2g1cMhlafpDG14 Ux/Q== 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=3nxf9UbXLxcCq3x5mDmsxrZpp0H+NRkYgjJLa3+h11E=; b=P1SjespcfyFqlAwpRh8LuxWWTbxGt5GGFQKd1oxfUPtYX2rHC06lYuHCohExmAXTpJ nMJgNrBzAalbw6SMgE9bZkYo4oWUmZwApUiLzbA0kU/MabYOV2pAINipcy6HfHSfRqdC r5bZIBHkQnfi/oQoAZ84xccJPdYTjch+TbMdRqp1pmmd+XCaHMZHOv3qOASHfZt3ELf2 hu6w74IjEuyr/+d8eR8okXt28s4RtkrGe46RGhR+q/FDL6X4greE1Uyob4HuU0tdypOx G1+3HWvu86ofKuGpMZINzoo0fEmPIgucpWlLsvgBzJ+Xa3+gvn2xAXowyzKkXPtiLjkK zvMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=m1wZN7e6; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b14si2867839pfc.156.2019.01.09.04.07.40; Wed, 09 Jan 2019 04:07:57 -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=fail header.i=@gmail.com header.s=20161025 header.b=m1wZN7e6; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730859AbfAILfr (ORCPT + 99 others); Wed, 9 Jan 2019 06:35:47 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:33963 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730633AbfAILfr (ORCPT ); Wed, 9 Jan 2019 06:35:47 -0500 Received: by mail-lj1-f193.google.com with SMTP id u89-v6so6208710lje.1 for ; Wed, 09 Jan 2019 03:35:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3nxf9UbXLxcCq3x5mDmsxrZpp0H+NRkYgjJLa3+h11E=; b=m1wZN7e650Er+vb6ab6vnpGTjElhGeQXos5SyPzEXP332wznyRNUwmkR3oLiJ4CosI d2ruodGEJ9evV2GZh73CFY8mNuJ4GbeTOoa3WZZsVJaf5C8MPB85BoX8DiPVOsjF3G0x LDO1HWpIDY4jm+o8SlIEr45v1fQ7zbFvKXoZCgmdRJDDD39GhKCR5o5ix0OM+sznw7XY HTHW7Q+oiOFtTnqVldvopghQisGmjW+w1tUWT6/I99B2w8NLroCCi9RxAeEClvikhoTH u3+9yeqSd8K9uTFJXQIqbjGRoNm37dGWDlD4vatgu3nj+x55eFT/h7abGLUQuPPj8P44 sUEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=3nxf9UbXLxcCq3x5mDmsxrZpp0H+NRkYgjJLa3+h11E=; b=EOFTFm8jUnK6g3Eay+5DUNIKrz7VqGfifnnEOrgERp9ucJUoU9SXLpE0oocZqJHtPJ /SGQ1O027abETjDu4vc3dPua0/NTAqQL0PHRPUmlVsZZUIiqLwt1lo1sQKGulUeW5iiL 8h+O3SWwZfnuL7z0wOMj+Ok6iBp0ak2uXOcwYrYa3ER2dRr9mtLwB0oOmkB9zV7hS2WO t2YSaGoKBOYKS9wsBC9icYgO0F5Y/noiRFUG9LvlQGQzKFnFlEpG4wpH5uMndRUOu4+C 0N5qNg7dk9UYIvReJZfhhrKwv747DpU77PgRXAkvsxE0zVSn7+7YryQZs58neYuYMAOY IHzw== X-Gm-Message-State: AJcUukfNJNQaxnGJToHpsTV0SbjNb8SMGDBjkibkaFd4ITEzTOap/xGj Y/sbRhxWFLTmU4IgJHU6hTI= X-Received: by 2002:a2e:710a:: with SMTP id m10-v6mr3211943ljc.66.1547033744081; Wed, 09 Jan 2019 03:35:44 -0800 (PST) Received: from xi.terra (c-74bee655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.190.116]) by smtp.gmail.com with ESMTPSA id d23sm13759603lfc.11.2019.01.09.03.35.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 03:35:43 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.91) (envelope-from ) id 1ghC9D-0008Pi-Mg; Wed, 09 Jan 2019 12:35:47 +0100 Date: Wed, 9 Jan 2019 12:35:47 +0100 From: Johan Hovold To: Nishad Kamdar 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 Subject: Re: [PATCH v4 4/4] staging: greybus: arche-platform: Switch to the gpio descriptor interface Message-ID: <20190109113547.GL14782@localhost> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > @@ -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). Johan