Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1027757rdb; Sun, 1 Oct 2023 16:57:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFnrm1KLIMAbGYKzHytXMnUVJ9/WipwJiF8QR6lOrP/uPuJ5iHsZOvrPzPqiT9kXREJ2cM3 X-Received: by 2002:a05:6870:e310:b0:1d5:8d8b:dcc with SMTP id z16-20020a056870e31000b001d58d8b0dccmr11830964oad.18.1696204620652; Sun, 01 Oct 2023 16:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696204620; cv=none; d=google.com; s=arc-20160816; b=gnz2u409+dBYJjQoQJbg3Sp96ynhkkFxcpN392JtKX2JJfItO84XsyF7V6PWsguqlE sQPv663EETlkuyAQN3t9/JpD9a6uPZEvVEZpt1Yjpo+DuCCl1UaDHKG2Z8z2sAluWq9E WONtVqZeDlYs3zqc8dlF772nM8umj7sEG/3SXv8SsJfzTOi5Nzlm9y2O1WUrK6/35/sK 9Ab9YxSxiXBCPNtA25t7Yt5udl1vtHabb5PCgye6S3PiWSR7XuSOleq2lHZ+H7G5eBk7 MeZCkzXrH+zrVf4hBeEwLzEoMoelZZ2EX5bJLXEpRE6Kzl06hml6KI0aksl494P4SCMl +alQ== 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=0rl/LNRNIKB0OOICjXESoCeW2EfNvQVfmDGrdMKDqh8=; fh=8cwGh3PX0tKRS/k+k9rLojZhhupzfpttKpOjs3mxuRw=; b=Jg+bxA8xLmGiBjce27ABGG5wWeaS9CwJSJP2QbkQrIFgeD55DZZrP8o53oesjj1AOR 8IERJFtO+KpfJ4cCJW+sscXK/saYNI10+1HREe3GG41n5pjSiCIFxLlIULcfz0ogk0V/ 1PdeEpCp20tHbk8cqH/70yLr66P4f7aAqHGQo8nn+a1/ll74QCo2DChTay9490kMXRfL xUB9+uYXbHdJvkmZYhB6TkwkzpzzJnjOddEfdqo/KJWUrAKAAQ6E23RFrHq913V/aQFB i6DIhETkiqSHLGi95n8n/0h5fInjsyfsjuiwdOH46m2vAET3X7fAslvLjIwdWasVt40v cYEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QqhacPem; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id 82-20020a630155000000b0057cbd803b37si11487493pgb.463.2023.10.01.16.57.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 16:57:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QqhacPem; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 62FBA8135638; Sun, 1 Oct 2023 07:35:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235103AbjJAOfN (ORCPT + 99 others); Sun, 1 Oct 2023 10:35:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233590AbjJAOfM (ORCPT ); Sun, 1 Oct 2023 10:35:12 -0400 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D44C08E; Sun, 1 Oct 2023 07:35:08 -0700 (PDT) Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-6c4cbab83aaso8141252a34.1; Sun, 01 Oct 2023 07:35:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696170908; x=1696775708; 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=0rl/LNRNIKB0OOICjXESoCeW2EfNvQVfmDGrdMKDqh8=; b=QqhacPemhcVhnVPFg6b+vyAVpptSD/K3oYKhiT/nEtxQe5U708S4FXbN23WgRWNmlx uMzpm5U9Ra/qwaZDp2huocZFU1L5jX5tDsSA+fIHLN3n64roE/oQn3zxAJoAZEEjO5lf YNUay2Unu0hlArcqXcQamQSO23Cjhvq3vOD0HzUijNO1OFPP6OiVOuai2cSQXHHk5j7D HGByDj9WNnzDma0W6gC4eCyi4VG2uLtQl4usDcBkiz0P3ftErBEEsiPlc2hP8hxKuTE3 GOCi9zGdjvHTlHqs858NBfZHAcckyOAUm9YSShm7GJVqNTPAxf4G12/OhDyIoPwAvmMS KUHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696170908; x=1696775708; 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=0rl/LNRNIKB0OOICjXESoCeW2EfNvQVfmDGrdMKDqh8=; b=Ru5eXlRCCusvESWrsBcMBwenZK7ad4Wy3Y7z5rvaKjDwEUxc5qKEfyYpMIUvi33H6k 0FmIRg9k05w1Ayk9+tr91q7o0QvJHr3KmhcHSgWCoawt8B7RNsOFfSFizhmW79Fb8vf8 jYnelLps3fVOVWg8QefeHCTKudu8oTYqJRArE4FAgy3cRAMCfIiXr33ergPVyPqhXvDn icIoxLYIPwLX4Hdu2Id2A4n2KkFviev+mJNn7pOZluZCXv+7Ne4ZDgwicGKPdwWk0qjW ftzP3V02ycbeNmspJwNYxIDfp8t8ZFZRXJ8ErOam3p34K9xR3S/1w1kHbgIoQgv4wA9j l4fw== X-Gm-Message-State: AOJu0YzGj1BY4W+SGNTbiwLZb6xrTCM6y2pekmF6m8AEj093GOFXeJkX Mi+rJs8MBxuuJMlhn0UReyTQWozg1UE0Jtri7uw= X-Received: by 2002:a05:6830:3449:b0:6bd:c74e:f222 with SMTP id b9-20020a056830344900b006bdc74ef222mr10249317otu.34.1696170908178; Sun, 01 Oct 2023 07:35:08 -0700 (PDT) MIME-Version: 1.0 References: <20231001-pxa-gpio-v4-0-0f3b975e6ed5@skole.hr> <20231001-pxa-gpio-v4-2-0f3b975e6ed5@skole.hr> In-Reply-To: <20231001-pxa-gpio-v4-2-0f3b975e6ed5@skole.hr> From: Andy Shevchenko Date: Sun, 1 Oct 2023 17:34:32 +0300 Message-ID: Subject: Re: [PATCH RFC v4 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 , Bartosz Golaszewski , 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=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Sun, 01 Oct 2023 07:35:53 -0700 (PDT) On Sun, Oct 1, 2023 at 5:13=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. ... > static void __init spitz_leds_init(void) > { > + gpiod_add_lookup_table(&spitz_led_gpio_table); > platform_device_register(&spitz_led_device); > + spitz_gpio_leds[0].gpiod =3D gpiod_get_index(&spitz_led_device.de= v, > + NULL, 0, GPIOD_ASIS); > + spitz_gpio_leds[1].gpiod =3D gpiod_get_index(&spitz_led_device.de= v, > + NULL, 1, GPIOD_ASIS); > } What's the point of keeping a lookup table after we got descriptors out of = it? --=20 With Best Regards, Andy Shevchenko