Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp415535imm; Wed, 18 Jul 2018 04:33:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfomfxsui5/tRoyV1Z3OA03kGBWIkKuc/a1wrB/tPCb34us98w2zKIkNCOW3Y9alyTLlu63 X-Received: by 2002:a63:941a:: with SMTP id m26-v6mr5376316pge.82.1531913633793; Wed, 18 Jul 2018 04:33:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531913633; cv=none; d=google.com; s=arc-20160816; b=RX6lf9T4lGiGC1W+7Fhk0AwbTtXDrXuGG7ea8hcQki6rSU9CvVInBJkQloodUCezkm lXz7boFxp3tcJ2TrZaMepRGg/6lfgsaXbIM6HOUh+16pM0r/pJHj/ME9fG2IKOtE8hrs AwCI5/5PTlUx3zfmszT3UYqJFkb/6BAE20bAq3T0yxMyyx9ZZ5qZNamzdOZcLWA0gcY+ XOLINZ/bjI2DNi5IRqllnNJrM1AKGHF+pJMXxlZU+dNo+EONdZqyvE2O9hM/nFP8/gMS 9u089qtHA5YTAOl4qJXOtLVotDw1/u15qahlEo3vpNx6Pq/PcwKsY8kOtW1DnI2I0hfk rYyQ== 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 :arc-authentication-results; bh=G0UibmH5yuy24RRniXHxdqQ5+sTId6u5eAWXnlNnOtk=; b=xhwLk2NnOqUCzffzLFgjzCYUsQd+hJrUmcpVBWeromQjemfLC2AVwkglJUUHz3QoFw BXc9+1vaFI+9fwqN9V/k+7HG9pQLS3dGLrpFdq2mtOVd66N7uMOIvcTW5KK5Uxwk8o0G aqjJTg345HyJ36FcM/b7UVvnCu7I0OhjFUs5boKaWsfb95oiquf+CwO9hZIG5m+I7b4F M96/hv/3GQP+UTTaAxZPi4a4M6bQ/kwFxXFGEyYZLsYeX2UVnY1A4c9Zmk7qRnt0KXmi B0IwxCcEbJRs+HWQeda5apK6tcwbGsoHhRZDg5NZnjSGd7dyMGapdboSRDLudeyDJVsi DH0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cqdunkSr; 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 b35-v6si2989153plh.36.2018.07.18.04.33.38; Wed, 18 Jul 2018 04:33:53 -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=cqdunkSr; 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 S1730961AbeGRMJb (ORCPT + 99 others); Wed, 18 Jul 2018 08:09:31 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:33496 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726433AbeGRMJa (ORCPT ); Wed, 18 Jul 2018 08:09:30 -0400 Received: by mail-oi0-f65.google.com with SMTP id l10-v6so8125497oii.0 for ; Wed, 18 Jul 2018 04:32:02 -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=G0UibmH5yuy24RRniXHxdqQ5+sTId6u5eAWXnlNnOtk=; b=cqdunkSr0Av7hLsRa3uJIXgLUpcUHKv8KQpm/6/NCPkAS3iaBdfWYmvr9pM9wuAK6f vbFqs0UqTLDdvQgEVtUOEyNLHsgsF+qeAVGMc17x6IwR/p/oMkmu2O3mea+iaaqxbRZv EHmuw3o2S0dVcdm2rbQ1JNl5rL3mD1RePjtjc= 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=G0UibmH5yuy24RRniXHxdqQ5+sTId6u5eAWXnlNnOtk=; b=JZVZ8J7ByfpD+qPCd+GiHenkvSjHAOpc9nfLezuGGAhHPgPhCMWCIX3Ml7E5lTqEeu Xiv9JkSkreNFNpN7cWu8CrRbfRfw4XzOZUre1cexllGpZinM37cZm5ciS32uc4t552Ke hyQWRfgx3vHLsvK0l4vdfUDDuEZcj6r+AckEwUbj81gvc67iHHPfpEi9isXnZLSM0QCV XQNstOWl1wzGiTer59YALFz04qUa/O/XBU5PqLotCLHoSIzVruiZrjSkxZYZNnEeX3uC wOvCUqEiP1izxpXmaK+T7YXIQRvhYM/aC8rETaPe3umMph6XsOD+hiAxQBVKAeNbfGwi RNzg== X-Gm-Message-State: AOUpUlEz+BdIWyCHtnsSDw7CMSnvFmui8uQxr8F/8xJsADaMNEqsppil drbZe1O5ACZZxWAoI2F6znPiOMWcHDYti7pBK3n7vQ== X-Received: by 2002:aca:e142:: with SMTP id y63-v6mr5393403oig.128.1531913522299; Wed, 18 Jul 2018 04:32:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:237a:0:0:0:0:0 with HTTP; Wed, 18 Jul 2018 04:32:01 -0700 (PDT) In-Reply-To: <20180718075637.GA10279@amd> References: <8da1b769-8aa3-9698-467a-2e7b0707fecf@gmail.com> <20180714212033.GA31950@amd> <00fa2693-9308-8d74-0124-04066a76c35a@gmail.com> <20180714222924.GA2776@amd> <20180714223907.GB2776@amd> <1138f834-e805-6076-bb5b-aa1fdc1f2606@gmail.com> <2c3a8911-150a-9b25-2a66-a9432047f96b@lechnology.com> <68996338-a902-2b57-0bb9-df274a496b06@gmail.com> <20180718075637.GA10279@amd> From: Baolin Wang Date: Wed, 18 Jul 2018 19:32:01 +0800 Message-ID: Subject: Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface To: Pavel Machek Cc: Jacek Anaszewski , David Lechner , 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 On 18 July 2018 at 15:56, Pavel Machek wrote: > Hi! > >> >>>>I believe I meant "changing patterns from kernel in response to events >> >>>>is probably overkill"... or something like that. >> >>> >> >>>Anyway -- to clean up the confusion -- I'd like to see >> >>> >> >>>echo pattern > trigger >> >>>echo "1 2 3 4 5 6 7 8" > somewhere >> >> >> >>s/somewhere/pattern/ >> >> >> >>pattern trigger should create "pattern" file similarly how ledtrig-timer >> >>creates delay_{on|off} files. > > Yes, that sounds reasonable. v5 still says > > + Writing non-empty string to this file will activate the pattern, > + and empty string will disable the pattern. > > I'd deactivate the pattern by simply writing something else to the > trigger file. For the case we met in patch 2, it is not related with trigger things. We just set some series of tuples including brightness and duration (ms) to the hardware to enable the breath mode of the LED, we did not trigger anything. So it is weird to write something to trigger file to deactive the pattern. -- Baolin Wang Best Regards