Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2936101imw; Sun, 10 Jul 2022 20:10:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v8BPVT3sQy4MpuSmhRUQzyShAMZsGY91A9b7sLl55wqP4UxVGlKCMg8ITtI37oLMnFQ5oV X-Received: by 2002:a63:8148:0:b0:415:6fba:af3f with SMTP id t69-20020a638148000000b004156fbaaf3fmr14338006pgd.277.1657509020753; Sun, 10 Jul 2022 20:10:20 -0700 (PDT) Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020a170902a70500b0016bd8071da6si6560906plq.473.2022.07.10.20.10.06; Sun, 10 Jul 2022 20:10:20 -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=fail header.i=@asus.com header.s=asuscom header.b=ekuZh4T8; arc=fail (body hash mismatch); 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=fail (p=NONE sp=NONE dis=NONE) header.from=asus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229570AbiGKCrk (ORCPT + 99 others); Sun, 10 Jul 2022 22:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbiGKCri (ORCPT ); Sun, 10 Jul 2022 22:47:38 -0400 Received: from ms.asus.com (ms.asus.com [103.10.4.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3644213DD4; Sun, 10 Jul 2022 19:47:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=asus.com; i=@asus.com; q=dns/txt; s=asuscom; t=1657507628; x=1689043628; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=v12qdOoNBgSKK1OOxqsA79EWSPpi7JefJH3nHtUIn+I=; b=ekuZh4T8I5SBHIYum7uXwjkq88FQGjvv0LOxl6ZcArQj+IYTKYaeG4Kp HXylMdwpZs/rwnF/ykFczKcnSsgSqq5Ss3sAGytEUbqtTOiHHGuRXhRbG q7xaQ/2qVkYK13uNzm1x9jZzPASL0O0p3oG8qFwN7609AVvR8svCd3DYt c=; X-IPAS-Result: =?us-ascii?q?A2ElAAB9jsti/zMvFqxaHAEBAQEBAQcBARIBAQQEAQGBe?= =?us-ascii?q?wcBAQsBgiOCWYxwhWqDAgOCI5kmgSwUgWgLAQEBAQEBAQEBBwEBQgQBAYUEA?= =?us-ascii?q?oUNJjQJDgECBAEBAQEDAgMBAQEBAQEDAQEBBQEBAQEBAQYDAQEBAoEYhS9Gg?= =?us-ascii?q?jUig3UCAQMnUhAgMTIlBgENBYJ9gxmufDKBAYIUBIdnCQGBMwGJW4Qle4JQJ?= =?us-ascii?q?m+BPIIshA8BEgFNhg8EjRWEIoZvgkw5AwkEBwUuLxKBH2wBCAQGBwoFMAYCD?= =?us-ascii?q?BgUBAITElMKDAISDAoZDg5DFwwPAxIDDwEHAgkQCBIlCAMCAwgDAgMbCwIDF?= =?us-ascii?q?gkOAx0IChgSEBICBBEaCwgDFj8JAgQOA0AIDgMRBAMPGAkSCBAEBgMyDCULA?= =?us-ascii?q?wUPDQEGAwYCBQUBAyADFAMFJAcDIQ8mDQ0EIh0DAwUlAwICGwcCAgMCBhUGA?= =?us-ascii?q?gI/LTkIBAgEKyMPBQIHLwUELwIeBAUGEQgCFgIGBAUCBAQWAhAIAggnFwcTM?= =?us-ascii?q?xkBBQ5LEAkhHCcQBQYVAyFtBQc+Dyg0NjwsHxsKgRUsKxYDBAQDAgYaAwMiA?= =?us-ascii?q?hApBjEDFQYpFRQaEwkqgQAGIh2cHhNpUBAbFIEDK2URBECSMR6DEAGLFYISn?= =?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5ZnOzfKlHbak7DH6tmpN 9dmstFeaPN5DpB/KDHCWCDer5KqrjmzEnrv5ak854Ed3AUV0gK1XYcNu/0KDwVeOEQbqBJaK Z0q/A30QaISDAyVICWF3MFV+/Mq5nik4/nWwcPA1oC5BOVhT2lxbbmG1zAty1uGw9n8PMHyy zoggb57qKsv7WSzQLd7Xba69BzlMH6wtVOKcSQgow+KynqiCyveIN9Mofy9QwdkaWK0hIHgd PMqxAvM4Ba7G7QRHi8pV/X1wzpwF8Vmgrf4G7dpUGmjd3yRTo8BcYEr5leaAHl500pu8w5+L 5X3kqC3qAnQC/orWDY3ZzlRhtqnk27rT4JiugIlUFSVoMYdft4sZEfxkVIC50NdRiKorzPKN MeQ/002cwmP29zNxvizyhSKZ2XLz8O9y69MwQ/Upf/6UkXoJh7p3FotvD30E1wt67VcKM0l9 gsAp4Y5Y2mcfVmHp6VfN1xOPdfKla9NS4kY1jiVmgPUpt3eU4kYfbMkfAIDCLDQu1N8HNJ8q 6xFm+x7gQJChvT4Ynk5uwQzvgJKF/NGggEDqlllsBEUnqVfsuxDRG+ X-IronPort-Anti-Spam-Filtered: true Received: from tp-mdinter-v01.corpnet.asus ([172.22.47.51]) by ms.asus.com with ESMTP; 11 Jul 2022 10:47:05 +0800 Received: from TP-EXHB-V01.corpnet.asus (172.22.6.13) by TP-MDINTER-V01.corpnet.asus (172.22.47.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.9; Mon, 11 Jul 2022 10:47:32 +0800 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (104.47.110.49) by TP-EXHB-V01.corpnet.asus (172.22.6.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.9 via Frontend Transport; Mon, 11 Jul 2022 10:47:31 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hQkzeEPz5rvoXBxk+e1SGDwUButDozMYIUTy4nGJlgMazd8KDc7p80cYY8H5e5Ty0e5NSN2ZfmmFuDg3D91XmIEsn+ELZIDALyD5oHCsSsRXQBJndmcPa0Nic5dzH7Z3PezyPi7ttSlv5aRdl3AJQoFOCTt6ETs0/CfuLgt65Lgviu9IG3lrgaNpGyLk5BMvuQYUU0OjxxZ7zTRxaMBG4cJM9KRrfjxnwo07rjNIYtTgO+vuxF5tEMEQzhY0/rrHHuPiOHJuhfN0ISdCkLcBqgqos2b56SfAnH4mV5FdqwPo/8AJrdVH+I40JQmQaoS3OYyQvlXU6jeX2hOXUa1qYg== 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=EFZPJEdbo501c3XbJ7wSPj94gg76+/BoRPTi3Bt7x38=; b=LUvZ+1SxKQ80p/eJeq7+rbwrQQQWcgj3U4tl11KikgyeEIv46GiU7vdEZLxVSyxSxrTKvz+ZLg5RglFKzrMp5/j4RKafSlIwPvEeBUp/UgIW6M5ld/2AIhTRLgWmbUdirheHXoGpn8mA6y+3QpONeWKvqU1rErudHzkcoxaVPbWe7BVzquyONN774+nmGXAFTemGDwsQhUk5gVh/52S8iLVYf4U7kINO8/avZDpe65uCafu2nlDDBFJcEfnZilqv6NbbIuiJqd6rPXeA0FcojK3zShxYWb13xkL0G4+DEE4dZrF7V7YkFNlAkREIqzUluUxUmoHtI+22686Qp+/9fQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=asus.com; dmarc=pass action=none header.from=asus.com; dkim=pass header.d=asus.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=asus.com; Received: from HK0PR04MB3363.apcprd04.prod.outlook.com (2603:1096:203:8b::14) by KL1PR0401MB4274.apcprd04.prod.outlook.com (2603:1096:820:26::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.17; Mon, 11 Jul 2022 02:47:24 +0000 Received: from HK0PR04MB3363.apcprd04.prod.outlook.com ([fe80::5032:7603:6171:2fc1]) by HK0PR04MB3363.apcprd04.prod.outlook.com ([fe80::5032:7603:6171:2fc1%6]) with mapi id 15.20.5417.025; Mon, 11 Jul 2022 02:47:23 +0000 From: To: , CC: , , , , , , , , PaddyKP_Yao Subject: [PATCH v2 1/1] platform/x86: asus-wmi: Add mic-mute LED classdev support Date: Mon, 11 Jul 2022 10:47:18 +0800 Message-ID: <20220711024718.1700067-1-PaddyKP_Yao@asus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-ClientProxiedBy: SGAP274CA0019.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::31) To HK0PR04MB3363.apcprd04.prod.outlook.com (2603:1096:203:8b::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4e977fa8-157f-474e-2a18-08da62e7ae8e X-MS-TrafficTypeDiagnostic: KL1PR0401MB4274:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +kIAi0mSg9JXLAtOJ46a2LteFyK4rhrttQvolBgSsTFfWpUq4KkNzGPlMM/W/RLTfWD+NIjg4WAaccDN9Npu5+g1J1R2jGeS8gwiuSg3XHsqEFB1fbHNH+lSiuS24pRoTLY0LV/wwcmr6Iv2FBVKM7HLSyRsbs9XLEnK/BgTy9WwzVkI2GkV7loBM12iBYN+UcKP2l4+Arss9Bk8RQ0y3cv9e84G50XlkvrBIgds/0Wt8dX3K/gYhWFh1m/0Ho348O6BuO1IY6Q5KyPP5z9kM5VzU33VzsERe0xLl/K/mz2mripHYfsMZZgoIg61RGkExnmBzlGQDV86/THuVFi3oa+9NAOtOYshwkHWGvUd3PbXXkb7MGn3okoE41+cV0utMsf8PUv+Yt/ZGijNUZpiQNXXzTPRxwG8OjSqeqaEMm9QsGPPDp+ofaD76pJC5G6a7lgEActqRWd4NSN2tCR9+QNRQRPmo6W7LcZy/ishe192bTVHmNwFOXh/v35dOGyE63qYe7iui9P66Xn/eXSQnH7fmnMQTqoWfYvckXErRGy3ifN2Y2mwqJJikdRk+MosiARhQ4vc4dOjgLIic/twBWTMJKhY5+Ug8F2Uqr3MBIKS8TbZwqR2tjU3JbffYblRXhJN1ZMWyp4m/1Vn0DWplGyiX5Fnk6yH34b9llJ0jZ+7jWCmnoMYesdeGcoPpM5UTiIhnGaPw1m2WVDq0GWv0/UnGULS124ct3aAgjaGEqbfQ4+wFSFuepcf+fJx+MJdlh9ZrzaW0waM9RtSxyvCUdxSeP5gNQHNBYVc8+9Xh1Yn0GJD0x3yAyz2Rtuud1cT X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HK0PR04MB3363.apcprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(39860400002)(346002)(376002)(136003)(366004)(396003)(478600001)(6486002)(86362001)(38100700002)(38350700002)(36756003)(52116002)(41300700001)(6666004)(6506007)(316002)(4326008)(8676002)(66556008)(1076003)(66946007)(66476007)(186003)(2616005)(107886003)(26005)(6512007)(9686003)(8936002)(5660300002)(2906002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?5Yg1zVpZePxT0WbL4XsOrvXmRlXg+MECr7DTPAQPCfyOFDqohIK8zIoWvGgR?= =?us-ascii?Q?ELYI+jgLb/DIHDZdwpGv7QMtDKDMRpHJ/aX3ZvKoH/dvp5G04fOA3sP9jZhN?= =?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GL2ST8J147ZpR1J?= =?us-ascii?Q?fnPdZ3iw2rRD4fFMujH13QG3CxdCpDN0OLUmNmv5xCJiwem/cgIX7OTowNSc?= =?us-ascii?Q?1mOUfSBy31FimYysmHr0RwoIdsUcwumKfVtdMfXNC2vwTdy+1j6TxuEdqD/8?= =?us-ascii?Q?xUjv0Cr6414cZToREqCaf10NdyrphxAjmDvd8C2gjnzc+RQHuieWUHA8NLa+?= =?us-ascii?Q?RRpL/UmiVXjI+cJ6/Fs1tywAFzXu9YBDLTCproYxLiCldT9PJJyrwxWGsNlI?= =?us-ascii?Q?KdyCHCyku7zZ8efwQDmaES36ImxAk3c1E/luXu855msbFHUWYbR+8wD1ucFd?= =?us-ascii?Q?0bUmKt/7KaYI0LdW59JZz772YOO+AZeIn77mkqaJ6fdU5RI4JvtPrCZn98rP?= =?us-ascii?Q?u0BCwcMYBxkfqwuIxRvnaxW6//FEKILdJpROgHsY6kzDeOU4409eZq0lqBEv?= =?us-ascii?Q?LkiaV5hBUUbYtqz7Dk9zHGEaqpSlJ2TP16jsBN0Oz+BDlYU294IBv3vPaQBQ?= =?us-ascii?Q?ljIFhtXwlPh91ux8Mz4ZC7O0qoTrmPGgwfp9A8SwySFfcOlW2tBg05OGd9NW?= =?us-ascii?Q?reXNRiVPBPtQCfea0DSSTHpOg3ph0z5xY/vDhPwo?= X-MS-Exchange-CrossTenant-Network-Message-Id: 4e977fa8-157f-474e-2a18-08da62e7ae8e X-MS-Exchange-CrossTenant-AuthSource: HK0PR04MB3363.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2022 02:47:23.3272 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 301f59c4-c269-4a66-8a8c-f5daab211fa3 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: alboumIZS3iLGVK7uy2PH6uIuidrucTvqNpjVl6Ln/tB6QYR0eXayIngNbxtPITpcN+WW4S1QZ46Wkk68aadLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0401MB4274 X-OriginatorOrg: ASUS.com X-TM-AS-Product-Ver: SMEX-14.0.0.3092-9.0.1002-27008.003 X-TM-AS-Result: No-10--0.460400-8.000000 X-TMASE-MatchedRID: cSoPLjBYd52aX3HcZnS3oxqkhv3OdF4DRealVAhocE8kt9BigJAcVnsA kVNIIeDNmC+wH+KoDcoUH8PmWo2hhU1QH6PUk2DDWFHKJ2wSViSHqfCKxjr5zToUdFbHYUawvwU evDt+uW5/XjpbSJS7a0sBtygzCPHvc33gkrfTLYhYXl/bcXwbaJgYcfOfx5hmL31P64kiV5EDX/ yNv61n9Fx7oGogKAw03A+tqr+Jdv4hlf8RDoxNxbi7edL7cQQOqpDGltbclm+XBXaJoB9JZxRFJ Jyf5BJe3QfwsVk0Ubt2gyyw2xTBhQfyBxIYiPiHLb/TnAA5T/j2KEMsqThyxWglOgQVZjpsovWR HzgG4oYcU9I/IyxDZ6Qb5DSZmGFThuubwEHkXAZqJhpJfFffAlO4Oz5PE/4VljL0yikcb06cNiH 8pmBc7ub/tUPjMeNRVOmr9EvEY/s= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--0.460400-8.000000 X-TMASE-Version: SMEX-14.0.0.3092-9.0.1002-27008.003 X-TM-SNTS-SMTP: D7D699F25793026FC161EB824B2464A7BB9ABAEC678A8E0F775E3D23B14E50C32000:9 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,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 From: PaddyKP_Yao In some new ASUS devices, hotkey Fn+F13 is used for mic mute. If mic-mute LED is present by checking WMI ASUS_WMI_DEVID_MICMUTE_LED, we will add a mic-mute LED classdev, asus::micmute, in the asus-wmi driver to control it. The binding of mic-mute LED controls will be swithched with LED trigger. Signed-off-by: PaddyKP_Yao --- V1 -> V2: fix typo for 'present' and remove unnecessary pr_info() log drivers/platform/x86/Kconfig | 2 ++ drivers/platform/x86/asus-wmi.c | 25 ++++++++++++++++++++++ include/linux/platform_data/x86/asus-wmi.h | 1 + 3 files changed, 28 insertions(+) diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index f915cf67aa26..74769050b770 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -274,6 +274,8 @@ config ASUS_WMI select INPUT_SPARSEKMAP select LEDS_CLASS select NEW_LEDS + select LEDS_TRIGGERS + select LEDS_TRIGGER_AUDIO select ACPI_PLATFORM_PROFILE help Say Y here if you have a WMI aware Asus laptop (like Eee PCs or n= ew diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wm= i.c index e14fb5fa7324..40c0e00a4b71 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -191,6 +191,7 @@ struct asus_wmi { int kbd_led_wk; struct led_classdev lightbar_led; int lightbar_led_wk; + struct led_classdev micmute_led; struct workqueue_struct *led_workqueue; struct work_struct tpd_led_work; struct work_struct wlan_led_work; @@ -906,12 +907,23 @@ static enum led_brightness lightbar_led_get(struct le= d_classdev *led_cdev) return result & ASUS_WMI_DSTS_LIGHTBAR_MASK; } +static int micmute_led_set(struct led_classdev *led_cdev, + enum led_brightness brightness) +{ + int state =3D brightness !=3D LED_OFF; + int err; + + err =3D asus_wmi_set_devstate(ASUS_WMI_DEVID_MICMUTE_LED, state, NU= LL); + return err < 0 ? err : 0; +} + static void asus_wmi_led_exit(struct asus_wmi *asus) { led_classdev_unregister(&asus->kbd_led); led_classdev_unregister(&asus->tpd_led); led_classdev_unregister(&asus->wlan_led); led_classdev_unregister(&asus->lightbar_led); + led_classdev_unregister(&asus->micmute_led); if (asus->led_workqueue) destroy_workqueue(asus->led_workqueue); @@ -983,6 +995,19 @@ static int asus_wmi_led_init(struct asus_wmi *asus) &asus->lightbar_led); } + if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_MICMUTE_LED)) { + asus->micmute_led.name =3D "asus::micmute"; + asus->micmute_led.max_brightness =3D 1; + asus->micmute_led.brightness =3D ledtrig_audio_get(LED_AUDI= O_MICMUTE); + asus->micmute_led.brightness_set_blocking =3D micmute_led_s= et; + asus->micmute_led.default_trigger =3D "audio-micmute"; + + rv =3D led_classdev_register(&asus->platform_device->dev, + &asus->micmute_led); + if (rv) + goto error; + } + error: if (rv) asus_wmi_led_exit(asus); diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/pla= tform_data/x86/asus-wmi.h index 17dc5cb6f3f2..38ee75874d11 100644 --- a/include/linux/platform_data/x86/asus-wmi.h +++ b/include/linux/platform_data/x86/asus-wmi.h @@ -49,6 +49,7 @@ #define ASUS_WMI_DEVID_LED4 0x00020014 #define ASUS_WMI_DEVID_LED5 0x00020015 #define ASUS_WMI_DEVID_LED6 0x00020016 +#define ASUS_WMI_DEVID_MICMUTE_LED 0x00040017 /* Backlight and Brightness */ #define ASUS_WMI_DEVID_ALS_ENABLE 0x00050001 /* Ambient Light Sensor = */ -- 2.34.1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D This email and any attachments to it contain confidential information and a= re intended solely for the use of the individual to whom it is addressed.If= you are not the intended recipient or receive it accidentally, please imme= diately notify the sender by e-mail and delete the message and any attachme= nts from your computer system, and destroy all hard copies. If any, please = be advised that any unauthorized disclosure, copying, distribution or any a= ction taken or omitted in reliance on this, is illegal and prohibited. Furt= hermore, any views or opinions expressed are solely those of the author and= do not represent those of ASUSTeK. Thank you for your cooperation. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D