Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp528368iob; Wed, 11 May 2022 21:36:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziPJYAWuFJ7rO98IBU/tfUwH82AdI1kbUTG/i9nBQOAf76JfSiENsiIIaoWH0kgOiKU6V1 X-Received: by 2002:a05:6a00:801:b0:50d:ec66:fac0 with SMTP id m1-20020a056a00080100b0050dec66fac0mr28437648pfk.23.1652330219320; Wed, 11 May 2022 21:36:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652330219; cv=none; d=google.com; s=arc-20160816; b=FjhUcsHY0Q5o3WERp4vFX6eV7IbqSrxYwTJQ5ejSSsa7nLVQOpfk9QOihoJyTEIxDd ZKassj72pq/8eNmy1Y6tB6B2AKbslYQC91VJ4qkKyKZw+2FvpwZ+ojdpeCGeegSSDmy2 GSNyoPGQ9flQM3nWvIxX8PMJkMGr2Ml13tWV+cqQsbwZsvqcgEoxIU776PwY8LiyhRTJ yg9KCcOXtJJt5bWoUSS1I6UMVsMWDxg/aCFyNhXVZpPApAy/IHuarxOPOWl2NcDi+4ps Q+RjCdUyVYiTh176OucQkrFkXk81ARn8zza/GWbs60e32fV4BK5kWGlKCHf2qJXBuJep 5MYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=20318/xvPXu2lxX8X9tVBy9ShWnG5kb0p7KIWm6bilY=; b=j+lZIB64WzTI7Yp4e0w+4bUPMPk8m72AUtwEhBb8P3MK+GhTi4OnfMQfm/kCrCjHs0 TvCovzoeRA3op5c6zfexeXCUSAA7mkYyTwtO5W4VHy6vO5TwPRV406YpUnG7/hgEgjsZ Sm8urKb+YDoTkvQTkhqgA24Kh4dAUnfd+j+w93RCMkR2nayvC233WUCsP/VFMd3DVYp2 +pjBeXrOZrcSnW9UWQ0aCRX/4GJXFsWzQ45tl5huW9DvMOIG6wyl2kx/ThSwFN7jug2F TGXlTESsDmV93ONTDZlLeDVLy2iF64aUuIGhlGGU2anjSUl6AjS9E/6pMD9jITc5sKq4 FgdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JhwCo1D5; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o16-20020a056a00215000b004fae70007c5si4504443pfk.78.2022.05.11.21.36.47; Wed, 11 May 2022 21:36:59 -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=JhwCo1D5; 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 S1345890AbiEKRxz (ORCPT + 99 others); Wed, 11 May 2022 13:53:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345868AbiEKRxy (ORCPT ); Wed, 11 May 2022 13:53:54 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F98621A952; Wed, 11 May 2022 10:53:53 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id m20so5542596ejj.10; Wed, 11 May 2022 10:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=20318/xvPXu2lxX8X9tVBy9ShWnG5kb0p7KIWm6bilY=; b=JhwCo1D5QmYppFs7JgZN+Z1pfDhfm374tctxpKM/EvNUTf8teix+UoxWxHTlqIgQU6 p1t5nB782rusQ3nkFO8wA3iFptOukcRDowcFR96BfOF5UDs1dJwN2tBXPsMDiOeofRp3 Xb8m22WFI6FbzSbfk7mvNd6koLTB4U0CZITZTpzr7lsDXmKMBr13C4TfUmHULvxXiZT+ zMzyOhR6DRohpqj2EbducUCZV2c9nieHO73muzMM3HUp4G5P0mzmgP+EduQsZVrnLkv6 XDXPilhxlLJ/MApYsWpaNvCcvPc1g/unY/sjRejpX83J88JbZ5z2nyq7SW///qK4oMEI +uLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=20318/xvPXu2lxX8X9tVBy9ShWnG5kb0p7KIWm6bilY=; b=d3YNWI7aV7+39si42NZxJdm08zsUWIDG4LL2ImYXWLLCxYYVdhEf230Yo/cgQnvCow RJ/Cp9KjCGJ7/dhUyEOarzc0kWV+n2txoB/QdGEOmdmAEY0q/LPjmAx8aT04tVvf9suw kj9VRoSup5EADHmWZgeV5pMJosuDwxX4H3/VcRk/93UGjZeC0Crl+oJS746zNsfc2pjf 51C3/Yy9vddJx1S7IJZitpCN9qYikMmvIdSf1+jiGeFGKlFXAQb5FpQiueEAt6DHoFuL MIY537emUW9nOvXw1D/58q2WR49Mi9y6Y6IxNF61p5opgIagt34/ucjfCohkIkp8sdBB uzMw== X-Gm-Message-State: AOAM533rnvHaBIQhxIDmfQ7U5GPlUHt2UUOSdQq/5XKmR7bOpllM2DKg 4AyDEPGf2FpemFyh+rsGty5am9WsCWqNPELMYEg= X-Received: by 2002:a17:906:3ce9:b0:6ef:a8aa:ab46 with SMTP id d9-20020a1709063ce900b006efa8aaab46mr25724454ejh.579.1652291631524; Wed, 11 May 2022 10:53:51 -0700 (PDT) MIME-Version: 1.0 References: <20220511153905.13980-1-henning.schild@siemens.com> <20220511153905.13980-5-henning.schild@siemens.com> In-Reply-To: <20220511153905.13980-5-henning.schild@siemens.com> From: Andy Shevchenko Date: Wed, 11 May 2022 19:53:15 +0200 Message-ID: Subject: Re: [PATCH v2 4/4] leds: simatic-ipc-leds-gpio: add GPIO version of Siemens driver To: Henning Schild Cc: Andy Shevchenko , Mark Gross , Wim Van Sebroeck , Guenter Roeck , Linux Kernel Mailing List , Linux LED Subsystem , Platform Driver , linux-watchdog@vger.kernel.org, Enrico Weigelt , Gerd Haeussler Content-Type: text/plain; charset="UTF-8" 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,T_SCC_BODY_TEXT_LINE 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 On Wed, May 11, 2022 at 6:40 PM Henning Schild wrote: > > On Apollo Lake the pinctrl drivers will now come up without ACPI. Use > that instead of open coding it. > Create a new driver for that which can later be filled with more GPIO > based models, and which has different dependencies. ... > +static struct gpiod_lookup_table simatic_ipc_led_gpio_table = { > + .dev_id = "leds-gpio", > + .table = { > + GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 51, NULL, 0, GPIO_ACTIVE_LOW), > + GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 52, NULL, 1, GPIO_ACTIVE_LOW), > + GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 53, NULL, 2, GPIO_ACTIVE_LOW), > + GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 57, NULL, 3, GPIO_ACTIVE_LOW), > + GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 58, NULL, 4, GPIO_ACTIVE_LOW), > + GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 60, NULL, 5, GPIO_ACTIVE_LOW), > + GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 56, NULL, 6, GPIO_ACTIVE_LOW), > + GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 59, NULL, 7, GPIO_ACTIVE_HIGH), > + } Keeping a comma is good here. > +}; ... > + /* PM_BIOS_BOOT_N */ > + gpiod = gpiod_get_index(&simatic_leds_pdev->dev, NULL, 6, 0); This is basically GPIOD_ASIS... > + if (IS_ERR(gpiod)) { > + err = PTR_ERR(gpiod); > + goto out; > + } > + gpiod_set_value(gpiod, 0); ...but you may apply GPIOD_OUTPUT_LOW there and drop this call. > + gpiod_put(gpiod); Ditto for the rest GPIO requests. ... > +static struct platform_driver simatic_ipc_led_gpio_driver = { > + .probe = simatic_ipc_leds_gpio_probe, > + .remove = simatic_ipc_leds_gpio_remove, > + .driver = { > + .name = KBUILD_MODNAME, > + } > +}; > + No need to have this blank line. > +module_platform_driver(simatic_ipc_led_gpio_driver); -- With Best Regards, Andy Shevchenko