Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp853007rdg; Wed, 11 Oct 2023 07:22:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFI60SNXZorLv5andPnPaf4/n5xfYsLq5G4BaF1NSvx6li0+XBy0KXWIEYIHVEiycBGCowF X-Received: by 2002:a05:6358:7e46:b0:13c:c84b:88b9 with SMTP id p6-20020a0563587e4600b0013cc84b88b9mr15707214rwm.15.1697034131827; Wed, 11 Oct 2023 07:22:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697034131; cv=none; d=google.com; s=arc-20160816; b=xQFUPHPpv/Hb616JVwEl5GoEkcHC/KDLi/HrM2mgdJEEGihx5zC3lBGyN4vEgq8ZAa YXeHejsV2I8VSc2ikrRw4VU03CEDmEbFd4Oh+z463WpNVfLpEYAOpRrXihnpWi5LHl76 LZelO9hqz0e83jjUWxP9IaAeUBrNJR9aUDquuanfHcXS40hGhrncQ5sNqYTP0ADT0Lvy t6CU648Qwgzr+bUFdrw9rKOw2b+w+uocNA/jgW9LFhbDPwo5fkNpqpKe+hVfAOgn+ca2 cJQSGMBymu+UC7/lZagJX9IvYIMozjoxsmEtFbKeZKOEqquEu5tPbjllBnslOR8ufpFp JLPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=XiBaX2TqUvTbj5wkDIil5VnOSe22zVgH7ek2DB7rIck=; fh=bD0irRExCR9U/CdLuI02LRr7jOWxzGkti19Icxfbv34=; b=VCmkxiakXmRqHnRqnXA38GHcQXPuvhfYrBfh9Jw1v0jpqV+QLEpGtC6vnhP7VvHVrS +JNQBmuoK4Y7IMM1+M1vfKHs102qXi+ubRAuMeApt6Yy+QkYL4jwaBvJPbR37ljYFGTA Sjbshe3lRmN22rqi7LNTwJUDgeLT8/saEkMnDy5bKrYrUqpvzmVNheYJ3507LgTfDdhG O+H0LL7nBIZEDS9axH6Nv5l3Og864gBywEnfxK8vZz56CmSL/PYgD/+k90H46UAheeA+ kdFSVSN6H3k02dZ2NSGAkjCASgjhjPgWXsOvRYE84Q/vPCZ8xR7x9kfiz1sLdyzbQyMy ebaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=BshUQzXu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id t11-20020a056a0021cb00b00696f1c14972si12555082pfj.208.2023.10.11.07.22.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 07:22:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=BshUQzXu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id F2B8E801CE73; Wed, 11 Oct 2023 07:22:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234952AbjJKOVz (ORCPT + 99 others); Wed, 11 Oct 2023 10:21:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231370AbjJKOVx (ORCPT ); Wed, 11 Oct 2023 10:21:53 -0400 Received: from mail-vk1-xa2e.google.com (mail-vk1-xa2e.google.com [IPv6:2607:f8b0:4864:20::a2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 660AA92 for ; Wed, 11 Oct 2023 07:21:51 -0700 (PDT) Received: by mail-vk1-xa2e.google.com with SMTP id 71dfb90a1353d-4a4021adbc7so90178e0c.2 for ; Wed, 11 Oct 2023 07:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697034110; x=1697638910; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=XiBaX2TqUvTbj5wkDIil5VnOSe22zVgH7ek2DB7rIck=; b=BshUQzXuorFbyaypct1b3NVCZbJo35Z7sXP3v85fdlBgL303Xlz+nZOMmSaFf4KSP0 dwZxn5c77qBpGA8AkSvV43ISUnIXa1p8INqc4nMjbgsN2Lk7RcDRsuwCWA5tH5qQX4f1 CZaA8aYD8m8eEP3JnDo168tIXcoR5VIuwlIq6/s99WQJDwLdrtK9MR0FlMMT+DAhwCns KZEEUXy3IOEk1hfz2t6A4+qrzGO/HoWAkSlEnYR4BNIA/lM0mfTgfPVH2hbQq6b8SlZi sgD6AgaZifxmrzORJndui2RgLQUiwpRVJmCW+0iXx9S4hxyIaENO4y8zTkJreT4TKKbV 6Vwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697034110; x=1697638910; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XiBaX2TqUvTbj5wkDIil5VnOSe22zVgH7ek2DB7rIck=; b=sX/vpWhE1tQ2aRQ8xR994eMNpKZFN5oqc0ei58np3aGogL1BH+PPDE3uKrU4hJvX6c tr7f79slwzjYtm9kPvDn3Qj6wuraF/Zq+foZGi8fxbU9uv3oF22/3rZi7EeLXHu4S4LC k2zOjtScEoKRbdAndSLUxUl5eAhMHNLDXK0+KMjIwFbDuxHBpi+9rfwWQut17VdCw6X2 p6yJJMLC566gdWzPnwxEtPiGocaoMDUviJ2zB+k+sC9LTJv/r28QpUiQ2q/QGAgShKiq dAKHb8aTjRTiuw3GxDecewqQWlFzaxKztc3pdW+IyhKy/ZuNULcxJ3Qu8lt8Tl56JHk/ LBZA== X-Gm-Message-State: AOJu0Yxaa+CztPS+ZqYjXE0OMkJjWwSkiT0NtvzZWmQ+AQ1lB0DCx+z/ 6G5Sfyv0Fk5v/WHFJg8OUUILP4TxGh0Ecs+u7nQ7Rw== X-Received: by 2002:a1f:cbc5:0:b0:49b:adce:e2d1 with SMTP id b188-20020a1fcbc5000000b0049badcee2d1mr17554689vkg.10.1697034110430; Wed, 11 Oct 2023 07:21:50 -0700 (PDT) MIME-Version: 1.0 References: <20231011-pxa-gpio-v8-0-eed08a0fcac8@skole.hr> <20231011-pxa-gpio-v8-2-eed08a0fcac8@skole.hr> In-Reply-To: <20231011-pxa-gpio-v8-2-eed08a0fcac8@skole.hr> From: Bartosz Golaszewski Date: Wed, 11 Oct 2023 16:21:39 +0200 Message-ID: Subject: Re: [PATCH RFT v8 2/6] ARM: pxa: Convert Spitz LEDs to GPIO descriptors To: =?UTF-8?Q?Duje_Mihanovi=C4=87?= Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Alan Stern , Greg Kroah-Hartman , Linus Walleij , Andy Shevchenko , Dmitry Torokhov , Mark Brown , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, 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 howler.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 (howler.vger.email [0.0.0.0]); Wed, 11 Oct 2023 07:22:09 -0700 (PDT) X-Spam-Level: ** On Wed, Oct 11, 2023 at 3:24=E2=80=AFPM Duje Mihanovi=C4=87 wrote: > > 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=C4=87 > --- > 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 =3D { > + .dev_id =3D "leds-gpio", > + .table =3D { > + 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[] =3D { > { > .name =3D "spitz:amber:charge", > .default_trigger =3D "sharpsl-charge", > - .gpio =3D SPITZ_GPIO_LED_ORANGE, > }, > { > .name =3D "spitz:green:hddactivity", > .default_trigger =3D "disk-activity", > - .gpio =3D SPITZ_GPIO_LED_GREEN, > }, > }; > > @@ -480,6 +489,7 @@ static struct platform_device spitz_led_device =3D { > > 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 > > Which driver consumes these GPIOs? Doesn't it need any conversion? Bart