Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4838880iob; Mon, 9 May 2022 02:52:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZNlk1YIgg/4GE5aYBnw1ouCxWFqZTnArq7hVBTVO1UgAGz86H7wYPya+BO5IQY8KAMxit X-Received: by 2002:a63:4b42:0:b0:3c6:3c00:2608 with SMTP id k2-20020a634b42000000b003c63c002608mr12628461pgl.231.1652089967157; Mon, 09 May 2022 02:52:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652089967; cv=none; d=google.com; s=arc-20160816; b=JmFgCFQn65JOfi/IzEq7RKjCV+h+EM1SxIZPBKb0ZbGkOyGgeEqvHzoiDpSrlQohVl 4YNTulSYfKlLZhsg0LE5d902KUsv9ilU1cSs1xrnUXVDIIPIzgYogtV+09qca4eOozP9 eKXwd5/5iexctgYp/GYjPeLyQD77wRRqstFWG98aXNynCzt9JgnXs1P7fNQ1irLcrFvY 9nsPUp0iwYS4EgRjPZ7ZIS0txxaj1S9khhyK3hkb77HRSLzXZHqCNqMYokcXKVPxpQB4 lX3EzNxn/kci95asQWeqwgdObB9bmkqMNPOTI1L2LGptMYDpuHmzFGxcG6nucvfrIBYh vcZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4UCi/qt7ePcQbvdoM13vAdfQfRE9DpkWlgMz3U9B+Cg=; b=tZ1MS5VPZEpZf85xL1Q+9YMlDawyEx68liRYYIpexLGyzHzQERx7xozoyDzULbt5UU F9Hzhb0OPg5wX5TYzmkGu/ZxnqHWQXI2Yl/TNZ+teVibQ3VAlUpLf6omttxT7Q7kUg0v JxbYkHcO1IU/dX8b4T2OHbUM0f0GLR8XHvfxvdHi5eoQTpyVzQ/AhWDjKeLNWotVLW+8 A4TwvJGR8KzbfE+q8ngv/VObUDxMUxRzcWrkpHa477JZYfh3F7yR5bfa8nZhv8HmMu4K b+tleoyuFT22KSgPs7wzTWEbKwb+gcm52tSNUojRjl39kbCgBIVPIBfVN33gg3xuOaTa FNTQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 16-20020a630c50000000b003ab05e416b8si14126618pgm.46.2022.05.09.02.52.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:52:47 -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; 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 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 202A3BBE; Mon, 9 May 2022 02:36:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443426AbiEFQN3 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 6 May 2022 12:13:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443595AbiEFQM7 (ORCPT ); Fri, 6 May 2022 12:12:59 -0400 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8652712ACE; Fri, 6 May 2022 09:09:04 -0700 (PDT) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 3209C1C0BCD; Fri, 6 May 2022 18:09:03 +0200 (CEST) Date: Fri, 6 May 2022 18:09:01 +0200 From: Pavel Machek To: Bjorn Andersson 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: <20220506160901.GA1199@bug> References: <20220303214300.59468-1-bjorn.andersson@linaro.org> <20220303214300.59468-2-bjorn.andersson@linaro.org> <20220504073009.GC8204@duo.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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 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". Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html