From patchwork Fri Oct 14 17:54:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 2771 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp308247wrs; Fri, 14 Oct 2022 10:55:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7fE8ibPy/vJkQymbY+gLuaS20IEjvBbwq7xqUdOx0S0AqPFUOZO17BJBXqvg8gaLpCkhCW X-Received: by 2002:a17:907:2e19:b0:78e:11cc:3bc5 with SMTP id ig25-20020a1709072e1900b0078e11cc3bc5mr4396577ejc.543.1665770157774; Fri, 14 Oct 2022 10:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665770157; cv=none; d=google.com; s=arc-20160816; b=iHTF7NkLXZ0xbxDbe3JFfQvuWIwywTvFVCtm5aogcgkr9sJqaQZWej+NXZsoqXUKoo GmgXn5nC05qjQAJytzYgsCPm+FH7CQrOr91d78Ua5q4dJmziwzj8NLVDHw+D3tMM/SCN zEml6qeiJUVzZWyry+ASx4+kjK76pl5LmFlu5hGkaLlr4C3psZuHbPrNbVst2QSQcUnD 2khYAC5+EeTkIAEBNpakFRoooGuZkClV9Q2Y/M9Qzg4pCXDjZgaHVLkkTrVYQioshFX8 SNUYfCtuATiTyC/hxjM6Tp+PDY3V+u9FNWuIzYnI0G+RL6GkXbzdHTxER6WZnD10tJfo 69aA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c14-20020a05640227ce00b004462de364fesi3265716ede.597.2022.10.14.10.55.32; Fri, 14 Oct 2022 10:55:57 -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 X-Mailer: b4 0.11.0-dev-5166b 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746686609114962308?= X-GMAIL-MSGID: =?utf-8?q?1746686609114962308?= 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