From patchwork Thu Feb 16 04:12:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Orlando Chamberlain X-Patchwork-Id: 5487 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp97890wrn; Wed, 15 Feb 2023 20:18:33 -0800 (PST) X-Google-Smtp-Source: AK7set/wbiyabdnSEfSrtrLRqGNoZoiZzSfSanKGWX1g7qSK79BX4C/NUTh+n6BIHdoxeq5sZ7s+ X-Received: by 2002:aa7:958a:0:b0:5a8:c3ec:e24e with SMTP id z10-20020aa7958a000000b005a8c3ece24emr3958039pfj.4.1676521113223; Wed, 15 Feb 2023 20:18:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676521113; cv=none; d=google.com; s=arc-20160816; b=cyKvLwTwliZ+GoznTR+jftEux77BA6+xxIj92RKSkgaSJkGh+XdHHPlwA9gaFs0U7K 6YOAvTkxJSGtw0hx7GMuVxfELgXDHDi3wksCW5XUyEcGefV2XK4SA9qHg02eaL1jbXav xJ78ianYG3fLy/AeOiOro/uV1+8Ycvdr0AvAdeGZZyr1+O8G0kI0YIoaG2xAUGiLfI3c uJkPk9FW//sHTDSeZK3VGqDYTZRoc4s/fP/Om2LUf+Rj2ZtonDo2yK+G+k1zl1pW8luB tpwIwMe2wjUMC1oYo5ARTMnloCrM7KdtQvxszGk9U88IDRamAUOdppCWRx6QMlZH5vQF pWRA== 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=hKu/tCqMWpC3njjVXAIhON9nLECE9a/6QQav2GblfJc=; b=aUZ5yykhgCq7NM4D+2o9An3JSAcO79ZRF1rIouUf7S4R16xdK0MEyNle2gaGLmSkPl WaziKLSq49HB7zyvK03/pL8LpMxbWbnpBOjcMXn1zAsTzdmF3TE2g2uCEDKOxeTfvCy6 aZXKXmmuYoC5dObGkZ0bKgSl5JvpcRCrr22TcGZ4sAcplbT2oEvstPZeKovA43t5V4/0 w47mxonTOnlS34/K9hhgG4S2sJOggnctQqvIdDRn4LVq7UWevn5RjJp927Zwojjloo5+ tg4e/8QIA0o8CJDBFbvFMnEMmlWdxWVxfsnHJ8/qmxWz/2Px4YYP3YozZBltQ3GDyZZc mJcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZkfsZjXg; 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 x33-20020a056a0018a100b00576c9c3c4aasi456813pfh.5.2023.02.15.20.18.20; Wed, 15 Feb 2023 20:18:33 -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=ZkfsZjXg; 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 S229605AbjBPEPr (ORCPT + 99 others); Wed, 15 Feb 2023 23:15:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjBPEPo (ORCPT ); Wed, 15 Feb 2023 23:15:44 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3F6234035; Wed, 15 Feb 2023 20:15:43 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id d2so677993pjd.5; Wed, 15 Feb 2023 20:15:43 -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=hKu/tCqMWpC3njjVXAIhON9nLECE9a/6QQav2GblfJc=; b=ZkfsZjXgTv+D4litlZpKtObGQpofrWp7Ug7tGDjWGWdKPW0Vfj1iQOfZPSrpDKAX4G LHOY8IoBjjpC5fOY6N2rzPDziuJKDvukZ9yiuC7czBRTFxPHZvPkglmEq/zQsJFAv7yz rPm/IV4C1SoLhloCOnFNZNfxFgwq/jSnQkkZjRjKlSBAkBTRqQ8eRz5/z3Q9IXmtMZLI LC7iOJMhP9ZtfT6hjlgyZavrympLOm/5R2V9+bitBfbfnHz/ymS8tM8A+Mjxc1oh/AGL Bpncn5ghth8c+ipTjyhPKmKc6XSUOAtOKUxrsXcOZE8jl4HiOfMBQ3a/BTyg+mMHuAXB T9iw== 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=hKu/tCqMWpC3njjVXAIhON9nLECE9a/6QQav2GblfJc=; b=N2wL9qj3c9AsgdvKkBM6/6kOE3nd+sXG1ZJGTraDtuMoIGRjHsGLUD4mEk7PgvuMqr ILf3pdP3yPAgCS26rtMu4mbeplppKoCSHuAHfZ450ugwzg2mMkjvByKcCF9UCeG9Oo4e f7MWlmWvUhxfaFoPxzu5mE3UlPSrSpsmhvCuvynJ+UqXO24jIX6olRsdcnA7YEofESsC eWntrQUSWyRdGrHzaihUFMn95yT7aqKUu9iDEhNaDAh/kJ7p5ZUBEgSG9Gpg1GtQh6Rx vIhGEvpQW8A8jsyBVdmWgB7lTlk+jj3bJ72iOcWx7qtZC/sz/Np+UrNTOK+x6ZoXt4/p WLyw== X-Gm-Message-State: AO0yUKUkb9G1jjxgpNZ2eZMlnlYr44ahd9cPGvYrwaMVr+9ncYRBl5hX mIOYP110ADYlU8T4L6JHP03Kl8nEaAmJxw== X-Received: by 2002:a17:902:f688:b0:19a:eef0:33a4 with SMTP id l8-20020a170902f68800b0019aeef033a4mr807064plg.62.1676520943077; Wed, 15 Feb 2023 20:15:43 -0800 (PST) Received: from localhost.localdomain ([202.53.32.211]) by smtp.gmail.com with ESMTPSA id ij21-20020a170902ab5500b00198d1993b4esm157539plb.69.2023.02.15.20.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 20:15:42 -0800 (PST) From: Orlando Chamberlain To: linux-input@vger.kernel.org Cc: Jonathan Corbet , Jiri Kosina , Benjamin Tissoires , linux-doc@vger.kernel.org, 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: [PATCHv2 0/2] Apple Magic Keyboard Backlight Date: Thu, 16 Feb 2023 15:12:24 +1100 Message-Id: <20230216041224.4731-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?1757959803104544226?= X-GMAIL-MSGID: =?utf-8?q?1757959803104544226?= 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. A previous version of this patch was sent alongside some other drivers here[1] but for v2 I'm submitting it separately to make upstreaming easier. 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 [1]: https://lore.kernel.org/linux-input/7D70F1FE-7F54-4D0A-8922-5466AA2AD364@live.com/ Orlando Chamberlain (2): Documentation: leds: standardise keyboard backlight led names 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/apple-magic-backlight.c | 125 +++++++++++++++++++++++++ 5 files changed, 153 insertions(+) create mode 100644 drivers/hid/apple-magic-backlight.c