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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 5BAAAC49EA4 for ; Wed, 23 Jun 2021 14:21:18 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8AEAF610C7 for ; Wed, 23 Jun 2021 14:21:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8AEAF610C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F345382B36; Wed, 23 Jun 2021 16:21:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="Bf7+wHly"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7BFC782B36; Wed, 23 Jun 2021 16:21:03 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DE485829C3 for ; Wed, 23 Jun 2021 16:20:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Eugen.Hristev@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1624458060; x=1655994060; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=qskgf8Chx1XWuGDBkog+AZAr7gya3eYvnKXmCOqlYIY=; b=Bf7+wHlySgKT8j+KN+zm7gOrLazwSN4oOXD3WRzMkMeQU/tz0BJruJc+ oAuDWFMlep9IRyElCzFdyw3s/gCS/yXYlQI7MRykUDjs8z3kQYBL6HvcC HWWxCkMmtbilyZxTMD4m/GuqHmFRzpSbyIwWQzclzB+z7GIb9DyMLacI3 B/OAUyUsFnuLLBR6YQ+JfKK3PYEG5HgHsXnt9oAbim/An+ZByzmrUgYTB NZkKcLUVMkdic7IoQM7OwwCzdg3H1KTSAOBZplaI2aLnG5l8Bk0Bq5OM6 M9AQbac1ULSQwGzML4zbI0JJbDusqzNOnKBbe108dYBy1hnZ4zjHPDIv6 w==; IronPort-SDR: kcIIumXSZa3X9sF0UCPfDklQK4/6KOsOnFUbCSp6+aX1URzhVy3I9Q7mF0iybbVY7ChmhLrf7A NPpcfL9EtdgZqKWDhxeVVMFotrHtYRCc9t/HjTvJWqB53ZK927PucEwdop7P9gs1uOU8dUe4Xo RNYpj+TxiDLlAxNNVeYpPtS/M2fv6boRuh6k0t8NaR8ACJwf+ulETbtuL/YOPCnFG8sH5h6DwB 5NNZUuNPG4AXM1/lFSlSDwiS1lTGWimecD8Tuu7PYIds2ZRaQgGCW6YodpfuYmTSCb0m4SU6hi d2U= X-IronPort-AV: E=Sophos;i="5.83,294,1616482800"; d="scan'208";a="125793753" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 23 Jun 2021 07:20:58 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 23 Jun 2021 07:20:51 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Wed, 23 Jun 2021 07:20:49 -0700 From: Eugen Hristev To: CC: Eugen Hristev Subject: [PATCH 1/2] w1: w1-gpio: claim the gpio with correct initial flag Date: Wed, 23 Jun 2021 17:20:16 +0300 Message-ID: <20210623142017.634100-1-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean gpio_request_by_name should be called with proper flags. The 0 value flag is invalid, and causes bad initialization of the gpio. Signed-off-by: Eugen Hristev --- drivers/w1/w1-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/w1/w1-gpio.c b/drivers/w1/w1-gpio.c index 3b0ead6f6d..9346f810ce 100644 --- a/drivers/w1/w1-gpio.c +++ b/drivers/w1/w1-gpio.c @@ -156,7 +156,7 @@ static int w1_gpio_of_to_plat(struct udevice *dev) struct w1_gpio_pdata *pdata = dev_get_plat(dev); int ret; - ret = gpio_request_by_name(dev, "gpios", 0, &pdata->gpio, 0); + ret = gpio_request_by_name(dev, "gpios", 0, &pdata->gpio, GPIOD_IS_IN); if (ret < 0) printf("Error claiming GPIO %d\n", ret); -- 2.25.1