Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1637779imm; Wed, 10 Oct 2018 19:16:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV60efASTcirpLp+X8bmMw9UXnwQRC0doelYKIP93ut4korozwf0DPbVxiR6O874hrbBBTNYH X-Received: by 2002:a63:1411:: with SMTP id u17-v6mr31408159pgl.247.1539224160785; Wed, 10 Oct 2018 19:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539224160; cv=none; d=google.com; s=arc-20160816; b=LecKAblDj5m8nLbpcQkZOBdlLfw/HVMEQiU16HrtkzdKeN7OTXbeB9FAhFGiqVe3mw 1uFXStOPoOazDbpHRYCs7QKs/km3qn/A22vzxAoEzzF1ENuNUY9f/b1XvKXo75rO9J1U qgQ9Ly1x/anaJfZBK1+oxupswYvd637AC+RxYQ9+Zs3EDZm4XcF/qEf7DAMJ9WJgAC/x dVNGA5kDaKYyuZ+UfZL8wx/84i7K88yIolxa7PKIDEght/+mKp4XEK8Mnrme7c2X5qO/ i4kQL+dmHpkhCMc1mC2rveGcJPHGdjdG8S6QJ7PTOJc/VPfkV9y2oyJoOURC+mEqtanG SQhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=D+O0pjJIwq4BL7f2f6iWE3bMiUceqiosooNhxDNa6JQ=; b=f1dNBT/Y1ZKcNABs5W/G23HmbeYq96BlSndqfDAZLJG76HkzsPZeLKakoVsBNBjxU7 TEY6Dusqht0Bij5KCtIMqAK5XtiXZ2knfjBfchJCzsMFVYAQKajY40UagI7rQA/lPX4O nR0GmYfg6EYuWtBcnUVD+v4u9Q2Aky+fALE1re5totqhKyeOqN+d3CwdaytxScbMaVjC 4j7v6FgdXWgKvJG0kv8gOJGyfXGNRisHxzjeMWYnSEfaVRRpi/1GNCSLqUEKygGxgiP/ G5bIvNMZ9KjSyk6U/J48VQt05An+uA3+NEIaE0AYpUNP6O49IPdVDNAUkHmELjoATQXc /0UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YaJ3JTnr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h25-v6si27602781pgn.567.2018.10.10.19.15.43; Wed, 10 Oct 2018 19:16:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YaJ3JTnr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726789AbeJKJa6 (ORCPT + 99 others); Thu, 11 Oct 2018 05:30:58 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:45511 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725971AbeJKJa6 (ORCPT ); Thu, 11 Oct 2018 05:30:58 -0400 Received: by mail-lj1-f196.google.com with SMTP id j4-v6so6690000ljc.12 for ; Wed, 10 Oct 2018 19:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=D+O0pjJIwq4BL7f2f6iWE3bMiUceqiosooNhxDNa6JQ=; b=YaJ3JTnrl7NkddYOJyc6FOkdss1rZQLedhn01mfOlE8MOtYZh0Kbuo88FO+kAQrVuf BBJr7lMRjlkSdm+A6es7l5G6aLb0yWqa0+dJgheTfzQwFx9K9JrEfG9UzeNNXWOPH/dm A/7vFLItBAMPwAkJCG4HTBa5jBEBZvPW0kfq0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=D+O0pjJIwq4BL7f2f6iWE3bMiUceqiosooNhxDNa6JQ=; b=Zdk9OrzM8KWVG6pHSmWwP3S+VwqP7PRlFKNjjDM1SZDDkkCL21vYhDjJiZhV7Jfw60 ql8ObyhcpXBt9oWoBf7uD11AhnfACF1vIoUP4HKTVEZWQFV5f7IXBtEnncGesrxN08+i F5JW+nH6Lo9j+zAQj3UtoFV2kpZw27sAmdbZtxoKWE6XRgBEWEpjfbNP8dCoMxNAurt+ WmnZjwerbrCZ5gN6fBf3DcIwaF/nAkyF05jzjNySpl9MZ+JFHKzJAMIb7VnvK/lExm25 osI4GkWrXExz+5YpTOuQSztmFYGldBaNT8IsJJJPJSUeDEgKUZ6REP8W5beWAcHnoTNA qAQQ== X-Gm-Message-State: ABuFfohHs7NcFutuf5coYilax+RiNw41/KSBkJ0gIKYnNzjmj8GcmdQU /4R6sCyUiIN22NTHowMaDk5ziwT4v3Jg9uUjnXH+iQ== X-Received: by 2002:a2e:3101:: with SMTP id x1-v6mr19783504ljx.83.1539223558955; Wed, 10 Oct 2018 19:05:58 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:95d7:0:0:0:0:0 with HTTP; Wed, 10 Oct 2018 19:05:58 -0700 (PDT) In-Reply-To: <20181010160041.GA22121@amd> References: <9bf6236e-83af-7156-b26b-7d88ece2d81e@gmail.com> <20181010160041.GA22121@amd> From: Baolin Wang Date: Thu, 11 Oct 2018 10:05:58 +0800 Message-ID: Subject: Re: [PATCH v14 1/2] leds: core: Introduce LED pattern trigger To: Pavel Machek Cc: Jacek Anaszewski , rteysseyre@gmail.com, Bjorn Andersson , Mark Brown , Linux LED Subsystem , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pavel, On 11 October 2018 at 00:00, Pavel Machek wrote: > Hi! > > [Oops. I wrote this but forgot to send it? Anyway.. I guess it is > redundant now.] > >> > +++ b/Documentation/ABI/testing/sysfs-class-led-trigger-pattern >> > @@ -0,0 +1,76 @@ >> > +What: /sys/class/leds//pattern >> > +Date: September 2018 >> > +KernelVersion: 4.20 >> > +Description: >> > + Specify a software pattern for the LED, that supports altering >> > + the brightness for the specified duration with one software >> > + timer. It can do gradual dimming and constant brightness. >> > + >> > + The pattern is given by a series of tuples, of brightness and >> > + duration (ms). The LED is expected to traverse the series and >> > + each brightness value for the specified duration. Duration of >> > + 0 means brightness should immediately change to new value. >> > + >> > + 1. When doing gradual dimming, the led brightness will be updated >> > + every 50 milliseconds, so the duration of each step should not >> > + less than 50 milliseconds. >> >> I'd like to avoid this constraint. Lowest supported delta_t should be 1. >> >> We should only prevent entering dimming mode if current delta_t >> is lower than UPDATE_INTERVAL. > > I agree that documenting it like this is strange. I don't think this > should be part of ABI as we may want to adjust it in the future. > >> I also propose to make the dimming interval configurable via sysfs >> dimming_interval file. > > I believe we should provide "right" dimming_interval. 50msec sounds > good. If we find it is too low / too high, we might want to adjust it. > > If we find out that different users need different values, I guess we > can still add "dimming_interval" knob, but I'd suggest waiting until > such need arises. > > [Now, I don't have strong feelings here, and patch would probably be > okay with me even if it has dimming_interval, but I'd prefer to keep > it simple. We are at v14 of the patch...] Make sense. I will leave this feature until someone has the dimming_interval adjustment. Thanks. -- Baolin Wang Best Regards