From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH 1/6] gpio: Set proper argument value to set_config Date: Wed, 3 Apr 2019 23:41:02 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Maxime Ripard Cc: Bartosz Golaszewski , Chen-Yu Tsai , Thomas Petazzoni , Linux ARM , "open list:GPIO SUBSYSTEM" List-Id: linux-gpio@vger.kernel.org On Fri, Mar 15, 2019 at 2:33 AM Maxime Ripard wrote: > The gpio_set_config function creates a pinconf configuration for a given > pinc_config_param. > > However, it always uses an arg of 0, which might not be a valid argument > for a given param. A good example of that would be the bias parameters, > where 0 means that the pull up or down resistor is null, and the pin is > directly connected to VCC/GND. > > The framework uses in some other places the value 1 as a default argument > to enable the pull resistor, so let's use the same one here. > > Signed-off-by: Maxime Ripard Patch applied to the GPIO tree, I suppose I can merge it there orthogonally to the other patches (the result will be fine). Yours, Linus Walleij 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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED 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 48785C4360F for ; Wed, 3 Apr 2019 16:41:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 163C620700 for ; Wed, 3 Apr 2019 16:41:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="p7CM1oGc"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VSFGMMxn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 163C620700 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qZ+aQYO6Ch+z9ebfzP6U9cmZuvHxO0KswsSHAX653lc=; b=p7CM1oGcK7k5jy j+utzM9lO0PFNwXG8DDx1YHqDEGNUoAOg7Ar4gbCIhjyt9iDqRuOkF+C9Gv48rNVjOq+dacHDLT+h Lxg4zHWOrrRYL1yH32epzqsPrkUiIk45N+aYt781VhR+aOFfF9SlbT2LS02AuUX7DQi57BSBJESeD RzIBvoZQHHFzJq2yYyUbtynfKgq/uRlEmYAQznb3p0+VF0C8l7/7No35H74ictJ1TwHDHEn+1YoNL 2Zoanc7qXhlPyNlGvQgF43qR2QdGekT/h8bMCotjtHm/pb4ao1Ptdc7UcIQI2OhA6sGrKbHGF6uDs yp5JP9esRA3WpOR9PAEg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBiwy-0001OF-VH; Wed, 03 Apr 2019 16:41:20 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBiwv-0001Nw-LZ for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2019 16:41:19 +0000 Received: by mail-lj1-x242.google.com with SMTP id l7so15476188ljg.6 for ; Wed, 03 Apr 2019 09:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eFrMhuFuIscsR+RoO+n5iYRwd7+rKSumXtdl9Ejdr3s=; b=VSFGMMxn1I/S4z8TvkVFHCBRHNBb3sEGrxGrS8s5FNgq8Kt31YWW55rHIH+pSNExzj WrX2HLBPzHxeDQG/IR0SCCDk5/2SX3NQUN94RfS+roPZJWeo2CX1ypIe9tJXjzR1h2H8 MWlCkfHkCZfKEWlz9cKNMENTjHTH1rrBlqFFAQxRd6Ve3aguQsEA3oh5sIQvm3ybZ/zc JLPi1B4V/wobHsBKw3nwjW+p4oDYaYAPu44JpNERSbFzw/I1Ihcl0o8PP1vxP1+k1SyP JLtgPWJ5SItf+3bC65SG0ggo3WBINje4G4dt0ckzXb5To2nonNroIQEeIXhOwVEAs9zS ls+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eFrMhuFuIscsR+RoO+n5iYRwd7+rKSumXtdl9Ejdr3s=; b=Ff4J5ZUUuLnHhTr93AuC5i90FLQCTid+B0IzsLjSAKcdM367ngT/U5WzoZoEMPEedi x/hjUhLCVCOYHuqiQW0LzK7gVpelZaEXPFnXSxxg5yY9zUFeGDS0x7XwgWHy+eA2JEEO 0ZwnfgZYYkbcXV01r7vEBLoabhQPR8bF8g0ESCj6o+UzXnKN+ew0Lyy9NA110z2Oa6b0 4mn96RwYRs5SJlWDCHVRRdyvdihtqf42KJVHl36MiqhTO/7vG/j/UWDzNd3lZfTbd4S6 /Jo+cobQK2EreyLSFLQ0jonqwzhNRchy0ejhchabjQOekdQFhA0C5hAWVN78PqtoLSjl bAVg== X-Gm-Message-State: APjAAAUyL12u0GIe4FRt/vg9m6VUy3mb0gUc67Q2vpJTwhGYjkmrkPaJ Bo10A/ABoR6gwIXNMYzQzN9s4oLqpgwQcq0AyabGow== X-Google-Smtp-Source: APXvYqwlcjXdoXKYWhY8ncHHmr5GDOy2i536exX3WnQF7+6HL3P1kiu45pB6MK0Sw68VproMInr3NM/4KF1b3jaLMVI= X-Received: by 2002:a2e:5d56:: with SMTP id r83mr453021ljb.74.1554309674288; Wed, 03 Apr 2019 09:41:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Walleij Date: Wed, 3 Apr 2019 23:41:02 +0700 Message-ID: Subject: Re: [PATCH 1/6] gpio: Set proper argument value to set_config To: Maxime Ripard X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190403_094117_711959_0901F4ED X-CRM114-Status: GOOD ( 14.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , Chen-Yu Tsai , Thomas Petazzoni , Linux ARM , "open list:GPIO SUBSYSTEM" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Mar 15, 2019 at 2:33 AM Maxime Ripard wrote: > The gpio_set_config function creates a pinconf configuration for a given > pinc_config_param. > > However, it always uses an arg of 0, which might not be a valid argument > for a given param. A good example of that would be the bias parameters, > where 0 means that the pull up or down resistor is null, and the pin is > directly connected to VCC/GND. > > The framework uses in some other places the value 1 as a default argument > to enable the pull resistor, so let's use the same one here. > > Signed-off-by: Maxime Ripard Patch applied to the GPIO tree, I suppose I can merge it there orthogonally to the other patches (the result will be fine). Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel