From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A217C4CECE for ; Mon, 14 Oct 2019 23:35:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57BA921835 for ; Mon, 14 Oct 2019 23:35:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571096151; bh=9x7QTlJvEdWt7hKLckN4uAgui8PzFSsEoVxTdJGTrUw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=ojLUff2KEEeqoT9BrQAnNmYswL1zijMyYP/+SED3ZmMYJLAqLlpJoThpmml/8ue7m 5OVhsBTooTc20RSTlfsHT6pF55bhbLrEbu5hzmmgeZInWyHmmMhSPpbuCjHLIHqzR5 LZsyNDg343GXQADtSfj1m06QKN9/Fn9RzSjUxuFs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726561AbfJNXfu (ORCPT ); Mon, 14 Oct 2019 19:35:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:57416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726300AbfJNXfu (ORCPT ); Mon, 14 Oct 2019 19:35:50 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2D83B217D9; Mon, 14 Oct 2019 23:35:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571096149; bh=9x7QTlJvEdWt7hKLckN4uAgui8PzFSsEoVxTdJGTrUw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VF9S5o431W4XboLdHnMMYjG8rvkeDw+upKBFATqEIzFMIQe0nbSUlN2ewdcxV3YqZ KEwBmGSXv9hBDAfNexU3VbenOTH4DO+fSoBWte0TsuXYIr4FC9va8hgRLM/j/XEfsf vXwEIJBrnzqTLGArScb3aOH3LuWUwbaC58K3eeVs= Date: Mon, 14 Oct 2019 19:35:48 -0400 From: Sasha Levin To: Bartosz Golaszewski Cc: Linus Walleij , Greg Kroah-Hartman , linux-gpio@vger.kernel.org, stable@vger.kernel.org, Marco Felsch , Bartosz Golaszewski Subject: Re: [PATCH v5.3] gpio: fix getting nonexclusive gpiods from DT Message-ID: <20191014233548.GD31224@sasha-vm> References: <20191014155341.13145-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191014155341.13145-1-brgl@bgdev.pl> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Mon, Oct 14, 2019 at 05:53:41PM +0200, Bartosz Golaszewski wrote: >From: Marco Felsch > >Since commit ec757001c818 ("gpio: Enable nonexclusive gpiods from DT >nodes") we are able to get GPIOD_FLAGS_BIT_NONEXCLUSIVE marked gpios. >Currently the gpiolib uses the wrong flags variable for the check. We >need to check the gpiod_flags instead of the of_gpio_flags else we >return -EBUSY for GPIOD_FLAGS_BIT_NONEXCLUSIVE marked and requested >gpiod's. > >Fixes: ec757001c818 gpio: Enable nonexclusive gpiods from DT nodes >Cc: stable@vger.kernel.org >Signed-off-by: Marco Felsch >[Bartosz: the function was moved to gpiolib-of.c so updated the patch] >Signed-off-by: Bartosz Golaszewski >[Bartosz: backported to v5.3.y] >Signed-off-by: Bartosz Golaszewski Queued this one for 5.3, thanks! -- Thanks, Sasha