Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp279758imm; Fri, 7 Sep 2018 22:04:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZZxLEa++7WTq53n/i49bPtp1NYsIdMCs+lHwWFVDHkFhC0vVI1+y9Gd6cZFbLdCZkQwhO9 X-Received: by 2002:a63:8f17:: with SMTP id n23-v6mr11681742pgd.131.1536383063974; Fri, 07 Sep 2018 22:04:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536383063; cv=none; d=google.com; s=arc-20160816; b=VawdDoDmRIFdjr1DLQJ7y4elVkLv8FyjZrEQlSw0fw3soJbsPa252TxURr16kH/EPO 401Mg/vHbCRn9c0QXFmomsneOJ+ZZvQIGlHc6EPUaFoDDuuklm4SoHFHzCj6O7PuojuI 77hTg/qpjWPBRYVnU4cZmlvkPxk61ySffHMWu0e/NTQWExpe1ODn8EaM8SpBth6nLuAs K7MoAGxnRFWcpXsx99x8vZrWMXbODkEQdfJf3OfErYjxwA64l5MU1OqcEC3KpqmVo6gI kayS/auu8IZoiiTsqxoliHdOQmnlnGrBKybbCTM9mGuVT/UMdjBXY71dGtlaLzON/Ryd ZXyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RJCpMmAsSMsAZuHbC3RM1J2E2E/2J6/EivqPn3wdhDs=; b=Hab/r8GCMteIX6vLO7Ra9L5HAB19ovC8Qe686KO34UfgBOHSy4JXvq+a8K1zjPMGfu uFsHiHpUuJm/modsDKJYoEy/2eGgIHc0j4i7R2jwBF7WXjaz5TSEqwIC0NhGfP0BAN9j wL+ghHWQMxAAxbB1tsKPOxYVPJUnhRT7h0jgWNwhWUCNL6wV9z1nFeUpz+UvRsc2Cp9Y HX0R2FFE7r9D6qF1oa5QjnK7DB3EAziTNpOCxs2Gliitnq1U86+Fx+DpzWZ2qLKJCaOj kntwK1EjE49SOBiw2MLEX6m1FQMasocc9vHghRLyGtLSVEobGR+b5FQuLCnBJJ1l//bO pmgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KFDZ4h1m; 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 m14-v6si11089248pgc.368.2018.09.07.22.04.08; Fri, 07 Sep 2018 22:04: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=KFDZ4h1m; 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 S1726583AbeIHJqe (ORCPT + 99 others); Sat, 8 Sep 2018 05:46:34 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:47045 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726527AbeIHJqe (ORCPT ); Sat, 8 Sep 2018 05:46:34 -0400 Received: by mail-pf1-f193.google.com with SMTP id u24-v6so7934346pfn.13 for ; Fri, 07 Sep 2018 22:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=RJCpMmAsSMsAZuHbC3RM1J2E2E/2J6/EivqPn3wdhDs=; b=KFDZ4h1mOfK1VWnohBMn1k7W0Syhu4dKifBj1YCrEQyvYoxJ/Ij8OTMfmCofr4QLlo g6lmLH4o+y5R4LjtIZzUkBdVMvHum+hUGQ+qnSVC5ZgO7hfeuu281bya7tH22ov7ZdFj BNpofQ6FPDysTsonF4VoNUxyx5SnhKPCn80fs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RJCpMmAsSMsAZuHbC3RM1J2E2E/2J6/EivqPn3wdhDs=; b=UAw0HwLk7PiiH4DGUcVVDnx6XWg7hvdVLdA/4vzEK9GNgGrSqL4u6R5fUJ2aipe8+S RrkYyPqJn8q1F/CWO2R90BomITcGcCF0o3UkpMh++ki2fuPrIGCK6gcK6DmVLBz6xWaO uc0IGxIr9hLM+IRL+sH9gelkt6CREIKUbs9eSNjCKB7yEA0+fRlqNRobAF5ofz+tCUSB AdWZ7W7hUi9Zj2dwnh6dbkXaDST7GDSbIZrXvr0J82OWLsppunNw3XMgesuPu9Vse6DM Z942zAB1/PXeI/moxzLN92W5FnuOsdcYPs16JAoP1yUSdl8bHbhkMn9MxP7i6Nx5sy6v momQ== X-Gm-Message-State: APzg51B7YKO7JhCisjDa3KJ/WmW8+LopB/npsiKgPAWLRe5+idcqnPnx hGi/QWcF5t8tG43LeINNxeCHzw== X-Received: by 2002:a62:a05:: with SMTP id s5-v6mr12222045pfi.147.1536382931016; Fri, 07 Sep 2018 22:02:11 -0700 (PDT) Received: from minitux (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id p1-v6sm12494714pfn.53.2018.09.07.22.02.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Sep 2018 22:02:10 -0700 (PDT) Date: Fri, 7 Sep 2018 22:02:08 -0700 From: Bjorn Andersson To: Baolin Wang Cc: jacek.anaszewski@gmail.com, pavel@ucw.cz, rteysseyre@gmail.com, broonie@kernel.org, linus.walleij@linaro.org, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 1/2] leds: core: Introduce LED pattern trigger Message-ID: <20180908050208.GY2523@minitux> References: <5a502ec29251c019ddad8f3314ab45fc0f6feaf7.1536027873.git.baolin.wang@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5a502ec29251c019ddad8f3314ab45fc0f6feaf7.1536027873.git.baolin.wang@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 04 Sep 04:01 PDT 2018, Baolin Wang wrote: > diff --git a/Documentation/ABI/testing/sysfs-class-led-trigger-pattern b/Documentation/ABI/testing/sysfs-class-led-trigger-pattern [..] > +What: /sys/class/leds//hw_pattern > +Date: September 2018 > +KernelVersion: 4.20 > +Description: > + Specify a hardware pattern for the LED, for LED hardware that > + supports autonomously controlling brightness over time, according > + to some preprogrammed hardware patterns. > + > + Since different LED hardware can have different semantics of > + hardware patterns, each driver is expected to provide its own > + description for the hardware patterns in their ABI documentation > + file. > + So, after a full circle we're back at drivers with support for hardware patterns should have their own ABI for setting that pattern. The controls for my hardware is: * a list of brightness values * the rate of the pattern * a flag to indicate that the pattern should be played from start to end, end to start or start to end to start * a boolean indicating if the pattern should be played once or repeated indefinitely. Given that the interface now is hw specific, what benefit is there to attempt to cram these 4 knobs into "hw_pattern"? Or am I allowed to create additional files for the latter three? > +What: /sys/class/leds//repeat > +Date: September 2018 > +KernelVersion: 4.20 > +Description: > + Specify a pattern repeat number. 0 means repeat indefinitely. > + > + This file will always return the originally written repeat > + number. I'm still convinced that this will confuse our users and to me it would be more logical if this denotes the number of times the pattern should be repeated, with e.g. negative numbers denoting infinite. In particular I expect to have to explain why my driver expects that you write 0 in the file named "repeat" to make it repeat and 1 to make it not repeat. Regards, Bjorn