Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2649260rwd; Mon, 15 May 2023 14:59:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ65hyr6KELZlU9WNtdI/s7eXUOX1NrgPUQg5golvmrkRdfsG/vhBy/Oxy6adWdFwDy/qZpc X-Received: by 2002:a17:902:7001:b0:1aa:df9e:2d19 with SMTP id y1-20020a170902700100b001aadf9e2d19mr36802133plk.54.1684187976283; Mon, 15 May 2023 14:59:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684187976; cv=none; d=google.com; s=arc-20160816; b=LdWXB6cEqp9DroQO9jkZ9N+zJB/gNJhP2FIGQn8EH6EOWmFuxxd+F01J9/PZLXUvMN emLcaCY4YHef+KNPlhZ2OECTeVuauuvTT5wQbfMQKMOFBdtXMIT04EpwPREKrvbLZiL/ GPkGxGvIQKXCn4rPjBAVMWwvP/uJ4kxOQ1cmdl5b3jC1o5I513bDPA4pDu9YqtTOikLy 9bulDYWvqOdIjWAoTKYD78WGnaCuvpmQB2kkRoL4w3WwKZbTY5nIB+7FdYXVjX3hipw0 Z7aPPfvczU2l2CA5IiTntE078Nny09P6XuZa2TqoJL0sJkbhmKeVZ26sTIOvTHW4Rhoi hvXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=OCHQKuJLbXJ9aQq0pubbRtIxJ2NnwBoKe4K/L2rQNlE=; b=pQ08sTa3GCGYcYAfhVDosRZlK7P3kBHkWXH4DyYch4VB5vF5g/Gy2KM8r+oqMqs3eL sCUncS7S6E0I3B9Qi6SK+4rWQGN9+/9VecySX0o9htX6pfE3yzEHhLVzqy0Ro3hcJ13i bcPLivSoJdXo5Q9V7y+VXMSyd5Qgx0BT/zC1Q55lVJIfoUaW6yvAX9tGX25v+LTBudRT WofZ0kb1Pw3GRCW2xiDukroM3LmGqnFZB+4/clHrH4A6wWHKjXT+fER9tbHndlw2Ta5a fUggYKpgdnzseJT5lgu6wQye7CnxvbmW0HB1GYJpFgMhl3iGWfaAzLE260zKSiPAJ+Zg IsAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=St8h7TAq; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y14-20020a17090322ce00b001ade5e66c3csi9822398plg.76.2023.05.15.14.59.23; Mon, 15 May 2023 14:59:36 -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=@intel.com header.s=Intel header.b=St8h7TAq; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245615AbjEOVk4 (ORCPT + 99 others); Mon, 15 May 2023 17:40:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245568AbjEOVkx (ORCPT ); Mon, 15 May 2023 17:40:53 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D82E510E5C; Mon, 15 May 2023 14:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684186846; x=1715722846; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=uvW3OVIO11rtZpjrfrNpvFqRUCOTmH5JtdCGGW08rcc=; b=St8h7TAqtAIL2rGevUCLUw5t5eIe3C1tpdy+SnA27qAaKc9gqDmTqRrc B83czgAuCPmt66PTlWZXac60OiL4mPdudx0cMK/Y9WrLQmEYb2ZjIntfz I2Leui3u5nhdWi1uRn9d1YwJIcAhsMgajmkoNUzMEkZhBd9KbLXP0f/QR oFx30n3yrnUaSydRJ8/JHZ3R3dNRJw2RobipWH0x7zXJUDifu9Sws0R11 wwgnHpzM75jOPi0G+d2C4WT0aDlTN8l+lQ9W1XhLbD/N+LitmX+l7MxaS O8JS8j6EIqk0+fkJrpnW9KM1rCh3LVBGkHT2Mo+gtt0O465z7zwgX+/f2 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10711"; a="437656217" X-IronPort-AV: E=Sophos;i="5.99,277,1677571200"; d="scan'208";a="437656217" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2023 14:40:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10711"; a="651583790" X-IronPort-AV: E=Sophos;i="5.99,277,1677571200"; d="scan'208";a="651583790" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003.jf.intel.com with ESMTP; 15 May 2023 14:40:36 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pyfvm-00074t-2o; Tue, 16 May 2023 00:40:34 +0300 Date: Tue, 16 May 2023 00:40:34 +0300 From: Andy Shevchenko To: Henning Schild Cc: Pavel Machek , Lee Jones , Hans de Goede , Mark Gross , linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: Re: [PATCH v3 1/3] leds: simatic-ipc-leds-gpio: move two extra gpio pins into another table Message-ID: References: <20230515150352.30925-1-henning.schild@siemens.com> <20230515150352.30925-2-henning.schild@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230515150352.30925-2-henning.schild@siemens.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 Mon, May 15, 2023 at 05:03:50PM +0200, Henning Schild wrote: > There are two special pins needed to init the LEDs. We used to have them > at the end of the gpiod_lookup table to give to "leds-gpio". A cleaner > way is to have a dedicated table for the special pins. ... > static struct gpiod_lookup_table simatic_ipc_led_gpio_table_127e = { > .dev_id = "leds-gpio", > @@ -26,6 +27,12 @@ static struct gpiod_lookup_table simatic_ipc_led_gpio_table_127e = { > GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 58, NULL, 3, GPIO_ACTIVE_LOW), > GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 60, NULL, 4, GPIO_ACTIVE_LOW), > GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 51, NULL, 5, GPIO_ACTIVE_LOW), Missing terminator. I'm wondering how this works... > + }, > +}; > + > +static struct gpiod_lookup_table simatic_ipc_led_gpio_table_127e_extra = { > + .dev_id = NULL, /* Filled during initialization */ > + .table = { > GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 56, NULL, 6, GPIO_ACTIVE_LOW), > GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 59, NULL, 7, GPIO_ACTIVE_HIGH), > }, > @@ -40,9 +47,15 @@ static struct gpiod_lookup_table simatic_ipc_led_gpio_table_227g = { > GPIO_LOOKUP_IDX("gpio-f7188x-2", 3, NULL, 3, GPIO_ACTIVE_LOW), > GPIO_LOOKUP_IDX("gpio-f7188x-2", 4, NULL, 4, GPIO_ACTIVE_LOW), > GPIO_LOOKUP_IDX("gpio-f7188x-2", 5, NULL, 5, GPIO_ACTIVE_LOW), Ditto. > + }, > +}; > + > +static struct gpiod_lookup_table simatic_ipc_led_gpio_table_227g_extra = { > + .dev_id = NULL, /* Filled during initialization */ > + .table = { > GPIO_LOOKUP_IDX("gpio-f7188x-3", 6, NULL, 6, GPIO_ACTIVE_HIGH), > GPIO_LOOKUP_IDX("gpio-f7188x-3", 7, NULL, 7, GPIO_ACTIVE_HIGH), Ditto. > - } > + }, > }; -- With Best Regards, Andy Shevchenko