Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp980778rwi; Fri, 14 Oct 2022 11:05:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5E9mvQaM6yS1zvIp4jJ2gmraPj/ATRfNizDKWV2PGC4KDNCgPL3Q0VtPoqpQTwR0xzo6O0 X-Received: by 2002:a05:6402:1393:b0:457:ea9e:ba20 with SMTP id b19-20020a056402139300b00457ea9eba20mr5360091edv.109.1665770726803; Fri, 14 Oct 2022 11:05:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665770726; cv=none; d=google.com; s=arc-20160816; b=lr6eFasmzDLWUoKXgZvgeZMWpTv54zwysShr6GLSknt48kAhMbGl975/dXxBYfi+/6 6ukHwTwIDw9oYgPmj35uB1NE/PCO+wj1AnoDlXH6XKvOPmbSB5OpxV1q1Gb1d0OrOWG8 iBW9VwdW2ANQcn5lYQkWmHJI6rkWXX2d3uZsQeBAZYVHWeUsGa63Of5oOWWMYJtIMRfO k2kLqwCK1m4ih592/jB/MLaK5Tw9uI/nIYTH5SNvgqZsash/pKX7PpqFIwH1s83DbB2c yQLld4lwZNCSKaEh91GlHOjHLLv4TTXSR5IlNoO7+n9LtDJnvFHSIciv7E4f7Cim75L4 bKDQ== 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=YV6Nxa393Zempvv48DGSX3qqsS8tBZ+cvvfhAdg2hN8=; b=Mu6lU+FT8BpHHNwe6N+lN2ZDbvYem5oJhf6bA6mTr8EuOZvOUQKVKtEQggYXetx9qV w3eXPSLZkxmPZ/h3bu11q3JEg/lVqetAyL1xc90x2TpcOjKRwd2L/5UWIiI9woeBOxD8 QX2rd1/8pU2mHsjy9b8BWbZBTqctxOTSYeEn+ozeLLrxCuP2Qod1Fjd0G2Yoyv9GIBH5 xhTqbErco6RUqI69jQUWAUt6b5gr1PpfDdE4nwbd1tqfTYz1WuvMgZN1nUR3Y5MNLvI6 HJScw1g+NPZXF//VxWgL8TWFZlLuCpjsjJ/cTyIHD0X0F0InxmxiifW/9Gz7i7HYS9Hl OFeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hwC+mpYb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt31-20020a1709072d9f00b0078d1faeb619si3750508ejc.777.2022.10.14.11.04.57; Fri, 14 Oct 2022 11:05:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hwC+mpYb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230234AbiJNRzC (ORCPT + 99 others); Fri, 14 Oct 2022 13:55:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230145AbiJNRys (ORCPT ); Fri, 14 Oct 2022 13:54:48 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 751C327143; Fri, 14 Oct 2022 10:54:45 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id 70so5563652pjo.4; Fri, 14 Oct 2022 10:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YV6Nxa393Zempvv48DGSX3qqsS8tBZ+cvvfhAdg2hN8=; b=hwC+mpYbil+uUfrrGEvi6q5Oh8PUE3JdtPxYi+K/8CTb842BUQ8RKXbwcPRmk6LcLE 06fqPcitEvEnh1os3P0z6agizAe9Deq4xAZ30T2wH647kIPkjh5I44n16FDPadB1H1rD w5MaAbTRkAi8LbHFtGq/8NUJl4plyS2YhyMaVepHko7xDpJljO6CyjzDS73F4tHyDCUL Lq6XZJGEC0IKVDNqAfBksg8iZwwj8AI4F9UehOCtO3lNFWrbxthPLbiknRH9Fq+wwsXQ QK4GxMso3gnnhY9NLG/v9bnDG+eqNEHjut2fJPEVCvczUSc/EcJsFwVGCzV8RFhgpD4e 6NCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YV6Nxa393Zempvv48DGSX3qqsS8tBZ+cvvfhAdg2hN8=; b=QzidiDYuE6LKEI2zE0VdxEZDqG0wZ5JN2kH2VDmHfo9xQZDh3n9soJhve70pp7fiKO fjPdabaKDZjoecmIsUIfe1jfRQipQdKEcc073+7kjXz7dMH8h3fAeouwKnSKNaXZrkPF 6oOdUGTMv+fhRGEih9/sAXliIzJCObZFm72VH/0Fz0MLtKg/bvJLH/bRyJJTRcalsHTt MC1fGqw262vhFjGTlnOcvzebF4hlKoE2Ufv8HbZXkRvDXhTkUxHit1oZhNMlKI8BbnVZ SC2REgRnx4prn0FDi6bRhBMSWaXizgZOBI8njtOLct16DIgLPYO8vwERMkUWmnw0HjQO p7gQ== X-Gm-Message-State: ACrzQf2EAK4tGErNKWRKAe/274uhgj2hUSvJKl0jz/zyj9ZpJ32Mmw5E CmKsajI8VpEH2hJz7SOwLZo= X-Received: by 2002:a17:902:ec81:b0:185:3cea:6326 with SMTP id x1-20020a170902ec8100b001853cea6326mr6596411plg.24.1665770084657; Fri, 14 Oct 2022 10:54:44 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:9d:2:da06:5604:594f:f6af]) by smtp.gmail.com with ESMTPSA id jj19-20020a170903049300b0017f7819732dsm2011780plb.77.2022.10.14.10.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 10:54:44 -0700 (PDT) From: Dmitry Torokhov To: Bartosz Golaszewski , Linus Walleij Cc: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Alexander Stein , linux-kernel@vger.kernel.org, Daniel Thompson , Andy Shevchenko , linux-gpio@vger.kernel.org Subject: [PATCH v2 4/9] gpiolib: of: add quirk for locating reset lines with legacy bindings Date: Fri, 14 Oct 2022 10:54:28 -0700 Message-Id: <20221011-gpiolib-quirks-v2-4-73cb7176fd94@gmail.com> X-Mailer: git-send-email 2.38.0.413.g74048e4d9e-goog In-Reply-To: <20221011-gpiolib-quirks-v2-0-73cb7176fd94@gmail.com> References: <20221011-gpiolib-quirks-v2-0-73cb7176fd94@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.11.0-dev-5166b Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some legacy mappings used "gpio[s]-reset" instead of "reset-gpios", add a quirk so that gpiod API will still work on unmodified DTSes. Reviewed-by: Daniel Thompson Signed-off-by: Dmitry Torokhov --- drivers/gpio/gpiolib-of.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 7d4bbf6484bc..2b5d1b3095c7 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -382,9 +382,18 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np, */ const char *compatible; } gpios[] = { +#if !IS_ENABLED(CONFIG_LCD_HX8357) + /* Himax LCD controllers used "gpios-reset" */ + { "reset", "gpios-reset", "himax,hx8357" }, + { "reset", "gpios-reset", "himax,hx8369" }, +#endif #if IS_ENABLED(CONFIG_MFD_ARIZONA) { "wlf,reset", NULL, NULL }, #endif +#if !IS_ENABLED(CONFIG_PCI_LANTIQ) + /* MIPS Lantiq PCI */ + { "reset", "gpios-reset", "lantiq,pci-xway" }, +#endif /* * Some regulator bindings happened before we managed to @@ -399,6 +408,13 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np, { "wlf,ldo2ena", NULL, NULL }, /* WM8994 */ #endif +#if IS_ENABLED(CONFIG_SND_SOC_TLV320AIC3X) + { "reset", "gpio-reset", "ti,tlv320aic3x" }, + { "reset", "gpio-reset", "ti,tlv320aic33" }, + { "reset", "gpio-reset", "ti,tlv320aic3007" }, + { "reset", "gpio-reset", "ti,tlv320aic3104" }, + { "reset", "gpio-reset", "ti,tlv320aic3106" }, +#endif #if IS_ENABLED(CONFIG_SPI_GPIO) /* * The SPI GPIO bindings happened before we managed to -- b4 0.11.0-dev-5166b