Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1896417pxk; Sat, 3 Oct 2020 01:23:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXwuVqO3cTaIlOzPwLHuY0HHl7SWRmVm9SnStKjCq2qS8JddfJVCyY+O3V/SDdR1nVNnbC X-Received: by 2002:a05:6402:1602:: with SMTP id f2mr7224746edv.343.1601713407019; Sat, 03 Oct 2020 01:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601713407; cv=none; d=google.com; s=arc-20160816; b=qOBvDEMlwVeLZW2xZFHDpv8nrEbP1VbCvZl3di2n5vBsdonM4IoHq+/t0sGRL3eTah 1eELyG77bkkTN9rbHU3RkRei1mPEdtMQ0P+bJEKyCfLTE/8IKRM0PHlmSjEl5rCatEUf wQc3/6nmgpExIYQo7YH7HMGC6PzEO1XXQuUqJIeyVQIcW9IrKPavEiBEZSmxs6VHaWoT 1/f3n0n8B0pXdkgvVhJZ9M4YgoGo+GTYilyZ8//+LhqeDqS7w/f50TdgklKN/rtcBWwI /zDJzZ+NS2VPjoDiYvxKRTj0APkqLxYPg6wBm2u2aYjg+bMumSNZ37KOZArfov5ENTvj /Wnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+BYI0/u6OpMKyw3gjay+S2BO3oSX5QDwS4LJbDTNE+0=; b=hLrPCEYbll1/hFlhcz2e5RPut48+nRJorm4wGhaQEeHg2/8GUcBuR7gCWyyBA7ObrQ sE3CfFssXo2bGy507pelYcisbK7Y7hzba/3kwHpwDjyK3DXiM52VDwSjKq/RssQqxEuW NEq/ErRN9B0qqehWu6dj6mqeE6YPF8YGA2fAPJcXoJ7VCkVbnp7BrU+fwDtxprvPGHnJ Fjv8rTlKcXsUF9xnhJXo8Ya0gK0HMFu1vcaSJgfQQXsIFL0F8IAN9+QKJNGcfpGjmQd7 OF0mxPOyWodzlIqPuiyjjPZ+ZrXsMW603QPjp9aRDR/OhQ/x4RLx8XdJvrSax8HToPc4 8pOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MKgL9seM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cy18si2940744edb.148.2020.10.03.01.22.50; Sat, 03 Oct 2020 01:23:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MKgL9seM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725767AbgJCISQ (ORCPT + 99 others); Sat, 3 Oct 2020 04:18:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbgJCISQ (ORCPT ); Sat, 3 Oct 2020 04:18:16 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D070C0613D0; Sat, 3 Oct 2020 01:18:16 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id b17so2390576pji.1; Sat, 03 Oct 2020 01:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=+BYI0/u6OpMKyw3gjay+S2BO3oSX5QDwS4LJbDTNE+0=; b=MKgL9seMPv5Xnyriytx9J/qyyRCDv2PJfCoEFgTjWbSksEOeFbBffkBa/WpD1oB1r7 xCerWCditb25c/6DdUc5pJt8z79TB3ojEvNDSs99M6Jom+NsmByO8xW0iNMLJiwurBwt mfDTfL2xASh5zpm9mBgG9wM1NmdAf6ZC+IIjYLai+nz5YO2zmR2jWemMXSUwWbSGmtSg kK2EDni/h0qbZWohVEb4CDHyoEBJhwUmR3VyCDTGVxVVfz7CQwDx34WCJo2pxi4xsCKK UBOY+1GWrj90IiUX655XMwlQgLr39jT/SbQmn/InoPRsuB9oVNGH9NfOH3HsZHPUwjjr N9dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=+BYI0/u6OpMKyw3gjay+S2BO3oSX5QDwS4LJbDTNE+0=; b=dxe/ueZsMwXL28qV/jO8FcKhjK08rf5907FSemby0aGjFsr++2pq9uTS+0pXn6weQP kF1tAmtL7sBC7uW3Qy/w3Xhy6gpUawryFHO5TYT4IK22USq7wWk+z+6dMXqk4/16fAc2 Ofr2gNtEPAcpGoyRv9zogc5JBTFNmNcebq/WPKDxN9HroBXjAW2MaTtv5Ls892pxfYEy NKS4hmDVpKn38YCpy7NnVk6Ehb6ZJZKX5+n2E+QK8dNPOqt2Pb8q2jOTsq44d10Cjgft jGdRv4QyzFNAypUXg8OKdhfzpjvxkwAtUavLKcRDKL/CCZNU7o5F+uHcNlZO/XK05KYY K3+A== X-Gm-Message-State: AOAM533EXkh1cD7cgmkKs8RIzeQWbLpfZPiCCX/kg3XQCKQ2poNFnAgB i0WxekKiM1dlRDm40/aNIb12v5Y6iEJKC/CSbK0= X-Received: by 2002:a17:90a:b387:: with SMTP id e7mr6734978pjr.228.1601713095383; Sat, 03 Oct 2020 01:18:15 -0700 (PDT) MIME-Version: 1.0 References: <20200924192455.2484005-1-j.neuschaefer@gmx.net> <20200924192455.2484005-5-j.neuschaefer@gmx.net> <20200925063037.fcrmqvpe5noi3ef4@pengutronix.de> <20200927211044.GC2510@latitude> <20200928083546.gwu7ucx7os5yc5bn@pengutronix.de> <20201002233630.GB500800@latitude> In-Reply-To: <20201002233630.GB500800@latitude> From: Andy Shevchenko Date: Sat, 3 Oct 2020 11:17:58 +0300 Message-ID: Subject: Re: [PATCH v3 4/7] pwm: ntxec: Add driver for PWM function in Netronix EC To: =?UTF-8?Q?Jonathan_Neusch=C3=A4fer?= Cc: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Alexandre Belloni , Heiko Stuebner , devicetree , Linus Walleij , Thierry Reding , Sam Ravnborg , "open list:REAL TIME CLOCK (RTC) SUBSYSTEM" , Arnd Bergmann , Mauro Carvalho Chehab , Fabio Estevam , Daniel Palmer , Andreas Kemnade , NXP Linux Team , linux-pwm@vger.kernel.org, Stephan Gerhold , allen , Sascha Hauer , Lubomir Rintel , Rob Herring , Lee Jones , linux-arm Mailing List , Alessandro Zummo , Linux Kernel Mailing List , Mark Brown , Pengutronix Kernel Team , Heiko Stuebner , Josua Mayer , Shawn Guo , "David S. Miller" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 3, 2020 at 2:36 AM Jonathan Neusch=C3=A4fer wrote: > On Mon, Sep 28, 2020 at 10:35:46AM +0200, Uwe Kleine-K=C3=B6nig wrote: > > On Sun, Sep 27, 2020 at 11:10:44PM +0200, Jonathan Neusch=C3=A4fer wrot= e: ... > > You can even check this with an LED using something like: > > > > pwm_apply(mypwm, {.enabled =3D true, .duty_cycle =3D $big, .perio= d =3D $big}); > > pwm_apply(mypwm, {.enabled =3D false, ... }); > > > > . If the period is completed the LED is on for $big ns, if not the LED > > is on for a timespan that is probably hardly noticable with the human > > eye. > > The longest configurable period is about 8ms, so it's not long enough to > see anything. However, after writing enable=3D0, it can take about a > second for the PWM signal to turn off... this hardware is a bit weird. Sounds like you have 1/128 divisor and off/on is done on lower frequency. (We saw PWMs with an additional 7-bit counter, reminds me Crystal Cove PMIC PWM). --=20 With Best Regards, Andy Shevchenko