From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.46 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796115814; b=1PerqZMbRqHXxsVcGuVz3JyiulagyYSNOiB6xeUfDpuQ1KIsscKojiR3zFFefAGrVMON 3nlLOAbFCX0XLfLMyDsRRBzbOjCcPpW7K4wIfwakdWHBO45j6DiINzGk/sUIpsR1ySJlN GpE8BQ/XFtv6Pz4MO6d5ZlRSo4BC/wpkfGYdsowYdcO1hE+ol8tLtQEBi6NaCGRL925cZ t2oXL/Uj7gF/4c5STLda09UipwA2XCfFtTPHjQYP2X+YWg1ySCpEdObh9g74qbZuyhvTH 2H2hLnq2wchAQ2hpt4IGwrvd+KdSYefMIrJEbwPMHKPXgTmI5ViMdRwrfs68Ju7JrxQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796115814; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=O48i9ML0EARVMLNhCm1WcAf0zQm6tJVt7CTVV0tiadI=; b=gq//cKEjSs7o3hINsS88H24lULVWpdo/HBj7X+zndVPOM0nbOGDXMqtjFaiX/VirNn8+ k4M1CmTgXyNXI1UEaAsHrDZ++ECvsO9f3TnLh/8ifF9IAfwUmtHorzPMhReze3Crrokf8 RfjiqOCQkFVU92dwmd8rxkwgj6Hxj6QGBYrvJcyc6e/id7/4O4ZODgc14qWgs/cpURmAN Yii68SmTST+oVLSKoqPHIOcU0eV1Fn0O0ovrkYYeETuw7dlfyt/2XyhmLwfPwK9psOzbK vjmiGekOEe6B9dkMS61rca3K7yY9xgxJjPaqPZ2eib3dQdIxqTal14j9RobgmuPjgJA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=uGiGFJdt; arc=none smtp.remote-ip=209.85.128.46 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F1C6606A32D for ; Tue, 1 Dec 2026 09:03:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5F1C6606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=uGiGFJdt Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4bb6adaf0f1so97330725e9.0 for ; Tue, 01 Dec 2026 01:03:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796115813; x=1796720613; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=O48i9ML0EARVMLNhCm1WcAf0zQm6tJVt7CTVV0tiadI=; b=uGiGFJdt/VE4aNz/xlNhLtT0IMNLngyXknUDlj5TIOY2oTg73K0uVEepoRpuQmZlDZ tZLzeNnXjg8hxL87a7G/YAHmnXJ4XOQQYAFbZm6WmdM0p5ReqLDzDZYeB+oOptwLl53D ZmxX8tQQ51UbG41jHdeMID4H3rav/jRHriiPnOhimj27CK+O0PTaJcNEGS9C8sE8dLUA 3BtGdui+QKr1QBfnUfef028s8wZdWqOjpG1LkLIb0149oha2k5jFifvuTSjTnx+SDqDj 5KQi3EGJ+El86TBClkdZ6b3bdBxP2Hb6MkiL6DRs1mZehOl23KmGJ/L9X/PCJd+bPXmA MrIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796115813; x=1796720613; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=O48i9ML0EARVMLNhCm1WcAf0zQm6tJVt7CTVV0tiadI=; b=GW+7mC1ndMR2Icr4RiK3Q5mRjWeM4KfEUlMKV7QCgxeuge8M/jBVMgWzzHKfyx+75p plBYZoeNQ+ei40ju8onLbVu/zwHZQ2H7/NeqYBLBu4Ka13ID5SheCY9+HrruhbDjmRsy y/ckHSNk7mWX0rJP6E+PaT3QtowmYF7Tk37yXa+LPcKcPdXSAbX3ZKtO1CoyJf972lUJ w6VCcG6ULUZxdxkAoL36bCiPAQ3R/L3PpUR4Er2ROFOx9IyVkP/p+ziP2FJjfx0W+1Jr JSw/qGGAm2dEwhJT1oMTtd4dZWeGsJ9AyGmWxc32Dk1MQlGzs8WWepBI8VBtHnHSTPPl rGZg== X-Forwarded-Encrypted: i=1; AL+hErECWahNer2FakW7gKdfuAsfpSmF4AFuAH8DmwPzysXEOU0Qqg742cGMuSuKn2cfwdb8QVyWOF8tI21MAt8=@vger.kernel.org X-Gm-Message-State: APuU4Z/L5CrQE33y17xIAM4cRhQHpZWwAV4NAbgsL9fQEmND6OuEUG/N Pxa4KDKMtz8wcumGzGm/m9z75uZxLQqLSBOKtaCD9ByKgcMt0kCDULm1gwdVs0n9 X-Gm-Gg: AZFdTZcV0QHOemFXVkhxPnxGkw7W1CkpvxXbWq1BePK4tBRZdjqVQ/h9ER9dbiC4Og7 xoYN6sgksOCJBq39AuNQJF3/Udm3D3/2mpI5F3i1DymXnatS2e7NBTOtXp7SL7k5JCGQyf1YT0g l308oWNEVF5y3Vowc674tYKMLsQ9Ih3BfkEt3f/Pc5EN0sA56vu3Ej9bzZ7U4JYhiqVcDmD+ikd egF+ke7w9Hx3QXbUVgrVct8Y7YkPThFEkE6MIxd5P9uCrHL/I4e5eu79xWV2URORR2lfmgavLKu ySKLSxjPUmAZTj/Xc477JfblDY2ebP0hOdqY3mO5J+5gXEGiUEQpP33ZcysddSTa57mhevTUm3G xZi2wRc7Oiwv7eRieTLJX8DqngPT4Ev7SE0XOahUscqjcId4f2KDNDuJSnLo8gCMquOCnIs8uzX TRrgBy3yE1fteo9JWXjc2EJ47NcBEf/oSj3CsoPDM9Z6NIotKoNAJbS95d8NCiHkrwK1+GTMDkH yeqUynY4WYdSiZsQLNf8Sa68mmNZ+Vg9bigyENrMocuSSMwRojncRowTZVhpH+K54/F4mPTp9eq z0GVUmaKMRVObgSRDppPvIMsFmNYW0PMxgjDay1zU6sVm/uYTc1ow866 X-Received: by 2002:a05:600c:c4a2:b0:4a3:59c9:a744 with SMTP id 5b1f17b1804b1-4bb88807d87mr733122435e9.7.1796115812534; Tue, 01 Dec 2026 01:03:32 -0800 (PST) Received: from ingenieria31.oficinasStQ.local ([79.116.4.158]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884b8429sm1571737925e9.14.2026.12.01.01.03.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 01:03:31 -0800 (PST) From: =?UTF-8?q?M=C3=A0xim=20Pedraza=20Padilla?= To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 0/5] pwm: tiecap: Assorted fixes and improvements Date: Tue, 1 Dec 2026 10:03:30 +0100 Message-Id: <20261201090330.223238-1-maximpedraza@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hello Uwe, On Fri, Nov 27, 2026 at 06:39:39PM +0100, Uwe Kleine-König wrote: > I didn't mark the 2nd patch as a fix as it might result in power > regressions during suspend as the clock is kept enabled there. So it > would be awesome if someone with the hardware could test that. Thanks for picking up the .get_state() patch, and for the series. I tested it on an AM3354 board with eCAP0 driving a pwm-backlight, left running by U-Boot, on a v7.4-rc2 based tree with PWM_DEBUG enabled, comparing the kernel with and without the series: - The backlight inherited from the bootloader is taken over unchanged (83330/125000 ns), all brightness levels apply as expected and the CAP registers match the requested state. No PWM_DEBUG warnings. - Suspend with pm_test=devices, for both freeze and mem, with the backlight on and off: the PWM comes back with the same state, same result as without the series. - Through sysfs: a 5 ns period (below one 10 ns tick) now fails with -EINVAL, where before it was applied as 10 ns and PWM_DEBUG complained about rounding up. Periods above 1 s, which used to give -ERANGE, now work: 2 s and 42.9 s are applied, and 50 s saturates at 0xffffffff ticks and is reported as 42949672950 ns. Duty cycles of 0, 50 and 100 % and inversed polarity are fine. - With the series, l4ls_gclk has one more enable/prepare count and a protect count of 1, and nothing complains about the rate lock. About the power concern with patch 2: on AM335x the "fck" of the eCAP is l4ls_gclk, a fixed-factor clock without a gate, so keeping it enabled doesn't change the hardware. The module is gated by runtime PM through ti-sysc, which the series doesn't touch: with the PWM disabled, CM_PER_EPWMSS0_CLKCTRL reads 0x00030000 (module disabled) with and without the series. So I don't expect any difference there. I haven't measured the current yet; I plan to put a shunt in the VDD_CORE rail and will report back if it shows anything. Tested-by: Màxim Pedraza Padilla Best regards, Màxim