From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CE37C2B9F4 for ; Fri, 25 Jun 2021 09:18:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 50A906141C for ; Fri, 25 Jun 2021 09:18:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231260AbhFYJVI (ORCPT ); Fri, 25 Jun 2021 05:21:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24751 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231134AbhFYJVB (ORCPT ); Fri, 25 Jun 2021 05:21:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624612719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gf/AeSAoKtyKCgPiJUJSX6Cy8giuz8iiX2hwDNCu8IY=; b=K52sJHjCFxVxM8pEWQZmIEarFr/+0EJVeiPt0/QzftJNBaUQpGl5MvMJXzdhIKathE4KzX 9CMc4KcVfPxAHqcDPF822elFuEVwWiCkc1w7trImHwpwNWCHY5Vwy5cyJUpVWeC1FWxWXS CLeklOYf6et2i8prsROCPdMQ1RwpdyM= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-154-Gey-O0EGNX2tGAIMOjsLWw-1; Fri, 25 Jun 2021 05:18:38 -0400 X-MC-Unique: Gey-O0EGNX2tGAIMOjsLWw-1 Received: by mail-ed1-f69.google.com with SMTP id da21-20020a0564021775b0290395165c6cefso1567154edb.1 for ; Fri, 25 Jun 2021 02:18:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gf/AeSAoKtyKCgPiJUJSX6Cy8giuz8iiX2hwDNCu8IY=; b=KLT+AKaFu3J5jKuTvL0CY2xIOaBYccSSsSATz1eTm+x8N6N8s5MXrVaJCYUgb2iVY3 UQfFOcq0HiIWhiF9MzC9WUZrF+oeBYECSZCE2bztrhD0nVpRTWfrARDN7tqiaVwRXfPJ P8zbzbY4krBHIKoyF8zW8ViLEAYqshAgit1dVpEGibk2zhtBOXckWzM/wmUvPtatw4w3 ySI8zwSn5+phXJyQPs/xa9WcwIBsXoDtmSa1kEbtjnh224Etmhq7M7KYJAnTpFk1oczh PQS5vPlhmFSUTEyvPtuk+54DiZH88nI1Dj5WNe7U2+4y+YhPKPt+RdBtQcNLU6ZM+gKy cVRQ== X-Gm-Message-State: AOAM53151ZWMkIFXOyuqGdYx+mwgp0Jru0EgXQ/buiGVwoC8TuOHPAtb zQjGLJaiHxup8BEoGD5XkWGL2ul1hlxx+L/dZIFsdQy/r7WSHoeirVvBSNrkwl+FG8RsPsSfrz3 1i5PdsM2EqeH+XtttDYly+VoBUm/JtbIuNHX444U2sMEX/hOxNOHMyBWGxK8EZBO+h5bGiphpFP d3 X-Received: by 2002:a17:906:b55:: with SMTP id v21mr9857262ejg.88.1624612717394; Fri, 25 Jun 2021 02:18:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwh7EVIsP2CNobqkk7E06ElkvSjU/XKuwVJtF3n4RNaDTw5EmbEh6fSRptX6AttOApksLE7Eg== X-Received: by 2002:a17:906:b55:: with SMTP id v21mr9857240ejg.88.1624612717144; Fri, 25 Jun 2021 02:18:37 -0700 (PDT) Received: from x1.localdomain (2001-1c00-0c1e-bf00-1054-9d19-e0f0-8214.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:1054:9d19:e0f0:8214]) by smtp.gmail.com with ESMTPSA id gv10sm2456585ejc.46.2021.06.25.02.18.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Jun 2021 02:18:36 -0700 (PDT) Subject: Re: LEDs with hardware-accelerated patterns, suspend indication To: Pavel Machek Cc: Jafar Akhondali , Andy Shevchenko , Mauro Carvalho Chehab , mauro.chehab@huawei.com, Linux LED Subsystem , Linux Kernel Mailing List References: <20210526153040.GA4537@amd> <5fbbab4f-3e22-5a4a-eea8-2531ee165cc4@redhat.com> <79988fe2-7b3d-7485-131c-4f654ec6d8b8@redhat.com> <17ec2040-24e9-4090-e64b-8048f0b4005b@redhat.com> <20210623203925.GI8540@amd> From: Hans de Goede Message-ID: <59ac4a5b-7dc5-bb9d-e161-c0a7ceb9f399@redhat.com> Date: Fri, 25 Jun 2021 11:18:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210623203925.GI8540@amd> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 6/23/21 10:39 PM, Pavel Machek wrote: > Hi! > >>> Sorry for the late reply. >>> there are two categories of keyboard lighting modes: >>> 1. static >>> 2. dynamic >>> >>> In static mode, any of 4 zones can be configured to show specific color, >>> independently. >>> >>> In dynamic mode, there is no control over specific zones. >>> It's only possible to set some: color, speed, direction >>> and: [R]ed,[G]reen, [B]lue >>> >>> so in dynamic mode, the user can't control zones, >>> the dynamic effects take care of that. >> >> So we have 4 zones, which are individual controllable, so which should >> probably be modeled as individual LED class devices. But when we enable >> the hardware effects, then the individual addressing goes away and we >> set one effect which applies to all zones. >> >> Jafar, do I understand this correctly? >> >> Pavel, how should this be mapped to the led-class API? > > Fun :-). > >> Some ideas: >> >> a) Only add the new lpattern to the main zone? >> 2) Add the new lpattern to all zones, but only make it >> writable in the main zone ? > > Require lpattern in all zones to be same and active before actually > enabling the pattern? That seems less user friendly / a cumbersome interface I prefer one of my 2 initial ideas. Or maybe add lpattern symlinks to the other zones to the main zone, I think that is actually best because it clearly shows how things work, all 4 LED (zones) support a lpattern, but it is a single shared lpattern. > Decide lpattern is not suitable for this and figure out what to with > multi-LED triggers? Someone wanted them for "meters" (CPU load 25% 50% > 75% 100% LED bar)... I think true multi-led triggers are overkill here, in essence this is just a standard lpattern, except that it is shared between the zones. > Skip this hardware feature for now. We don't have to support > everything? Although it is true that we don't have to support everything not supporting this would give Linux a feature disparity with the Windows utility for controlling the keyboard which IMHO is undesirable. Regards, Hans