Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1742376pxb; Sat, 23 Jan 2021 04:19:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcW4zfOwW1kTy9fsters/qkbyIdTgRJ8cUDaxfhaGc0I3xVZ4KQy4pUXCdzkeEb4gOQMKT X-Received: by 2002:a17:906:4690:: with SMTP id a16mr6014595ejr.442.1611404394553; Sat, 23 Jan 2021 04:19:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611404394; cv=none; d=google.com; s=arc-20160816; b=ktY5jy6E0z3NPVDn7ufQezHVQ5l2tppfcBdEA1e2LmVgrW8UvICr5oeFZH23/lkBjP k+Sg4AIXVs7lSmna1dVGFKePiiXQKT5iQIyUgsPP0+1cjitB11xNKLV7iNwxKlcoyiTn 25k2Ilvvi/B/Gf6j/+6wK4T9U+3tWtCxcjhbY8WKjUOOr3MD+QQ43FBCSxE8t947SqPj yw93slzQWs6C0o1APiqtHTPXiGnsaTkNMLEASKkAK4F3TawXF8rMFDI2DmXBVm9dXky7 LxzOrhC6cH0iTj3jZgg4qRDmLwM/ZYIgG4Z2C6BUTj135IEbso3sO0qr/GB34urQ9ghY DacQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XSSv/cvHQku1Gh6c6/+OkvTHC43scQr7nzlxM4hYCrU=; b=KAv4mPehnrJkqxKdCkndOEJaYWpDiC0DhpmVL/3Z9uip5oPKUnaj8jiWKOtealPQFU EOmCqP4TQpeTgaa1HgqQ9pk5G6izvA4hS9bXByh7PAv2YbStozH7F7o8IyQzHhDHeNwU XhzNRPrz3NeVZPqR3j07yu513k+g0a2zP22XDi3R49mO+XKgXEfmrWVdmLpVFEaLRe05 3+hSLWos6eX7CXfw5V/5WscvhJwVPXuAWEN/CpE6I/xS2REC2WI5G5lj+Z5nFoc+l0ey h0ZNgEh4/OU/otnE2utQfu8AN0SfTM3n20Q3z9S4r2KPePNkGHoLViiGLfmXxrw7BNTL J0fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cwmA8MNu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si4875227edr.34.2021.01.23.04.19.31; Sat, 23 Jan 2021 04:19:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cwmA8MNu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726958AbhAWMP4 (ORCPT + 99 others); Sat, 23 Jan 2021 07:15:56 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:42524 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbhAWMO5 (ORCPT ); Sat, 23 Jan 2021 07:14:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611404010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XSSv/cvHQku1Gh6c6/+OkvTHC43scQr7nzlxM4hYCrU=; b=cwmA8MNuLsqXbvSkIFMXzP8sdzVG6vtbZwtk/8nKI+pd+dpb47raGFZ9E7ONq/tcRl5jG4 vRwH2C7MpiRJ5+3p6JK6mlje5/mXa/Z8Cqr+LV1cpvkKtg/s7r9r7ygXnhx9bCZmvBm36N GaNImj6NQrEAUrqXy+5NhCoxXQPB/wE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-226-gxjqmD-IPy-0_ByU3AT-tg-1; Sat, 23 Jan 2021 07:13:28 -0500 X-MC-Unique: gxjqmD-IPy-0_ByU3AT-tg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1255A806661; Sat, 23 Jan 2021 12:13:27 +0000 (UTC) Received: from x1.localdomain (ovpn-112-82.ams2.redhat.com [10.36.112.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB981189B8; Sat, 23 Jan 2021 12:13:24 +0000 (UTC) From: Hans de Goede To: Lee Jones , Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Jie Yang , Mark Brown Cc: Hans de Goede , patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Andy Shevchenko , Charles Keepax , alsa-devel@alsa-project.org Subject: [PATCH v4 04/13] extcon: arizona: Fix flags parameter to the gpiod_get("wlf,micd-pol") call Date: Sat, 23 Jan 2021 13:13:04 +0100 Message-Id: <20210123121313.79530-5-hdegoede@redhat.com> In-Reply-To: <20210123121313.79530-1-hdegoede@redhat.com> References: <20210123121313.79530-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The initial value of the GPIO should match the info->micd_modes[0].gpio value. arizona_extcon_probe() already stores the necessary flag in a mode variable, but instead of passing mode as flags to the gpiod_get() it was using a hardcoded GPIOD_OUT_LOW. Reviewed-by: Andy Shevchenko Acked-by: Charles Keepax Signed-off-by: Hans de Goede --- drivers/extcon/extcon-arizona.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 76aacbac5869..72d23b15108c 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -1510,7 +1510,7 @@ static int arizona_extcon_probe(struct platform_device *pdev) */ info->micd_pol_gpio = gpiod_get_optional(arizona->dev, "wlf,micd-pol", - GPIOD_OUT_LOW); + mode); if (IS_ERR(info->micd_pol_gpio)) { ret = PTR_ERR(info->micd_pol_gpio); dev_err(arizona->dev, -- 2.29.2