Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp815061rdg; Wed, 11 Oct 2023 06:25:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHotzxAMVo7hzNN0SaoK+QNo1tDOxdjTexvUPkyBoo2ALJ7ce0BnzeznUOerOCCz3ntfVUC X-Received: by 2002:a17:902:8694:b0:1c9:c968:4ce with SMTP id g20-20020a170902869400b001c9c96804cemr1996564plo.33.1697030705892; Wed, 11 Oct 2023 06:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697030705; cv=none; d=google.com; s=arc-20160816; b=JXFBLrtf/mMLdXNRfBZarLD1l42QTgI+0HK4tbYsylpPa308TlOTYXsdV2jCCyp6ew 0j2OPJ3aXdKFQapG+I1ZfNPosI8XOniZDu4mwhFLMpVFBNk8s+hELsVFQHYDYp9F9OSu 0xUbRpbWEqBX10xwi7d7qHgqnXGHSA5KGBgmOoTXA9PiDE69TcVUXK9MV+RYAMomp3Z2 eTXh6eAEbgOV2M2FzvyxljJO2CoiSdGFXtUwPT8JrWJvKT4C9FNuIMjvnem8AzvBnp77 Je26MQjoXktm0FVATrK7Eb8L4CdQbl1pGRC7C7e3uryZzNE/QQinLCPC3SPl6z0wXWqC sDLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=yU0fR9hDMJNIb75UhFnJEsg9Os6Op8nKY2ilFK9nsqA=; fh=H4D8raVEE9ToK4xcGS9/Pnvmhs2QUzCYuQTuaKubzik=; b=ftbtsjgMj+KYwrBdAhl6fkcfw/gEN6kXr22GQGfSUDsi1mj3nKUj2xHGxGR3pMze0t VpCQwHMFDosDPBBxhNhk3zETLYWKRsG6tt33kSmE279LhmNaFGUNYAbGfWRZWbGJXNek DkxAAa8zMYdBF30HPN2D4I20FGQjnig3ax6/6zkED2kOK6hWql5YdhHEbi/dJDbRAJyq jdaAo7e7RZ4zFdIqMAyxgglIlZ04s/G1cwrkoGJUZiJAez02/xX8d4jPruC6J3tPUZWe MeonftCOtcXWlRolDNovXg+OiPH3GosK1BsoP5/Gyde4CH5IO1tg/dpXF6FwVwegdSTe gAug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id e1-20020a17090301c100b001c89c86160bsi10346810plh.385.2023.10.11.06.25.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 06:25:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E09E381142E2; Wed, 11 Oct 2023 06:24:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235010AbjJKNYK (ORCPT + 99 others); Wed, 11 Oct 2023 09:24:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231524AbjJKNYI (ORCPT ); Wed, 11 Oct 2023 09:24:08 -0400 Received: from mx.skole.hr (mx1.hosting.skole.hr [161.53.165.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 027389E; Wed, 11 Oct 2023 06:24:05 -0700 (PDT) Received: from mx1.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id 27B6E83D9B; Wed, 11 Oct 2023 15:24:04 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= Date: Wed, 11 Oct 2023 15:23:46 +0200 Subject: [PATCH RFT v8 2/6] ARM: pxa: Convert Spitz LEDs to GPIO descriptors MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20231011-pxa-gpio-v8-2-eed08a0fcac8@skole.hr> References: <20231011-pxa-gpio-v8-0-eed08a0fcac8@skole.hr> In-Reply-To: <20231011-pxa-gpio-v8-0-eed08a0fcac8@skole.hr> To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Alan Stern , Greg Kroah-Hartman , Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Dmitry Torokhov , Mark Brown Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, linux-spi@vger.kernel.org, =?utf-8?q?Duje_Mihanovi=C4=87?= X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1628; i=duje.mihanovic@skole.hr; h=from:subject:message-id; bh=2i2mzqzeK5dKls1oQllrI2VaEq4mqrMjUDr4Yj1khYo=; b=owEBbQKS/ZANAwAIAZoRnrBCLZbhAcsmYgBlJqHoeXC5/SuJUFyiywTo7tDbkBQsYucN+zAMe ts4o/BsUE6JAjMEAAEIAB0WIQRT351NnD/hEPs2LXiaEZ6wQi2W4QUCZSah6AAKCRCaEZ6wQi2W 4UYHD/49wIrHmeNOmaf6udOGaV3KZpISkBwOENe5AldQXqVIw5VAGUWTUGSvzElbHdFFoXvX5u2 vPNhfGKDzjEkzNoJ24IxCAF4J8Q5TtgISR1s+/pYB3EQ1+jUJswQy7bDv9oQlQT+ZvL8RgPV2Jc 56GQ7LFh4or+WvAVp4RLgs085tF35aR0g75QT6Ovq1+RaUKzbUUyhbcL4WwFPpB5GYXsKl3lVr4 xhVsnFtSicfeieZTFr6jAe8Jr1O2jZnVU1u6WCSO8rnHLG3FZXVDBnrNtqAQyONwXvQtqaTikW6 aqfaQxJ5PM0eAZFfsGhCg1GIBzccUrjwzt7doP9F4YhFaE7cRUgsqTU6a22/s/RQtjFRaAgSm0d +hFe9aaQutooNStUV3WriC/LXSmddJq7y8IybNfZnyHHhiHkgR9K+pJyQqzYyVcQLjk+tThMx3e tGEl2hzV3/V1nkihQWTGFoUrE0HoYyJockIehjpv1IkS2K9CxN7up8UEEtUaPVYCVcwdt5WQL8o r2UNgVMJDHfPumDZNjiEu5Wnjehga0jJH+sN/oob1cPK2DfSpkE1k+PiU3txzGUyR1qELKTqEAs II5/plNTxcCtsbBi79QsaqjJ7bCFfeo54Q3bUJONdo5pXoJR6lMXLJyOnQnhCW2nqlC4vvjAA5S iCno2CxAKmDTxdA== X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=53DF9D4D9C3FE110FB362D789A119EB0422D96E1 X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 11 Oct 2023 06:24:56 -0700 (PDT) X-Spam-Level: ** Sharp's Spitz board still uses the legacy GPIO interface for configuring its two onboard LEDs. Convert them to use the GPIO descriptor interface. Reviewed-by: Linus Walleij Signed-off-by: Duje Mihanović --- arch/arm/mach-pxa/spitz.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 535e2b2e997b..9efd603c715a 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -452,16 +452,25 @@ static inline void spitz_keys_init(void) {} * LEDs ******************************************************************************/ #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) +static struct gpiod_lookup_table spitz_led_gpio_table = { + .dev_id = "leds-gpio", + .table = { + GPIO_LOOKUP_IDX("pxa-gpio", SPITZ_GPIO_LED_ORANGE, NULL, 0, + GPIO_ACTIVE_HIGH), + GPIO_LOOKUP_IDX("pxa-gpio", SPITZ_GPIO_LED_GREEN, NULL, 1, + GPIO_ACTIVE_HIGH), + { } + } +}; + static struct gpio_led spitz_gpio_leds[] = { { .name = "spitz:amber:charge", .default_trigger = "sharpsl-charge", - .gpio = SPITZ_GPIO_LED_ORANGE, }, { .name = "spitz:green:hddactivity", .default_trigger = "disk-activity", - .gpio = SPITZ_GPIO_LED_GREEN, }, }; @@ -480,6 +489,7 @@ static struct platform_device spitz_led_device = { static void __init spitz_leds_init(void) { + gpiod_add_lookup_table(&spitz_led_gpio_table); platform_device_register(&spitz_led_device); } #else -- 2.42.0