From patchwork Mon Nov 6 06:26:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiji Yang X-Patchwork-Id: 161828 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2471538vqu; Sun, 5 Nov 2023 22:27:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIR0dIelYXWSn+UMsZd89a4p5TC9+x2puCPOXUfHuD9mHLcveb6aH5LNXh1KxAIUBwua8K X-Received: by 2002:a05:6102:4746:b0:452:b96c:313b with SMTP id ej6-20020a056102474600b00452b96c313bmr25366455vsb.13.1699252068469; Sun, 05 Nov 2023 22:27:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699252068; cv=pass; d=google.com; s=arc-20160816; b=oR1jGb/Q6ydVgqGJZZUQe2fIc7iudv4LHbudkW4hpXqLV66V+y9tIOpWvQsZVbkUUg s9wNiMaz1XISfaB15zSqmXgLLkAhR766KYWV5BzXNT7RFEOk2KUQZkDDF3R2l1fKt7ah 83o9tZcId/agzEsGVkHjOOhN0bInoVNf2hMbFy9d63C8G+QyADVzeHXXJWAkDNpYr+VC G4oXEq4wzVC/Hq2PswrcdXLaJlr26VutC/PmMKIgGJ9lXvvuLV8VbmKofO9IkskA7riG 88m/sQqpW52aJ50hQRGR6n2l13fbXb0WDOJOU6wZPD1rq09I/Vy8BfqefScgYv15Zx5P 5Tng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=iJ651AL1iOYHGhpZcB2u908BUH/4wvbqx5MxAwswnno=; fh=Ukgm2Kpg8K/PWJEU6MNBn8nqMf/VKf+/+0ZrKLV44QE=; b=Kb17rMibJrq6MtPsUFHHBQshzOHbKk7qhdwPfVzjSWt/TZ6z2/wd9Z79XBK3NzA8Z7 GcJ757LinOdRRZxFrZPZ6nCqHvHVg1zT6uYq/FwN4710oN4Fe1FzEwwbDgEhroJr1GH9 xOdMw1ek6l+jH7AWtaTM5CyKT98+xOqFJVSwD6oHdryl78sKRh0n8RX3dQdF9ZRujjGf LlsTWiI0yXkD9gpjioMzm/bWB8d6Lg4PtzHk14by7o2D1YwimD8fYHTADair5PN3q6ss 1HwUY2GJ8Nc+lRQalzDKj+RojUKZT42SK3cm17lw9Blhg2ilsRLf+N5uWlJBDDTFkFUB oXBw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=mFHOAA88; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id f11-20020a63f10b000000b005b902b61cbcsi7203901pgi.723.2023.11.05.22.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 22:27:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=mFHOAA88; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D5CED809BBB6; Sun, 5 Nov 2023 22:27:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230435AbjKFG1c (ORCPT + 35 others); Mon, 6 Nov 2023 01:27:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230428AbjKFG1a (ORCPT ); Mon, 6 Nov 2023 01:27:30 -0500 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01olkn2063.outbound.protection.outlook.com [40.92.98.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D19D9B8; Sun, 5 Nov 2023 22:27:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JheXT6UxzODZPBuGhAAjs/eKzPOYqgl57+DUBZVJm0DydrYPVxataRbvIhN0dgn2zxefZKZZQyjUmkuL+a+4JHGcJQhLEVrENvOevg3mC7AQGv8nX4oRm3QyvzPvX/wnPRvzMfwMNzijlJna6JeSyBnaf0O7yHzfAaMbzy+atNpJvmgvRR+BsoLUv6t8s6AVcek+xaLfxiKUBI7BWF/rDIt1U5VNbY5BPEYz+NnzfXq9qMhOxNmOGqBfd9XCJ57A+3ecNxYspsr4qnKJm08uH+NoZKnaJOp3k9qDnGf6vMPKrjcOXZVjKBERZ239Repb/S6qR/YGSKQ24tE1z/7gIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iJ651AL1iOYHGhpZcB2u908BUH/4wvbqx5MxAwswnno=; b=M7K1JIFf4uCzzaAERhxDxYuY81+/iVEW+c14GBmkY4Ro5jxq3/Nri1dDpkgryvQ1z6qidY+tYomolV5yCXe7XYEFN0VLrXuWhjBfAH3L9bzBicBSXZ+53fOBF1YG+LuQzYcpExX+uiW3dThfWHnn+kQ3Z1HTlfDlQmPBZGAy0UTNe0kHMphPuds+m8vynQ3VRgtigx/RMy+5NT50WGsq02xXIHYX9q6tyxtYCkecrx3iG6ZQh9/CZvvD6S0G0cOFDixo3opWBpaES+mqr+dHnVLzTVjMU1IZ8npb/laq3sGbHYanze2su4mgwdOMmdbNUr44WUo7tbb0KBF5mHbe9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iJ651AL1iOYHGhpZcB2u908BUH/4wvbqx5MxAwswnno=; b=mFHOAA88KGIQmS8AB216xbQSr90ZeI3nXIPIvzKwqSph/SNirkp+9lRSAzBROQAqok5DrLbiUtUzqxxJcYuNQDCCztP4RMbwS2cLAvIWsb/n0DyWwpAnsYhGc8gkM8UQNjtVstj28vDlDxmT+lQZG/oshAJ8byMjFgP8uYYFWdRowO4Te23c3glXU6sS2gkmyQKoRMt/vc2UlIoy7QOP9zWhtGMSh8W344PsTYj9qTnAGI2i7ql/TcK3R1RVjG385ZD8XAVm3LD5UOl1wTXg6W64MEie3pEbotatDtJbwsmbSg0kqj9pu+EHg6HoJWk3fZarIsEGfVNz8E/ubn31ag== Received: from TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:8041::8) by TYCP286MB2367.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:18b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Mon, 6 Nov 2023 06:27:22 +0000 Received: from TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM ([fe80::465a:2534:4d99:a25b]) by TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM ([fe80::465a:2534:4d99:a25b%6]) with mapi id 15.20.6954.028; Mon, 6 Nov 2023 06:27:22 +0000 From: Shiji Yang To: linux-leds@vger.kernel.org, devicetree@vger.kernel.org Cc: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jisheng Zhang , linux-kernel@vger.kernel.org, Shiji Yang Subject: [PATCH v4] dt-bindings: leds: add 'internet' and 'signal' function definitions Date: Mon, 6 Nov 2023 14:26:51 +0800 Message-ID: X-Mailer: git-send-email 2.39.2 X-TMN: [+IcjH/6JQ/NEElEnZktObtPbbM7gCv3o] X-ClientProxiedBy: TY1PR01CA0198.jpnprd01.prod.outlook.com (2603:1096:403::28) To TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:8041::8) X-Microsoft-Original-Message-ID: <20231106062652.5466-1-yangshiji66@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYAP286MB0315:EE_|TYCP286MB2367:EE_ X-MS-Office365-Filtering-Correlation-Id: b187daea-9432-4f49-d427-08dbde916ed5 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jsufzQ4KG+RcG1PFGVJtEdv4Aw2YUS6n4S5hEdyzoAymPPPHoKO7EB7utReW6/ZB4tnBFI5vkBTXN1RN4CxTLhjelF+7h1qgKGr77WA42Xj/DFSt/NqWGlJuQfcYAqtZwwJGTFTeoWAZjbqbcYw8wdhx0kXES9KJZXUc349HjRoLnE8DNGGFfKoEuANzS8/hQNMQ5QhA6EWUkTEqJWAuG8bI0+EHTra6OzXr/D+FgmvfCtj+Gp637Y3hHp7YGV+wusqkWhPh9iA4clbsJC4+KF8n+YjdbSAs0FqDRKc2/JYgR4J4buRE12QByq/uIWdd1gurk70EByMaUkADR00LBMmK3z7b9vnPcBLdLYt7xQp9lNYH/UmVXebrBg7AGpedKErgFAt2pLUN2eOaE9Lhwyw1f/bctZUBrw6ruLspiARGDvh0m+1cIk767qY1lu+rSRLenoqHe+gJ746GKi1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DZvRxQwuqVz2biajEycBfDQNMqDXj/RdVyM5nYffCOHeDRVkU1rZ5PlyJ89G5mZmx0e2c76nbNWjFvmpyDuDizEWQlXLr0InhKbJQIPSjvz9I6NM0xFJzQNVLminzenjp0MjrZPOduhiDBMQ+6d8j7e5Lqpv062l2lUkNimFQHrUjlv8OmUz7WTr/PZJ3NFVUpkLCbcH191OEaKDxg9TkLwUttPJCSHdKKjM3cQ5oj0vWmM5DUbSS8SqjSHsWUKakpEJ92uzebktWi6bCPlnKHDnB5jg01z+hwtSDLhk9ydfY+tYmRC/NrND4ZwcmLgsLzlKhCj+wd83NzfI7IQnFsvnWObKk6RycOLqMJf0DspODub6QQ4GTYXCLeqPAnAblrIydF3t0CmBZcU19PPY1oxXKt16Wg2nIg5Ug= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b187daea-9432-4f49-d427-08dbde916ed5 X-MS-Exchange-CrossTenant-AuthSource: TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2023 06:27:22.5335 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCP286MB2367 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Sun, 05 Nov 2023 22:27:45 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781794937246590546 X-GMAIL-MSGID: 1781794937246590546 These two types of LEDs are widely used in routers and NICs. The 'signal' LED is used to display the wireless signal strength. Usually, there are 3~4 LEDs in one group to indicate the signal strength, similar to the signal icon on a mobile phone. The 'internet' LED can indicate whether the device can access a specific server. It's different from 'wan'. 'wan' usually indicates whether the WAN port is connected to the modem (internet services may still be unavailable). But the 'internet' shows if the device can successfully ping servers such as 8.8.8.8 to detect the internet connection status. When the router is running in AP only mode, we can even connect LAN port to the AC/modem to connect to the internet. In this case, the 'internet' LED should be on. On some routers, both 'internet' and 'wan' are available and can be controlled separately. Signed-off-by: Shiji Yang Reviewed-by: Rob Herring --- Changes in v2: * Remove the LED name sorting patch as it changes the ABI. * Add "devicetree@vger.kernel.org" to '--to' list. Thanks to Rob Herring and Krzysztof Kozlowski for letting me know I can send patch to multiple mailing list at once. Changes in v3: * Add more information about the new added LEDs. * Remove the missing LED fix as Jisheng Zhang has already sent a similar one. I should search the mailing list first... Changes in v4: * Rename 'rssi' LED to more generic name 'signal'. I forgot to update the source file in v3. v1: https://lore.kernel.org/all/TYAP286MB0315FE921FF113BF76F7B700BCA0A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/ v2: https://lore.kernel.org/all/TYAP286MB03159A83A77E6FD59F271D9BBCA0A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/ v3: https://lore.kernel.org/all/TYAP286MB0315AE8F62E6AB48E3F9A0DDBCA5A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/ include/dt-bindings/leds/common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dt-bindings/leds/common.h b/include/dt-bindings/leds/common.h index 9a0d33d02..f831c5dba 100644 --- a/include/dt-bindings/leds/common.h +++ b/include/dt-bindings/leds/common.h @@ -88,6 +88,7 @@ #define LED_FUNCTION_FLASH "flash" #define LED_FUNCTION_HEARTBEAT "heartbeat" #define LED_FUNCTION_INDICATOR "indicator" +#define LED_FUNCTION_INTERNET "internet" #define LED_FUNCTION_LAN "lan" #define LED_FUNCTION_MAIL "mail" #define LED_FUNCTION_MTD "mtd" @@ -95,6 +96,7 @@ #define LED_FUNCTION_PROGRAMMING "programming" #define LED_FUNCTION_RX "rx" #define LED_FUNCTION_SD "sd" +#define LED_FUNCTION_SIGNAL "signal" #define LED_FUNCTION_STANDBY "standby" #define LED_FUNCTION_TORCH "torch" #define LED_FUNCTION_TX "tx"