From patchwork Fri Feb 17 10:23:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Orlando Chamberlain X-Patchwork-Id: 5549 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp813654wrn; Fri, 17 Feb 2023 02:38:40 -0800 (PST) X-Google-Smtp-Source: AK7set+z+jq35Gng61bgRhqjtaRCnw+NVRr93pvGsZSdwfZivqrNJ4mU6bbsGFPIS+hL1OMakT4j X-Received: by 2002:aa7:978a:0:b0:5a8:8535:18b with SMTP id o10-20020aa7978a000000b005a88535018bmr726208pfp.11.1676630320060; Fri, 17 Feb 2023 02:38:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676630320; cv=none; d=google.com; s=arc-20160816; b=AOcOH9GFAC5r8bxDz8cJzUY+4tor0yzJk+j80EkfTNf0b911lM3EZL9ja3JhmQBUC5 1/Gz0mM5S1V4osHWNVgpGmSWJUzNbMdCjv9JHG+FhqECrjX0w6BNpZfBXIZxJbHh1eKx yVZcBRJq+DOxGG59W1BU2WoCH6PEoSonIAFPTooA+gjLUZZ3e/yVSFnaH7Yu7AMxRuQv RJ75AWy+mmWYzWh7qnpHdm+EeS0W7BkxCi1BEhV6E4eWU6GYh8SoVd5YRn/Ks3rbqmZ6 4UEFFGfWGDTGYKkPG9Qy3a5HCdd6ADSAc+6wdAqPn11ZGYCllSrIHE3hEG0dcE8wCL28 SExA== 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:dkim-signature; bh=uJsG7O5tTCs41MEzjTy+yVNOTt2BE6FSiradkkgB6LY=; b=C6MHdTO/sKCTuSJumln7hpltgmT1Vs+ryQ/9We3cxuTZ+KNw+TYaJ0R/zkPCQ4QvTv SATYDq+YcZ6pAx/h6/ikLjNUI8lpA979aTngH+oEMRxUFJVguStKyhD7N1mHxbjmJ1b7 eHhYi0gqsd38VfSNDLHFAJozdf07eZZoL6auW/LrGCuZH+QEhDP2C21QPQscpwOiwsvz hPPvbzNcDGB3MIvhSqENVx8VkEKNUZcZF4f+Cwze4sHR5iQ1k4zKK6w8rH1+FG9WoPz7 51Q7RfCkzez9Iq0h3FaHGoxLXgn9l6vd/iCl060CY/f8wJrJZjJu3/AUoIwqZ68yOZ48 Np3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="qRe/SGrZ"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020a056a00084100b0058d9266a507si4917548pfk.376.2023.02.17.02.38.27; Fri, 17 Feb 2023 02:38:40 -0800 (PST) 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=@gmail.com header.s=20210112 header.b="qRe/SGrZ"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229793AbjBQKYF (ORCPT + 99 others); Fri, 17 Feb 2023 05:24:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjBQKYD (ORCPT ); Fri, 17 Feb 2023 05:24:03 -0500 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 230D0627EE; Fri, 17 Feb 2023 02:24:03 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id j6so1027319plh.1; Fri, 17 Feb 2023 02:24:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=uJsG7O5tTCs41MEzjTy+yVNOTt2BE6FSiradkkgB6LY=; b=qRe/SGrZbP7S0qB9hiMc5M1htwbpekmT/G5x9ZA0EQu3n9VLPMX+5QJItPSWqtrBRX rCm0ewMrretrkegnrYkYrIHzvRsNN0CPNgcQ9uCKORPISWhwlhJAaTq1xioliLffKeJy 0Cd/Gpq18fvdCsqtB9ZTsjxj5VWMdnYWV9VTBmrhWKDYdtzJAuVZcE0P9RsqoPIx02oS Pz8BeK7GBmmDWSQZSpkusQWRH1v0s+RAKzcrHM+HHHzu7V+eutlJBCDw7f1SDruqNtTU 3Xz2eDC+V3UVd16CcUfpCNbOGQP74SQ6t4SFJylmcON6nnhR04ebKh/8nz2oB8x78ihO UO1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uJsG7O5tTCs41MEzjTy+yVNOTt2BE6FSiradkkgB6LY=; b=T14qo4+uKxG+YQeakYAJ2R+i6b+1Q0gp1wcL9PCRv1A3La+9DbYSqRjA2B5GIxxIDd Phn1C3MCyhnsUS20UuJw5lJ4zRVDYz/ud1nOkHN4W03R5LmDZgIP3WEggcqiB0TIKZ17 yzlftdFAgpgJaAP+J7iuGxDbqHtRSM69PfmR3KviXamIOYETDCQyB+ggcrp40VZ3+tIh A+2j+U5kloh4PKge5tjUXhnA/Y/ZfQvN9y4nq+yGOnYoKlIm1uomxUt/SAcC+WiNkvuy MvX054d2AufOvY7/qiGEUAx1dUjTL82uKY3DJauU2LgA7+q05DjHRmQwOLQTxJTdOwq6 xPRQ== X-Gm-Message-State: AO0yUKWFlreUko8X067svxqAqKcLlSp85yPE8B/dKan4aGGADnWIOi0k G14V0Pmshn2yM7UI2sN81rOsyor+xHDECA== X-Received: by 2002:a17:903:110e:b0:199:3683:5410 with SMTP id n14-20020a170903110e00b0019936835410mr422558plh.50.1676629442237; Fri, 17 Feb 2023 02:24:02 -0800 (PST) Received: from localhost.localdomain ([202.53.32.211]) by smtp.gmail.com with ESMTPSA id w4-20020a1709029a8400b0019aaba5c90bsm2832538plp.84.2023.02.17.02.23.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 02:24:01 -0800 (PST) From: Orlando Chamberlain To: linux-doc@vger.kernel.org, linux-input@vger.kernel.org Cc: Jonathan Corbet , Jiri Kosina , Benjamin Tissoires , linux-kernel@vger.kernel.org, Pavel Machek , Aditya Garg , Aun-Ali Zaidi , Kerem Karabay , Andy Shevchenko , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Orlando Chamberlain Subject: [PATCH v3 0/2] Apple Magic Keyboard Backlight Date: Fri, 17 Feb 2023 21:23:18 +1100 Message-Id: <20230217102319.3419-1-orlandoch.dev@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758074314211661375?= X-GMAIL-MSGID: =?utf-8?q?1758074314211661375?= This patchseries adds support for the internal keyboard backlight of Macs with Apple's "Magic" keyboard (MacBookPro16,* and MacBookAir9,1), and also documents what names should be used for keyboard backlight leds in Documentation/leds/well-known-leds.txt. v2->v3: - remove unneeded header inclusion - use s32 for report value type - remove unneeded null check - don't set drvdata as its never used - prepend "hid-" to module name v1->v2: - drop unneeded remove function - combine set functions - add missing header inclusions - avoid char as argument in favour of u8 - handful of style/formatting fixes - use standard led name ":white:kbd_backlight" - rename USAGE_MAGIC_BL to HID_USAGE_MAGIC_BL - New patch documenting preferred keyboard backlight names v1: https://lore.kernel.org/linux-input/7D70F1FE-7F54-4D0A-8922-5466AA2AD364@live.com/ v2: https://lore.kernel.org/linux-input/20230216041224.4731-1-orlandoch.dev@gmail.com/ Orlando Chamberlain (2): Documentation: leds: standardise keyboard backlight led names HID: hid-apple-magic-backlight: Add driver for keyboard backlight on internal Magic Keyboards Documentation/leds/well-known-leds.txt | 8 ++ MAINTAINERS | 6 ++ drivers/hid/Kconfig | 13 +++ drivers/hid/Makefile | 1 + drivers/hid/hid-apple-magic-backlight.c | 122 ++++++++++++++++++++++++ 5 files changed, 150 insertions(+) create mode 100644 drivers/hid/hid-apple-magic-backlight.c