Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp378855lqp; Tue, 11 Jun 2024 07:15:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUy4fauwoynESrST27l6C2owQm7ciwrOQeeRQcjSFD5ONY0A9/oTsV9hQ66BxLNBPKTj4nFKD9mqa3Rd/1krs7y+clk839NjtIA+WvRzg== X-Google-Smtp-Source: AGHT+IErbkKfdOt1fRQJAvHhNwK1N+vxkhoEUu7kt3SzUDn3Lyb9vvRlnK2gkmOeYOec6JVc/3/E X-Received: by 2002:a05:620a:44d0:b0:797:9a2c:7301 with SMTP id af79cd13be357-797c2d5750dmr486592385a.6.1718115327964; Tue, 11 Jun 2024 07:15:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718115327; cv=pass; d=google.com; s=arc-20160816; b=iGlPxu4jIH1zqdz3B2Hg7Z5dvhe00ifU3FYgrLQjImZmCa+tAlf9EmOEhNZQmOfIiK 6NfUjBCls438XUhban8w8WxjXi09KMfqDlnpBV3bEcso454oFIHcLok4UdN5xRAcrUzK f3PentNC14ZJzuzGvv4TsoyVBaZIx/xELWo26cvy2loqBR8UG31mJjAfoZ7IXliwNK9R l2H4S0ksSz4LYFWkI4RHp8w5wHyg7pfoB4VjVoNgtm99m76C+Yb/FkYP9Qq8hvLH+tLH /XwCQZ3JIxb6e3i+wKURdKKgkgDAcl2kAI3onz6YtaVKhlfGKPmSkcC9t3tT4z12xTMR 2DKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=k6oPaNlUIoGC3C+SgZHjtI7EKUDGJW/SHZJ27VP7F8s=; fh=kW5SNnH4tk4ypXBqiyTcZ8xc8QvAGk2EYkPR69xvnNc=; b=wjKAJiuhDbkg1L5MtBu097Z7580X3hjo3YHNnj00I0PHqPQjaVnST+Fqb5xF78Jehw OyvPfxv3fRUJr/VyTnOnwwuRCUZnkTfYkPeTufOL6vlc68EoyQrYgkg667FitZranyPE qpXUsUVpdYAyxVQQ+Djf8d6RkQBKw4sn2i5K6iYstHkvfQGkLna9sDuMOGmNZIuVDNCF gFEmt71y28aFpmODwa3Vll+1jWWgWpaVUzYWqI3BLqPxYQmjljTklCbFCkuIybBcK+yT s5lls64GSo/DZl7O24uO7yKSFTZMeniCtkpynT5INXkDHWJyEw/vu18oAAluxKH5is/h 9nmA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=alpha.franken.de); spf=pass (google.com: domain of linux-kernel+bounces-210048-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210048-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-4411006aef7si34912901cf.689.2024.06.11.07.15.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 07:15:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210048-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=alpha.franken.de); spf=pass (google.com: domain of linux-kernel+bounces-210048-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210048-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BDFF81C2329A for ; Tue, 11 Jun 2024 14:15:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6A3C172BB2; Tue, 11 Jun 2024 14:15:03 +0000 (UTC) Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3264C17D8A1; Tue, 11 Jun 2024 14:15:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.175.24.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718115303; cv=none; b=OEpz4o94Fr7GC7fCq0Gv4y0cYmkq8EpHddjTsr55wiUPFoedYWe01MCa8Q+SG149iYlIkvhK0avEzpJcjp1EQTO/bFmNn5onkKd1MWH5Jon0t5Q9lj9RuUbTjoNB/WFf6El0T1D18ttrew+mV0UkwMNobaSEc7JR3EFKw5KJjHM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718115303; c=relaxed/simple; bh=S7HvbhMJrqKrjrCA9+q8Ja1NL2gugbk9fO8O7O/IQB4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LIBgf0RLeaG9KvVfeNTxX3WkwrssB64a+ElXDW/FmMwu13+Nm23NeP89FvhRupkuWf0pd3XXQCf9ohuVl3OdWpTlVCDWucLOlzSLCFa+PfMGjWJB3XP7DeiLG8s1ZmbRZJTJBjKfDdMa2Etw28TsYLtMTxGQqao/0oF+BvfVbO8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de; spf=pass smtp.mailfrom=alpha.franken.de; arc=none smtp.client-ip=193.175.24.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alpha.franken.de Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1sH2Gu-00034G-00; Tue, 11 Jun 2024 16:14:48 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id DBE9AC0120; Tue, 11 Jun 2024 16:12:18 +0200 (CEST) Date: Tue, 11 Jun 2024 16:12:18 +0200 From: Thomas Bogendoerfer To: Martin Schiller Cc: hauke@hauke-m.de, dmitry.torokhov@gmail.com, rdunlap@infradead.org, robh@kernel.org, bhelgaas@google.com, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] MIPS: pci: lantiq: restore reset gpio polarity Message-ID: References: <20240607090400.1816612-1-ms@dev.tdt.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240607090400.1816612-1-ms@dev.tdt.de> On Fri, Jun 07, 2024 at 11:04:00AM +0200, Martin Schiller wrote: > Commit 90c2d2eb7ab5 ("MIPS: pci: lantiq: switch to using gpiod API") not > only switched to the gpiod API, but also inverted / changed the polarity > of the GPIO. > > According to the PCI specification, the RST# pin is an active-low > signal. However, most of the device trees that have been widely used for > a long time (mainly in the openWrt project) define this GPIO as > active-high and the old driver code inverted the signal internally. > > Apparently there are actually boards where the reset gpio must be > operated inverted. For this reason, we cannot use the GPIOD_OUT_LOW/HIGH > flag for initialization. Instead, we must explicitly set the gpio to > value 1 in order to take into account any "GPIO_ACTIVE_LOW" flag that > may have been set. > > In order to remain compatible with all these existing device trees, we > should therefore keep the logic as it was before the commit. > > Fixes: 90c2d2eb7ab5 ("MIPS: pci: lantiq: switch to using gpiod API") > Cc: stable@vger.kernel.org > Signed-off-by: Martin Schiller > --- > arch/mips/pci/pci-lantiq.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) applied to mips-fixes Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]