Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2107614pxb; Fri, 29 Jan 2021 13:27:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwI275RixlddXgVV2Tfh/ZRsaiLf0FypjSrq8wkUjwqprydIHx4rQ2Jd2bGsfKYrKxbUASK X-Received: by 2002:a05:6402:6c4:: with SMTP id n4mr7557904edy.257.1611955670590; Fri, 29 Jan 2021 13:27:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611955670; cv=none; d=google.com; s=arc-20160816; b=RqvPdCZAgHsJ57JvOjpebj/EbbzXhDMRTKm8zBukIthz8E1IMfsxgCSLVfJxIXymjc LEem438ek0bLxPCfVZcfrEDtygQPNKo0TLLEcBqTYRpuJbePMmZLwIhfijcBRpgEWevG iL8tsP31WnvFNpHd65tSp8coAAPh1Jhb8jBnewyO3XyPgYSM66hTGyPzStSvVz1/sAvB lRkUv+uDPQ2XtH47+yJfmXR7WWNefe7rwnsxk1xsLMaqoiyTsE+DeLhJkkQsNU0iYTnx +x4xkpcgZE3EssmN7ARuus92xo50OQ69U2RGMWOWYbdR+gIL6bSCb8nbhAo82MgzvomK fzEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FZSbREg1PJwuWmIxRUAU5UQQlfQNrYrnIjGANdzroo8=; b=KgbQSnLJs1jtPlXASEDqXq4XHLY+GQFx3tzm0B86xLocVPrpq74R0WEtGYlHEa2Bwa 9jwjLY2NKynK5ugRxYMdxLb5L6KFVZuzb4e/M4FbGJN6VzNhLbGykRJSWVq69AigGu+T Q9n0eXxsJCFdKfnGfDBq3GyyC5DksXnL9rzxklOC/Tbv6HOO+G04126SpjgHAfl06vRI LY8eTxavRcUMkYSNqe/jv1bw1fLOYuXG9clSQ+q9cPq8qOo+8mS1ok3e9/V/QNJFvD4/ EJKseaq2uRoF+BunmJ2+YlTt8TU+OsBFIffFXABJ9HJZlKrc92yL4glsQsP9xA121Srf LHkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RcwcKdDr; 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 jg20si5940063ejc.125.2021.01.29.13.27.26; Fri, 29 Jan 2021 13:27:50 -0800 (PST) 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=RcwcKdDr; 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 S233437AbhA2VZB (ORCPT + 99 others); Fri, 29 Jan 2021 16:25:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232808AbhA2VY7 (ORCPT ); Fri, 29 Jan 2021 16:24:59 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F69EC061574; Fri, 29 Jan 2021 13:24:19 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id z16so5554190wml.2; Fri, 29 Jan 2021 13:24:19 -0800 (PST) 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; bh=FZSbREg1PJwuWmIxRUAU5UQQlfQNrYrnIjGANdzroo8=; b=RcwcKdDriUu/A+/wM1On/mAt+3RQX6aoYhSYaL4VGJH7TM/NUfP/eHfXEkmZLzYY8A E7quiYuueaOm6a2g6QBTveRFdvaS6guvdvmzYzpojilHeMs4oZeEG8Gin89x+vkdOKJu nMzveC/3KjoeRiU/5p+2//4vmgWE/Fts2I42WxbbX9w4C3TR5UKIoRqy3c/NsDF+/fx0 mxrlBZ2v/K6CXBepITzL/H+s3BNKJxk5ZhD7x1d1ebLB+BIrNK746HLsiJsDE/cSIsbm 3ANuHRdIVV2ewWge/9yVNBqS4R+vRCZQ6wmTjoKIFQaOhMJaeME0RS0ARux8RHw1/AkN VgiQ== 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; bh=FZSbREg1PJwuWmIxRUAU5UQQlfQNrYrnIjGANdzroo8=; b=UXy4IaNW8o+hjQFsDKiHxZ6BXFFsP7ZmabwRoj2/hp7UggWPNRtqIU1wQCk2OH0Vmd rfyjwXxK6bvYwj5MsK+e3+HFo4YO7b4AM0jMzlPCPX2BpDyJotQD59qIQsxQQUusXTGx yDLdbFkSWlaFpsf20juWTDg406e6XMZ5d/6XMv/s/qQ3ceMnGyw/xoe1MhAr5iGU7j9h m2CmYhyeStCS9KvGWAGjnBICItB4G4XHAE9l6OFrc0lg3GEQV02QpRZndMTccGjbCC1K hpYR0fvsEsk1ofXSJ7m4Ps0FWK1+Ax6qTBxP2JYij92dVMai1Uuu2dputYvd9KXv3A2e OvCg== X-Gm-Message-State: AOAM530S3q2v1jnDO2CzqRBzDEjKhLDkaSdV9AwFoICm0tG1hDvg13c6 caP58bqoFrbJ2X88viPtCoZrTez0Hu+m+JJqxyy9O11c77Y= X-Received: by 2002:a1c:4e:: with SMTP id 75mr5568115wma.150.1611955457839; Fri, 29 Jan 2021 13:24:17 -0800 (PST) MIME-Version: 1.0 References: <20201216125320.5277-1-clemens.gruber@pqgruber.com> <20201216125320.5277-2-clemens.gruber@pqgruber.com> <20210111203532.m3yvq6e5bcpjs7mc@pengutronix.de> In-Reply-To: From: Sven Van Asbroeck Date: Fri, 29 Jan 2021 16:24:06 -0500 Message-ID: Subject: Re: [PATCH v5 2/7] pwm: pca9685: Support hardware readout To: Clemens Gruber Cc: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Thierry Reding , Linux Kernel Mailing List , linux-pwm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Clemens, On Fri, Jan 29, 2021 at 3:37 PM Clemens Gruber wrote: > > Is the driver really responsible for bootloaders that program the chip > with invalid values? No, but it's responsible for correcting invalid values. Otherwise the driver doesn't work. > The chip comes out of PoR with sane default values. If the bootloader of > a user messes them up, isn't that a bootloader problem instead of a > Linux kernel driver problem? Invalid values are only half the problem. The other half is that two valid values might produce the same output, e.g.: LEN_ON = 409, LED_OFF = 1228 and LED_ON = 419, LED_OFF = 1238 produce the same result. you can't see the difference between the two when scoping the channel. there are probably more ways to do this, some might surprise us. It's a tricky chip.