Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4763953iob; Mon, 9 May 2022 00:38:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMwnaJ1ik5TjhE2i9kr5uVq2EOde7UKVanoLaGlGTLlonDIkHzvKTj3RBvONt7sdoWyoMI X-Received: by 2002:a17:90b:4c10:b0:1dc:8289:7266 with SMTP id na16-20020a17090b4c1000b001dc82897266mr25225263pjb.190.1652081932568; Mon, 09 May 2022 00:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652081932; cv=none; d=google.com; s=arc-20160816; b=pTTHo3H0Zfpdt3+sanlX9pydm/5noCoOAGO27CwwiugOYjDyuJhJFC2jHig3/PeT2V ottTiWEeMzVWw9dzaZUZQwq8z6kXibmokiE2nmHw2Te13WUBEBBB9EsN7LSEe+1TxVLd nodI38ayGcWdnqh89tk9IpFTrlzo9TQENEFkzOdNwS8vL5mEtgzf9FpnxN03AvL+CoJD uuQVSmqfY5IBXKZo4sK67kNnCHyN/Sy2np5y7B0Qm5AfCCa7cZA0+7XgiAqtRVCf7WYI a82JyNCePWSNlFJutU4EcdBkIv1JEkrTfVb+rHvkAcBVo3ozqeDcONp39m6GBFp1ViWc ltQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MJNi1mbSdob7+bt9cuYWkkcjxTPYJe7q5XVeyN3mbE0=; b=vy8lppdrPPJujF7xI4ubQE8C2KnOHUpi723k4xaZrABNjTRtGBJGypK96SFZ2QHMhV crg8LbK2cef6cgGBl50WvFDP+F2wnDLNYENy/3vCuWrfnVXo32g4ODx3CJoypnlXh9bI 0isfPQAz/06zeDKY/SKx1uX0Yb+0+CW+6Fmm7w+A0JRY6MSqkjGlh0XEQEBtV3Qp8BxC Qkg5qMBBoVnAWXMM/NeNsBqYiI67nBCIifRlJNXLogdyLyalQtkZnZG7Kgcdgdg+DSh1 u9aNpw0E9/ocmp+ClSHfiOC59dl/tTRbdJXzy7CCCwQUv+4yFlaBoSz8nzvxU+AKjzH5 0EnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hxbKsuJm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i12-20020a17090320cc00b0015827ec0073si8987819plb.452.2022.05.09.00.38.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 00:38:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hxbKsuJm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E41AD1BE95E; Mon, 9 May 2022 00:34:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443773AbiEFQ2n (ORCPT + 99 others); Fri, 6 May 2022 12:28:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443769AbiEFQ2k (ORCPT ); Fri, 6 May 2022 12:28:40 -0400 Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D5836EB19 for ; Fri, 6 May 2022 09:24:56 -0700 (PDT) Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-d39f741ba0so7676226fac.13 for ; Fri, 06 May 2022 09:24:56 -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; bh=MJNi1mbSdob7+bt9cuYWkkcjxTPYJe7q5XVeyN3mbE0=; b=hxbKsuJmP/J8sgmfTX8++VCbHxMkma3TtffIjfk/un+FrHSMF/iF8j5Ass5FMe/NBi nPb4sbJeG7pvEDbr5U2Z1uLMlkQ4CXen/ReSeNCjpjj46WW1MKMZyU1unDGH6JZDUzPt 5HH1O5CXOIjZqPst9/Vvf6ZSQt7KHZSbZHWPUL53o3tQ8Ra+qG0bUQ3o+64XOEpQ/Vti CHj8Xc5vLsVd6+225+OrnS6K6CPUPIqzTc+tVXwKj6mKDEg+AAh3kkrKe/ez9Xy6gGND 6+NdBlwjQXW5yNdLIwICdIUw7JXpLg2YvwXdDfNI1Z6ZhiA8p5tMJCEBw/G6xHYEZ057 aT2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=MJNi1mbSdob7+bt9cuYWkkcjxTPYJe7q5XVeyN3mbE0=; b=zEysXkmzTCklSxxKBLMpkMKvi5AUHgxS1byI28CGcHwldYdXZveSt0AWX/DmAer4fZ gY7bmt7dfkXFh1tuUC+sZwEa8Pr4AMGp6rVRh/qlgivwu7MgaFUF7IeMaGLCF615I3Pc kHz7XA3FHiZj8HO/KudEd4eHUVHIPndAPQSJajFBhw9U9otn8XMF8etJx8J9SugGEGTk VjZnmJsO+SXaUabZEE1nV+5cnBspyjk6WOlz8xKit/uMxr3301SXW7XiGvysPyDOtwzx jJQcCpcoMYOskejp/bE5RFsXg4JXKX7WIFo5TGTyzwhm80XHg3K86XJXkD00EPzRN9Uu k+eQ== X-Gm-Message-State: AOAM533ICodxoUGbjjRjmPQlcy7R2jmgoZLktG92B6Hp9Lf47GlA+Nsj XqzcHrTqdjrYNZfaupJmE0l6TQ== X-Received: by 2002:a05:6870:414d:b0:ed:5585:7436 with SMTP id r13-20020a056870414d00b000ed55857436mr1682804oad.29.1651854295970; Fri, 06 May 2022 09:24:55 -0700 (PDT) Received: from ripper (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id a204-20020acab1d5000000b00325643bce40sm1832260oif.0.2022.05.06.09.24.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 May 2022 09:24:55 -0700 (PDT) Date: Fri, 6 May 2022 09:27:29 -0700 From: Bjorn Andersson To: Pavel Machek Cc: Thierry Reding , Uwe Kleine-K?nig , Lee Jones , Luca Weiss , Doug Anderson , Rob Herring , Jonathan Corbet , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-pwm@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v14 2/2] leds: Add driver for Qualcomm LPG Message-ID: References: <20220303214300.59468-1-bjorn.andersson@linaro.org> <20220303214300.59468-2-bjorn.andersson@linaro.org> <20220504073009.GC8204@duo.ucw.cz> <20220506160901.GA1199@bug> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220506160901.GA1199@bug> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 06 May 09:09 PDT 2022, Pavel Machek wrote: > Hi! > > > > > + "255 500 0 500" > > > > + > > > > + ^ > > > > + | > > > > + 255 +----+ +----+ > > > > + | | | | ... > > > > + 0 | +----+ +---- > > > > + +----------------------> > > > > + 0 5 10 15 time (100ms) > > > > + > > > > +The LPG supports specifying a longer hold-time for the first and last element > > > > +in the pattern, the so called "low pause" and "high pause". > > > > > > Please see > > > Documentation/devicetree/bindings/leds/leds-trigger-pattern.txt . This > > > should really be compatible. > > > > Unfortunately the LPG hardware only supports fixed duration (except for > > the ability to hold/extend the first and last duration in the pattern) > > and it also does not support gradual transition between the brightness > > levels. > > Ok. > > > As such the pattern sequence provided to hw_pattern looks to be the > > smae, but I don't see that it can be made compatible. > > > > > Can I get either patch to disable pattern infrastructure for now or to > > > get it compatible? > > > > > > > I'd be happy to get this updated to your liking, but this was one of the > > drivers we discussed when we introduced the pattern trigger and led to > > the conclusion that we need the ability to do hw-specific patterns. > > > > As such this document provides the hardware specific documentation, as > > we describe under "hw_pattern" in > > Documentation/ABI/testing/sysfs-class-led-trigger-pattern. > > > > Please advice on what you would like me to do. > > I'd like you to use same format leds-trigger-pattern describes. > > If someone passes "255 500 0 500", that's requesting gradual transitions and > your hw can not do that. You return -EINVAL. > > If someone wants that kind of blinking, they need to pass "255 0 255 500 0 0 0 500". > So the section under hw_pattern in sysfs-class-led-trigger-pattern that says: "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 documentation file at Documentation/leds/." That doesn't apply to this piece of hardware & driver? Or is the sysfs documentation simply not reflecting what has been decided of how this interface should look like? Regards, Bjorn