Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4199394imu; Mon, 12 Nov 2018 07:19:13 -0800 (PST) X-Google-Smtp-Source: AJdET5eM+r428xAQkWf9ZVVIiW4Chziot1DSP/3T9uFk+k4Qgjke3gP8dIqL6U/cTVavA0abLwSS X-Received: by 2002:a63:f201:: with SMTP id v1mr1110755pgh.232.1542035953764; Mon, 12 Nov 2018 07:19:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542035953; cv=none; d=google.com; s=arc-20160816; b=zSLiyqGZlJgFcAwfKZZCT3HQsJ3hHa5wmS/dmvlOw2AuE1e9ieLFzVBGMSmvJ1XQgi F/lJc/nB2qTIF9Jn+ZAvtQFUeuKIuwqgO+qSJYEqPxi1cono3n3vhbNCK6gfuuQH0cWZ 92aRLqpVVBSOI2+xWo/SWMZcYFR0JdCwLZa3Xq+THWUcYcR1+K+uKeTi328SNVZf33zg Rc5kNtvKpdiie+jo95o08KvYKiqIZztnMBGccDsIQVOnQuhFeZGzh7JDkshqRP/GFRkY FLzbfoEb2Vkv6omhtk6WFU4XdV84WB7iZVyLaiHUGwtvhCj/AoxleqtKlzwQrlxnPl9n 5JLA== 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=yJzZzu4l/GzcmzzhCEPtk7cQimxwv9IYN7JlcYNfDqE=; b=Sr8Grsk0FcRmyVDeZBU9GDtqzR2a5aOM8x2TrmM6jQmLuGgRAR9/GZTdVfp9hiAgCq gXw/TnmyjjHTAky7Uoo92pz6g7h2IkYDqHh26U+DR/FEhZTy8kAuvgLKbjBGAwG7uS6j 22WgSoeUjpP0WN4NbvhG+CNQnwoyOPt/jTyDhhLiyLV2CGACeKJjQsIYHIhCkCd1JfTH I3PiOfKAN1rEqPGUOxvKn3sjjPOsfQlF1ucYEnacRfHQk4Mm30dxUbCO+NeFGsraIky1 L1mUn4TIy8gvzxeLXiO49GhBMHxbZtR3CiXoB4sYSxGYHb3grPy6m3JffyY0rRWceUUh 2/yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=dAjNUMGA; 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 b9-v6si15906344pgq.589.2018.11.12.07.18.48; Mon, 12 Nov 2018 07:19:13 -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=dAjNUMGA; 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 S1729380AbeKMBL2 (ORCPT + 99 others); Mon, 12 Nov 2018 20:11:28 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:38847 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726385AbeKMBL2 (ORCPT ); Mon, 12 Nov 2018 20:11:28 -0500 Received: by mail-lf1-f65.google.com with SMTP id p86so6437762lfg.5 for ; Mon, 12 Nov 2018 07:17:46 -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=yJzZzu4l/GzcmzzhCEPtk7cQimxwv9IYN7JlcYNfDqE=; b=dAjNUMGALkaPm2M7j6Tz5pOwFLqbvBN3sckwW/6Hj/9dE0QRv2oyla6EapAD8kHn2a KalIuE+V3nq+OKG4xTIuswMcWk2XbpYe8WX2uyUEePVcMsVbbSyuTRmGsy05o0kzQUn3 kKBkpCg36DCC0oHMLzBfGaU5RRlksqGoIhmlryQVg8WqTq7IEonaSbtMRjM/99jKNa8i PDgwbiWoG+DJmtwgSidBGjMvsskt5CvV9KAOjMtXgi5v4Df+apozNf109SD/jeDIDXXT 1McWokzwTcYGYyECh4fd+rpIClcMapdkmTLHE4MpuUO5qwdHzFYtpEGAhhohQB9cyAFL w4CQ== 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=yJzZzu4l/GzcmzzhCEPtk7cQimxwv9IYN7JlcYNfDqE=; b=ZruCjShw0+eYvkH5kAfs+zmrd1vmUpzeaWS+4gpouSDfmBNRFpNUxzoO7N3XqahVMm R/dyD4oRHooJjAegfAXNonN3vrh/4BeWeYime7UvtSBd6mp7hLZhJ519gD3qSn29F8DA Gx3LQwvJRjM+2pguhgSmycBF7yk5PU9eaV6aPpCX7bOb8JwdCc0HTDPllyAA1bNp2VP4 HCfbtiycy8ZiG8QsnAUqAbmjkAmZX5BOx7jv71SDdJ18NqPj6fSTvYDZBg1CEB135X4P PLC1s0mUPAzjAprcux64KnS1Tcm5HQqP+uZLGJiWzYcxzCLNWBTD19fncWRlrq8t/1p+ p/Vw== X-Gm-Message-State: AGRZ1gKhtuPsGGa1THXxYekyNm8lbQpQs+34I12JXQmi4vn+ZovCodNs Zku05tp7TItgvYpOYG2SpBk= X-Received: by 2002:a19:c954:: with SMTP id z81mr849436lff.150.1542035865866; Mon, 12 Nov 2018 07:17:45 -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 b69sm3088299lfl.28.2018.11.12.07.17.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 07:17:43 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.91) (envelope-from ) id 1gMDy7-00034i-Op; Mon, 12 Nov 2018 16:17:39 +0100 Date: Mon, 12 Nov 2018 16:17:39 +0100 From: Johan Hovold To: Nishad Kamdar Cc: Vaibhav Hiremath , Johan Hovold , Alex Elder , Greg Kroah-Hartman , greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: greybus: arche-apb-ctrl.c: Switch to the gpio descriptor interface Message-ID: <20181112151739.GI13311@localhost> References: <20181111054405.GA32548@nishad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181111054405.GA32548@nishad> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 11, 2018 at 11:14:14AM +0530, Nishad Kamdar wrote: > Use the gpiod interface instead of the deprecated old non-descriptor > interface. > > Signed-off-by: Nishad Kamdar > --- > drivers/staging/greybus/arche-apb-ctrl.c | 158 ++++++++++------------- > 1 file changed, 65 insertions(+), 93 deletions(-) > - apb->pwrdn_gpio = of_get_named_gpio(np, "pwr-down-gpios", 0); > - if (apb->pwrdn_gpio < 0) > - dev_warn(dev, "failed to get power down gpio\n"); > + apb->pwrdn = devm_gpiod_get(dev, "gb,pwr-down-gpios", GPIOD_OUT_LOW); > + if (IF_ERR(apb->pwrdn)) { Looks like you didn't even compile test this one. :( > + ret = PTR_ERR(apb->pwrdn); > + dev_warn(dev, "Failed requesting power down GPIO: %d\n", ret); > + return ret; > + } Johan