Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1297217imm; Thu, 6 Sep 2018 20:14:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbOMAzBcd7mCQTyr3nswsZDEm/KzOltSpG4YxX2VXWZAyCqfWJ5Ny74fG8vgxscRVMdTjCg X-Received: by 2002:a17:902:7614:: with SMTP id k20-v6mr5863366pll.170.1536290064019; Thu, 06 Sep 2018 20:14:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536290063; cv=none; d=google.com; s=arc-20160816; b=dyzSrxOScu8sDHJKu4w1U82tVW52vN3xOnMdMGmN7I8TtlBlxGiYCGWeRqSRLAFwOA Y6oO5nS1KAe+z1JmMUYd4NjZqBuKp/iFs1Rq43yAxjARzn4+BmiPkmzKH+DgE+sK3Wnq X8eQmdKYu/9PVIsVDSpuOYnKlmcOwZG5NSOV1mXRGzVMBKf5FxnJL/ZcsPjdzHh6XCs+ 837UHYUy/tlQYkjzNLT/WPOpjWfc/unu4vKoRiP1+eA/oIMoFhYd+Li7/9GaIWk9f0w1 eQoV5mb3iQsrH+KkVQskuZhz9BoU4QDXWRoOejtd4+wdY3o7MgG4zDPmcFfVt/Il9gsg FoWA== 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=via2vtYsBTaftEUCX6rQPAWSsfaRKJPRmGji35pWP/c=; b=F02AU6JPe+IjnfxFSl1fcoBtDT70ZxFs60f0uWw2abPcBwHgtzlGMfkTfLx/c19gfW q1QTwcGKDoRhpDiZIPlcGUk3q5tDymbN7YguxKgxFPfqZwVT28+qds4qfEHWGRL88OBe q/K/biklrPEJD8OiM9XEVCCqwtiVF+dw1WLjAQ6FICCRptV59Wp2OeSncMYZ/elWUrNu gdIa/T7ipfe5hfJaQHtauUmXEfVeOhsnejI4fW8WpLrgPNpyz4SsgvDgxI2pultcCCav zqjTfamdASAJRq216l9qDKpUskUehhwgKXfliSjQHHbEHiQQNzHiz246TMm0aKsQrb5X To6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hdz50E9v; 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 b10-v6si7076805pgb.112.2018.09.06.20.14.08; Thu, 06 Sep 2018 20:14:23 -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=Hdz50E9v; 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 S1726436AbeIGH3k (ORCPT + 99 others); Fri, 7 Sep 2018 03:29:40 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:38532 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725954AbeIGH3j (ORCPT ); Fri, 7 Sep 2018 03:29:39 -0400 Received: by mail-oi0-f65.google.com with SMTP id x197-v6so24610838oix.5 for ; Thu, 06 Sep 2018 19:51:05 -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=via2vtYsBTaftEUCX6rQPAWSsfaRKJPRmGji35pWP/c=; b=Hdz50E9vOLfJzc7+ymUJKAlzLVn+7t56ygwwFL3wSmU55n6PtTsAlFFOG0u7EiZgpm 4YuJgZaLPnHbFV6132FkstVa5E54zdnPMezKbc7oMcXVLbA8Vrs3UN3Z+RFxFquZ/XCv UoDqiWhwOZVvvj270jtaim2CKuCBpI7vAGwy4= 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=via2vtYsBTaftEUCX6rQPAWSsfaRKJPRmGji35pWP/c=; b=Mjn/SBsbHxr6G5vxE7AluDLgdALu5bKngSjHitFsDHIXujywIP3Dv3eAJQk5KyWA2c MOsjKppBDzAS+zoQWOwAQns6rtDB9Kt1Ctu5W5ZHeM8Tssrp+1q/58DWKQMqBcf+KtrT WfsaO9a/MbaNbTGDz2H0vMt4xjStXCZBrWe5vWAvMGPkZqkb8uFTjdKAt4Ru34PPZoHg ZRBnlLQgIJxASfaWe6CPE6uz2XA1lx28j5TZpNosIWSPaAKLu9yk9QLaqT/xGl0nT30c fDn2vU7Ej50+ZIqN+2pmILw4UFSlfmwYJIaCOE6JRgjhTxZG5/scnLt0tyMRbFDclw/4 xExQ== X-Gm-Message-State: APzg51CBBne2Us4h4m5cDf6nADGYozeBpcfp0fx3Ezt/iGf6Lh1uK+JW rAV8Vh5ObC/oRNUbSNdUk8d1sxfw13+viKmuo4K8qw== X-Received: by 2002:aca:5b57:: with SMTP id p84-v6mr5803864oib.109.1536288664648; Thu, 06 Sep 2018 19:51:04 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:3ec8:0:0:0:0:0 with HTTP; Thu, 6 Sep 2018 19:51:04 -0700 (PDT) In-Reply-To: <20180906211605.GA16899@amd> References: <5a502ec29251c019ddad8f3314ab45fc0f6feaf7.1536200860.git.baolin.wang@linaro.org> <975a9570c75fb4469c0cef55cc9ed42266f933af.1536200860.git.baolin.wang@linaro.org> <20180906211605.GA16899@amd> From: Baolin Wang Date: Fri, 7 Sep 2018 10:51:04 +0800 Message-ID: Subject: Re: [PATCH v10 2/2] leds: sc27xx: Add pattern_set/clear interfaces for LED controller To: Pavel Machek Cc: Jacek Anaszewski , rteysseyre@gmail.com, Bjorn Andersson , Mark Brown , Linus Walleij , 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 7 September 2018 at 05:16, Pavel Machek wrote: > Hi! > >> diff --git a/Documentation/ABI/testing/sysfs-class-led-driver-sc27xx b/Documentation/ABI/testing/sysfs-class-led-driver-sc27xx >> new file mode 100644 >> index 0000000..d8056d5 >> --- /dev/null >> +++ b/Documentation/ABI/testing/sysfs-class-led-driver-sc27xx >> @@ -0,0 +1,22 @@ >> +What: /sys/class/leds//hw_pattern >> +Date: September 2018 >> +KernelVersion: 4.20 >> +Description: >> + Specify a hardware pattern for the SC27XX LED. For the SC27XX >> + LED controller, it only supports 4 stages to make a single >> + hardware pattern, which is used to configure the rise time, >> + high time, fall time and low time for the breathing mode. >> + >> + For the breathing mode, the SC27XX LED only expects one brightness >> + for the high stage. To be compatible with the hardware pattern >> + format, we should set brightness as 0 for rise stage, fall >> + stage and low stage. >> + >> + Min stage duration: 125 ms >> + Max stage duration: 31875 ms >> + >> + Since the stage duration step is 125 ms, the duration must be >> + a multiplier of 125, like 125ms, 250ms, 375ms, 500ms ... 31875ms. >> + >> + Thus the format of the hardware pattern values should be: >> + "0 rise_duration brightness high_duration 0 fall_duration 0 low_duration". > > If I'm not mistaken, this is: > > "0 rise_duration brightness high_duration brightness > fall_duration 0 low_duration". > > Right? Hmmm, for SC27XX led, there is no need to set brightness for rise and fall stage. > > With that fixed: > > Acked-by: Pavel Machek Thanks. -- Baolin Wang Best Regards