Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp393830rwr; Thu, 4 May 2023 21:45:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6AFSo76+IL0/w0hVJIJJaV1KqJHpr6nm6itxNnXfp6SNV35fvD4hC1oGnRsWKA5HZox9IE X-Received: by 2002:a17:90a:8a8c:b0:24e:5344:9c9d with SMTP id x12-20020a17090a8a8c00b0024e53449c9dmr157450pjn.38.1683261908536; Thu, 04 May 2023 21:45:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683261908; cv=none; d=google.com; s=arc-20160816; b=qPD/tFNeDrhkryqSxcNcqTk0L9lVKDz6oUCREzC7vZKRYrGjyjGrS7/hv7TZckFkUf 3SQRZtbpiga2ADyS1BuNsiqCkp655XNqJ7iYodZD1hOQwjaYnMNCBj18LhBEjxo21FC4 baqRFGUPaHcLRNXBMiwo7NBsr+LFtaXrOeG/FCY4g7J8e5UUukK90w3m+5AXGmCeP+db Mw4prF+BZZQTO19fIanDKikbx4mocW+vORc4qFVHo0GrFq2X3A1gCmkb+f4LBNrN2NP3 dXPjz5v8bSsElh45tHdFxAXi/hnzOohjx1jtXMpeuuJTlyNrD+bnRJ1sl/fTiyNm4qnb vD7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=XES4iXxvckkCMX5/y3MP9xkYumxYm3xAmwtlzCAmBro=; b=Xl6xhgHHLmv+r2Buv3CXL3N7P1wsESPUXQbTCp2gJjbebcn+VvRS+4LHSIhNdTSvbG 4J+rdhoeCHRv4YE4OqUZNRgDebBrVQgRCsagbzApqiXUJNwr8YJ4iy2zWpGTupVDlA9T OTAlTbL1iEZpnqY0XHx02JOCMdGSbCPauJHVVW4ppEHdV6W4eeRfMq7qPBJMAZYZcPNg EEomCmY0i98D4hOjvVrvgIgZWritSNgI97RH2SUldJw6YhSsa6ctT/MoJtwievB4uJrT 6ZyqsB4zL+A6Z83lHy5+fvUYEMmXMCgRQNa/eIn4gF8PiRkfPpL2/nysbNeyCu5y8Sr1 iw4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm1 header.b=S5HnNHCh; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="Lpe0zno/"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lx6-20020a17090b4b0600b0024e4df1b2e3si5711960pjb.123.2023.05.04.21.44.52; Thu, 04 May 2023 21:45:08 -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=@ljones.dev header.s=fm1 header.b=S5HnNHCh; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="Lpe0zno/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230249AbjEEEag (ORCPT + 99 others); Fri, 5 May 2023 00:30:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjEEEae (ORCPT ); Fri, 5 May 2023 00:30:34 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF80B7DB3; Thu, 4 May 2023 21:30:32 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 99C6F5C032F; Fri, 5 May 2023 00:30:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 05 May 2023 00:30:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ljones.dev; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm1; t=1683261029; x=1683347429; bh=XES4iXxvck kCMX5/y3MP9xkYumxYm3xAmwtlzCAmBro=; b=S5HnNHChOgIJ0q5uWly47dNQNA D1bnvTQWYP3znhOYUFwDZJtStavdgiJMHNKLa5QQFiDm7bj+4PGgvcxrt3QjT4ia /7i1PhjpdlIaITlLB8mrtb9QmiBAbLYuZ8vR2Axe3vWF+jxUN/Dx1qt3PEpGaRa3 P9UJgKtNPdKVwEh/m8we3F/nu6Nxn+1gyd0c34qwHlW3DhirQHN7h559VcT0NbvZ UJ+lKn7moKQhjlFshJ7qS4W+P5t9LD4P2CC4Mf24reEJmDsVq72rtWYJZ83ykGwm e/e4ld0+wDI/6u5YiazLWPtu19aEB3IY0GB1LPCCUN7D6hBq/Z78ad1sCycA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1683261029; x=1683347429; bh=XES4iXxvckkCM X5/y3MP9xkYumxYm3xAmwtlzCAmBro=; b=Lpe0zno/SYKOnMq13tCD/3rUzJS1C 3rVFwgrO1mPSQzQLQnrFmb8UFDY0rIpS3FFmg6jS1NiPPbN4iY0qiGqOyra/itGx 7fyt2voWoy2ccXQEU/uFw4Q/6AXAgJNgmarqnaPvvgllPHEAj7j+0IImT0sKmC0o W/63oHwxmgYBStWgiZ/N3YhBtiMsdbPeOvXZ64B57NyJBBeuXx24FO6B9D5QYSa3 SfQjJpHqumJl0NXEgsejlyNU1wqSCJ4NcN1L62dgaf4SKJ/S/KbKSUNFoKBla5X4 6rbOQv71JBKnIHh00RQstDGnr+Lxyr4I5p1koGSpPrN79+kZRN/3cLZjA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeefuddgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpedfnfhukhgvucffrdculfhonhgvshdfuceolhhukhgvsehljhho nhgvshdruggvvheqnecuggftrfgrthhtvghrnhepgfdujedthfduudekffefkeeiffdttd dvhfegudduueffuefhfefggeefteevvdegnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheplhhukhgvsehljhhonhgvshdruggvvh X-ME-Proxy: Feedback-ID: i5ec1447f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 5 May 2023 00:30:24 -0400 (EDT) From: "Luke D. Jones" To: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org, acpi4asus-user@lists.sourceforge.net, hdegoede@redhat.com, corentin.chary@gmail.com, markgross@kernel.org, jdelvare@suse.com, linux@roeck-us.net, "Luke D. Jones" Subject: [PATCH v2 0/1] platform/x86: asus-wmi: add support for ASUS screenpad Date: Fri, 5 May 2023 16:30:12 +1200 Message-Id: <20230505043013.2622603-1-luke@ljones.dev> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 Adds support for the screenpad(-plus) found on a few ASUS laptops that have a main 16:9 or 16:10 screen and a shorter screen below the main but above the keyboard. The support consists of: - On off control - Setting brightness from 0-255 There are some small quirks with this device when considering only the raw WMI methods: 1. The Off method can only switch the device off 2. Changing the brightness turns the device back on 3. To turn the device back on the brightness must be > 1 4. When the device is off the brightness can't be changed (so it is stored by the driver if device is off). 5. Booting with a value of 0 brightness (retained by bios) means the bios will set a value of > 0, < 15 which is far too dim and was unexpected by testers. The compromise was to set the brightness to 60 which is a usable brightness if the module init brightness was under 15. 6. When the device is off it is "unplugged" All of the above points are addressed within the patch to create a good user experience and keep within user expectations. Changelog: - V2 - Complete refactor to use as a backlight device Luke D. Jones (1): platform/x86: asus-wmi: add support for ASUS screenpad .../ABI/testing/sysfs-platform-asus-wmi | 2 +- drivers/platform/x86/asus-wmi.c | 132 ++++++++++++++++++ drivers/platform/x86/asus-wmi.h | 1 + include/linux/platform_data/x86/asus-wmi.h | 4 + 4 files changed, 138 insertions(+), 1 deletion(-) -- 2.40.0