Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2245042rdh; Tue, 26 Sep 2023 18:09:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGdj/lugkepa9vNyXMfXLWz4TJns2n8YTIuhRrb0+DS2GG7c2VsQ0PzjWrMYvmC2YUyChzs X-Received: by 2002:a05:6a00:1ac7:b0:68a:59c6:c0a6 with SMTP id f7-20020a056a001ac700b0068a59c6c0a6mr707858pfv.24.1695776940762; Tue, 26 Sep 2023 18:09:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695776940; cv=none; d=google.com; s=arc-20160816; b=frIYmSc3agStENROJ2uaCz1Ydi+/US4/j4+nbrUS1zpP6zEw+oChtEqAcoWy+YQbYJ 0o1don8FrbjYHcss7Qx2YgQVfO0Oj5HGSWLltMWrjtk0DYP0lZJE5TvIJpGePKFLhXXN 0YC0UPSIRSO//wP9CXxGD7CRvG0Cg5Y2kaDuEMk7UOGME8G2ZJGdS8tCpO55mI/JN/ts FdbBni+G10ilxAjZ875whUg1RPnDZAXAFsDxVe9/leWCIm05WLHaiEVIPBrhGwa8rm0/ Oq/HL5cKwiA9wVV+kK5G4JXZgmfmw3lpfC/JHjChtqvB9xFHyeFC77xlS/bjIraDLP6B A9Iw== 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=UQPgNKa2ckzekLFC/mzb8gdM+KeB0NKG+j9gRkdkJyY=; fh=IIJLJvfDf0sOojs8Z+3ItNVYYPMcohNYYAHbHzIxqc0=; b=IzVkM0MndGlnq7JHgR2Ll3qmHwNVCX521M5G5ddVzCfAb2WwG3jXRK+2DoPAjml6ak M33vJguUiTH0LrotIk4euCj3ULbjXtc8Nm46T56aAkL72nh/gP9wvOZUYpNK4io476Tj EfwHXbQ0AXGO55/TN18De60ewrZPCW0Qi898D0vqGqhy3HE4mNbR6/HON4aKL7y7hCue bqyGVSmn2Q3LWF9Zas5BJxPAu+fXQBn5YOxhMxEckPF0ykYqKldBk3qYGhPtSroUT3cM zm5oXOgqvjMPdzGY1zj/Y4cfAx09MuwJxLrGkaH3DX/vt0CEe7qTA7qFc7CMnKlzHZEt r3Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=moYeveR0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id u23-20020a056a00099700b00687008df88dsi15652063pfg.52.2023.09.26.18.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 18:09:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=moYeveR0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 3DB938095DF9; Tue, 26 Sep 2023 13:22:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230447AbjIZUWM (ORCPT + 99 others); Tue, 26 Sep 2023 16:22:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbjIZUWK (ORCPT ); Tue, 26 Sep 2023 16:22:10 -0400 Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA3B911F for ; Tue, 26 Sep 2023 13:22:03 -0700 (PDT) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-59f7f46b326so60889467b3.0 for ; Tue, 26 Sep 2023 13:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695759723; x=1696364523; 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=UQPgNKa2ckzekLFC/mzb8gdM+KeB0NKG+j9gRkdkJyY=; b=moYeveR07OEjQ6/umxmF+9HR0p1HjxOMeHYGeQefnIYH1OAABI++MO7umRQIPdRw5e +/vKjGDlIX1+7+/NrPkNGdxjvKNZucfwtx+Ih5NtTABVYSqKkNB6YqIpbUPVA2U2mE7x 4Qnwe7BLfXEiMyTI3gMT4YWElWPhs02/V4FTCRwMSBQu0xISH/AzQ2moh41+40yvj9s5 21mMjtIvVsokUECCDYg4BTj0I0r+5MC0LEhAy+HaYSr5TUeiAuyIaqUXQdC/oZD6VKnY qs0GPpM1K+eGoRmw47pSY5FeZfoGI6Yny+IxTmMmZM2s4MunHvwcdY1FFDuu7/2gm6bd NZpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695759723; x=1696364523; 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=UQPgNKa2ckzekLFC/mzb8gdM+KeB0NKG+j9gRkdkJyY=; b=uRy8ybBYZbAnfAKDcVc6q5UnqL85RNFr9Gw91mpGIf0RcTjpLO9cI6VeBlDZlIGqfQ ECMIn1kj6zC61zEKm+UT2GaX9z7+npUgm4bcAlqCjbNrUQkaMSaKnAbUekE9xnRRJ92J C0dB4Cjh2xRsYHXP6koZ5j8Jv2AUlRk/R0ZT0JgBmnhJtvf38Anh84RRnIZixOfgTv2W 5Xl05h0J3LeHzjVlTtEnKsT98R+yW+sLN7H3hjRlYM0O4cLKNwOvbr/gKRwLSQrrD25x DyDrAqWYfsXi31cxMhaazhRXSEQvQRN0+dUO+iAPYky9bEnnN/T06p9KBsl5vMDxTAjU 9hDA== X-Gm-Message-State: AOJu0YxwQeMVyzPZH5CE9irmSJi0wg3SCRZaW9lYI0G8dIHCREaokT/H GsurJv4Fxx0ak4mkAwFbZO+1X1GuvCH/4ymAsuu/8A== X-Received: by 2002:a81:a0c3:0:b0:58c:53ad:ee3f with SMTP id x186-20020a81a0c3000000b0058c53adee3fmr74738ywg.34.1695759723006; Tue, 26 Sep 2023 13:22:03 -0700 (PDT) MIME-Version: 1.0 References: <20230926-pxa-gpio-v2-0-984464d165dd@skole.hr> <20230926-pxa-gpio-v2-2-984464d165dd@skole.hr> In-Reply-To: <20230926-pxa-gpio-v2-2-984464d165dd@skole.hr> From: Linus Walleij Date: Tue, 26 Sep 2023 22:21:51 +0200 Message-ID: Subject: Re: [PATCH RFC v2 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 , Bartosz Golaszewski , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 morse.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 (morse.vger.email [0.0.0.0]); Tue, 26 Sep 2023 13:22:15 -0700 (PDT) Hi Duje, thanks for your patch! On Tue, Sep 26, 2023 at 5:46=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. > > Signed-off-by: Duje Mihanovi=C4=87 (...) > +static struct gpiod_lookup_table spitz_led_gpio_table =3D { > + .dev_id =3D "leds-gpio", > + .table =3D { > + GPIO_LOOKUP("pxa-gpio", SPITZ_GPIO_LED_ORANGE, "led_orang= e", > + GPIO_ACTIVE_HIGH), > + GPIO_LOOKUP("pxa-gpio", SPITZ_GPIO_LED_GREEN, "led_green"= , > + GPIO_ACTIVE_HIGH), Unfortunately this is not how leds-gpio works. You have to have the name be NULL instead of "led_orange" etc, and put the LEDs in index order, in this case something like; + .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), Yours, Linus Walleij