Received: by 10.223.176.46 with SMTP id f43csp4151523wra; Tue, 23 Jan 2018 05:11:34 -0800 (PST) X-Google-Smtp-Source: AH8x226Dvm5EwpJ5X3T4rYTelY3qpO/aDcgzKYKgE1UNbmpbZ5aqkN7oJUuCeXbebzwRZ844nN4V X-Received: by 10.98.68.129 with SMTP id m1mr2887344pfi.171.1516713094500; Tue, 23 Jan 2018 05:11:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516713094; cv=none; d=google.com; s=arc-20160816; b=sgCEEoYw73NglFRTlqXjik6ZyBGvY9I87sqN1mcWqPrHey6EfWBnsAmmHcaBDSvuTm 33wHZUzBldWwSg9z6VdG+fJL03JMNNVEH2SeqMUSP1edIOuXg8U+tmP6XDoe+GALVK9m iZ7oq0TvOCaLV4WaMVyvxJN39hiDfMMSawGhBxy7VIqMSc7fdudQ6BGJhNeuetCGWdfx 8X9oX05RvXuQDSMB6aKiAVOAHV6Jh9tfnVaG3Nv6UTmMEdJ9KwCFnTYyVPqPznXUa8W7 QmosfUQ7EsoUc1tSHDgMQ7D4ncZfQW8lCWDcee2l8rBlQlPPcs0hW3IRkVS8Ijfsw/PJ FH9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature:arc-authentication-results; bh=f5HkzfcEGM8QpcdDrZ4QdjVrlndEr2K2vng6MBveS44=; b=x+0AyrHKMnB6MWEmo9Vt1d0pPbnHM90uYmoofh+rYf+OPL9RcIcFGJg3LexZeoT3ap 8ThvZCD92xhiEuKl6SLe5vrRs11Px9/r5nsgJ67oyU87+CmKW5q89so8iBz8pFrZg/dm zM0s1jXsJJm5lBAwH2AFG5k/fSuLGW9fOhj80Udz0g4ButjslPTxqx4tPyaJ/bnit4Kz 5JgGAxoAkTaIe8X1P/dkHvss9M4XHe1acti9AqennP+V16j6sCENFb0esTxKZ0rSVMbM LpQE6biZmHCnPFFKZV5xU7B+ZvN+DcvyeWUrJYdxj4LkYRK4sVWWGiIvH9UWvv5orOad YMyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=W/OVyIRE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d20-v6si4704659plr.660.2018.01.23.05.11.20; Tue, 23 Jan 2018 05:11:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=W/OVyIRE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751798AbeAWNKq (ORCPT + 99 others); Tue, 23 Jan 2018 08:10:46 -0500 Received: from mail-wr0-f170.google.com ([209.85.128.170]:46085 "EHLO mail-wr0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751576AbeAWNKn (ORCPT ); Tue, 23 Jan 2018 08:10:43 -0500 Received: by mail-wr0-f170.google.com with SMTP id g21so475060wrb.13 for ; Tue, 23 Jan 2018 05:10:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=f5HkzfcEGM8QpcdDrZ4QdjVrlndEr2K2vng6MBveS44=; b=W/OVyIRE/n9nnF/2BOqdYqX7VvML6OS36E2mu5Jv+Z5Wf1MyFwRb/ZPFKvZrlgfXIk +IlXi5b3SQwR/Zxz2ZF4INX7AnygPe2EM/LrF9J/1opQizS3gdsiV8Y7G98ttKv0r3oT alYdPRhfoSULCYksAgiF8dwRw542ivHl73/WrA9OdvhOVjElE8lbcnPMroEWtfrdbElx 2njYOr9dDyYlDDMx5KAcY5jqYE6wNVjWrrJCM7axSHgEBrGHxukrBrzkh3C9kMgZfp7y t0lX4ejA2ACtF4XWvdYE1W2I/Dm5+dNL6QO7UuIQclnGFou1BkHumPmQ4rjj2cPe7V9I 7PPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=f5HkzfcEGM8QpcdDrZ4QdjVrlndEr2K2vng6MBveS44=; b=X5gRLAYQGbU3xHOB9vgEUTxyOuQ9QX+NARg8WcA6XFZVGm3iJVlhOfxQfawy9tmFqu y6EwOw373gQP4lfEDs0HuBXsGDNWBEDtdWUPBnAFvdSjjGCpI233CbuY+/Zeku9nZHl8 uoYs8cIzlB0bvoX0rHX3lKJS0FTNM93pWzteoYmukgiUaPNXl+rGPAeoE+/Qb+x+7jm2 v0uIAXJHXiQasP9vs62rbRi4XfZ3USEH0MDY1SxAvnQo9hh2LUzspIXibNoYVL08VL0e u2E8du4HzN5SW/mmR5G5TrMEH5S0Cmody5AoqyIhCZznFgo6UBk2KP8FaYyqqEZdoT+d EgvA== X-Gm-Message-State: AKwxytdxeT61298bkTAH+r/iJIVKokLjdSIJwNqpkGMi7siU8aVBgp5d VJ0mq2+L0SeYL7NtVehnmpMTGQ== X-Received: by 10.223.156.145 with SMTP id d17mr2379920wre.61.1516713041981; Tue, 23 Jan 2018 05:10:41 -0800 (PST) Received: from [10.1.2.124] ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id s2sm5442291wmf.0.2018.01.23.05.10.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Jan 2018 05:10:41 -0800 (PST) Message-ID: <1516713040.7870.47.camel@baylibre.com> Subject: Re: [PATCH V3 01/10] clk: clk-divider: add CLK_DIVIDER_ZERO_GATE clk support From: Jerome Brunet To: Dong Aisheng Cc: Dong Aisheng , linux-clk@vger.kernel.org, sboyd@codeaurora.org, mturquette@baylibre.com, linux-kernel@vger.kernel.org, linux-arm-kernel , shawnguo@kernel.org, Anson.Huang@nxp.com, ping.bai@nxp.com, linux-imx@nxp.com, fabio.estevam@nxp.com Date: Tue, 23 Jan 2018 14:10:40 +0100 In-Reply-To: <20180123122102.GA16865@b29396-OptiPlex-7040> References: <1516367470-24340-1-git-send-email-aisheng.dong@nxp.com> <1516367470-24340-2-git-send-email-aisheng.dong@nxp.com> <1516705426.7870.45.camel@baylibre.com> <20180123122102.GA16865@b29396-OptiPlex-7040> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.4 (3.26.4-1.fc27) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-01-23 at 20:21 +0800, Dong Aisheng wrote: > > In a more general way, I'd love to see a feature such as CLK_DIVIDER_ZERO_GATE > > added to the divider but I'm bit concerned of all the quirks we are slowly > > adding to the generic divider. It seems we are all trying re-use the algorithm > > of clk_divider_bestdiv() with different 'val-to-div' transfer function. Not too > > sure what the best solution could be though. > > > > IMHO CLK_DIVIDER_ZERO_GATE only indicates the 0 val means clk gate. > It does not assume divider types. That looks like a generic way and is exactly > what this patch intends to do. Does it make sense? It makes sense. That last comment was not about your patch specifically but about the growing entropy in clk-divider.c in general.