From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D35DBC10F1E for ; Thu, 15 Dec 2022 21:26:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229740AbiLOV0h (ORCPT ); Thu, 15 Dec 2022 16:26:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229955AbiLOV0g (ORCPT ); Thu, 15 Dec 2022 16:26:36 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3392D27CD8; Thu, 15 Dec 2022 13:26:34 -0800 (PST) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A8AF6327; Thu, 15 Dec 2022 22:26:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1671139591; bh=JQrqhtL11L48cTij+OlsRJZQG3HfM5Z9q1ivB/bi3Bk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eHzFcbh/dcCo6lCWCcJZGUjxR7PVosNdwwslbfQevANHsvMgXWL665madYqYKR6Mw Ch/SjvVGS9SEGppEnYDeaAtkTF1Ix0Vc4UST4fKUxmXGa+cN8aOy2xochihqOGdaDw 5s8dyc4A/wpllBuW2TviNOhjmhZMe+5F0l3xO1yU= Date: Thu, 15 Dec 2022 23:26:28 +0200 From: Laurent Pinchart To: Rob Herring Cc: Linus Walleij , Alexander Stein , Bartosz Golaszewski , Krzysztof Kozlowski , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, Marek Vasut Subject: Re: [RFC PATCH v2 0/3] gpio: Add gpio-delay support Message-ID: References: <20221214095342.937303-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Dec 15, 2022 at 12:21:33PM -0600, Rob Herring wrote: > On Thu, Dec 15, 2022 at 7:16 AM Linus Walleij wrote: > > On Wed, Dec 14, 2022 at 10:53 AM Alexander Stein wrote: > > > > > thanks for the feedback I've received. This is the reworked RFC for > > > adressing a platform specific ramp-up/ramp-down delay on GPIO outputs. > > > Now the delays are neither specified as gpio-controller nor > > > consumer-specific properties. > > > > > > v2 is a different approach than v1 in that it adds a new driver which will > > > simply forward setting the GPIO output of specified GPIOs in OF node. > > > The ramp-up/ramp-down delay can now be actually defined on consumer side, > > > see Patch 1 or 3 for examples. > > > > I really like this approach, it looks better than I imagined. > > It seems over-engineered to me. So far no comments on my 3 suggestions either... I like the idea of handling this on the consumer's side, possibly with standard foo-gpios-ramp-{up,down}-delay-us (name to be bikeshedded) properties as you mentioned in the review of v1. > One is to just use some GPIO flag bits. Say 4-bits of GPIO flags > encoded as power of 2 ramp delay. We have to pick the units. For > example, 100us*2^N, which gives you 200us-3.2s of delay. This could probably work too. > Anything less is short enough to just hard code in a driver. In which driver though ? The whole point is that we should avoid handling this in particular drivers. -- Regards, Laurent Pinchart