Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp612109rdb; Thu, 22 Feb 2024 13:49:34 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXzaDOZ83O+L5gN9o+GR8CzB5RbUaz4fhShOL18eF4u+psOxcr7C34Y6KTszTPkDTh2IpJDetS4jEHVj1cBWMy4uZ1qI8PaUEc4iWFmag== X-Google-Smtp-Source: AGHT+IH/Rgf0XOJbnXHXxKLwtoMZaOoaXppRM1sVltZVJpIeHlv/hdElvGATGy6MyNXlVyd7toBo X-Received: by 2002:a9d:7997:0:b0:6e2:ebfd:4b26 with SMTP id h23-20020a9d7997000000b006e2ebfd4b26mr306509otm.20.1708638574438; Thu, 22 Feb 2024 13:49:34 -0800 (PST) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k5-20020a6568c5000000b005dc85506e66si10589908pgt.402.2024.02.22.13.49.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 13:49:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-77418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D8E70B21B13 for ; Thu, 22 Feb 2024 21:40:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E465612D1EC; Thu, 22 Feb 2024 21:40:38 +0000 (UTC) Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CAA5F73F13 for ; Thu, 22 Feb 2024 21:40:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.82 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708638038; cv=none; b=k2zd0DrX8/c7tQm0wv1Vdz3DtyeWPOcbRiBlYKfj0xQIiqjcXetRV/xyT1anxRc4RnNy02EeaMK2MuzWLmLob7u/96EnBu/6vgekTvCIearteMmRkiWJfMJ2tiVKMgTmMIzkTgJiorZGfnb3uiSxNtsd2Hi3VqxQVV+gAybT+94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708638038; c=relaxed/simple; bh=FskGyQM0hnrRbCG067LMBsXVFuEu0IODjENfPSTN1Xc=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tVj1cmjAy+pTJa8Vuc/KSvn4KQTzz1MmXxtMooF7EKLoHvyQs+2tWY8k8++kIqASHN1MIVgLsTleVP6MqFiGUhPpf7j7hSwYGPGPfSqkXbOWkXX4QDT2yfByD5eGLiR7UMAXBchIkREtlzcS8/DrNQib8n5OZvrkaGKb1YREcm8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-26-217.elisa-laajakaista.fi [88.113.26.217]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id fe9fe7f5-d1ca-11ee-abf4-005056bdd08f; Thu, 22 Feb 2024 23:40:28 +0200 (EET) From: andy.shevchenko@gmail.com Date: Thu, 22 Feb 2024 23:40:27 +0200 To: Xing Tong Wu Cc: lee@kernel.org, Pavel Machek , Hans de Goede , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Gerd Haeussler , Xing Tong Wu , Tobias Schaffner , Henning Schild Subject: Re: [RESEND PATCH v2 1/1] leds: simatic-ipc-leds-gpio: add support for module BX-59A Message-ID: References: <20240208120901.GL689448@google.com> <20240218062806.3932-1-xingtong_wu@163.com> <20240218062806.3932-2-xingtong_wu@163.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240218062806.3932-2-xingtong_wu@163.com> Sun, Feb 18, 2024 at 02:28:06PM +0800, Xing Tong Wu kirjoitti: > From: Xing Tong Wu > > This is used for the Siemens Simatic IPC BX-59A, which has its LEDs > connected to GPIOs provided by the Nuvoton NCT6126D MIssing period at the end of the sentence. .. > static int simatic_ipc_leds_gpio_f7188x_probe(struct platform_device *pdev) > { > + const struct simatic_ipc_platform *plat = pdev->dev.platform_data; dev_get_platdata() > + struct simatic_ipc_led_tables *led_tables; > + > + led_tables = devm_kzalloc(&pdev->dev, sizeof(*led_tables), GFP_KERNEL); > + if (!led_tables) > + return -ENOMEM; > + > + switch (plat->devmode) { > + case SIMATIC_IPC_DEVICE_227G: > + led_tables->led_lookup_table = &simatic_ipc_led_gpio_table_227g; > + led_tables->led_lookup_table_extra = &simatic_ipc_led_gpio_table_extra_227g; > + break; > + case SIMATIC_IPC_DEVICE_BX_59A: > + led_tables->led_lookup_table = &simatic_ipc_led_gpio_table_bx_59a; > + break; > + default: > + return -ENODEV; > + } > + > + dev_set_drvdata(&pdev->dev, led_tables); platform_set_drvdata() > + return simatic_ipc_leds_gpio_probe(pdev, led_tables->led_lookup_table, > + led_tables->led_lookup_table_extra); > } .. > static void simatic_ipc_leds_gpio_f7188x_remove(struct platform_device *pdev) > { > + struct simatic_ipc_led_tables *led_tables; > + led_tables = dev_get_drvdata(&pdev->dev); platform_get_drvdata() > + simatic_ipc_leds_gpio_remove(pdev, led_tables->led_lookup_table, > + led_tables->led_lookup_table_extra); > } -- With Best Regards, Andy Shevchenko