Received: by 10.223.176.5 with SMTP id f5csp736374wra; Fri, 2 Feb 2018 05:22:13 -0800 (PST) X-Google-Smtp-Source: AH8x227TnI7IVYlK3QV1ZxKYbqCuesL4muF/EE/CqnMqs85JVF6KxIgnEoyf6OkolbIhMXxHbV2k X-Received: by 10.98.101.71 with SMTP id z68mr40246310pfb.181.1517577733707; Fri, 02 Feb 2018 05:22:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517577733; cv=none; d=google.com; s=arc-20160816; b=Y1LshaohKtvHi3U6SoOUwW8PoAhFInuy4uKNOrIZ7pYFA5ESlhU4udIx261fg4fDy5 xb2AYhHmu26nWKoBuOvymdiA/BZlJrup61DapVhr9ublZxxmbQDG512olAo2QcxYn6hN RKZjDG9eYUwrNNiTlKOBJw0HNQJOauoYTvD8FqPeNJ6vst5f93gyZ3DpI6w8DzS6aOcB 3vBUzMp9PnH3KkUKKyRW4ZPqnpweWIPlk1RVCVD0r4jLSYnU/DMSEWQmwXQwgZtTUz// AAkzuvPs16d+xUx5MWcSRxIg5I8k8BSihiep/CdWjFZipDGWo9HnF5yrtTqEEOzNm+Rm MZhg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=RLUnxSUv1nyX5bPbMDuR3bf3vp6+Z3qBpK+LNGLGHxM=; b=HclxuEoyDogjbUkX3CaajEPovD/lPDV2iQlmyxBcdyu9szAfWg31USSd96/28GF3cc 4yGIy+uuf6prRw5o3NNgPUFqUjeazez9W81i1HgTyJmpi9lmdUodFj/Y9P2RO24VLcpI ChdSSmPMoxO9RFCPvYuKJoT8OWTSlt+qxQdhymNRsFCObvkxVO63P7tyaj8wcGandRzq 6+EvS4APr7SiBpZ3ov5LlsJeMFNGM/hns0nEN/ooUFzVs3d+OnLYIra+nawp7XF6+KsD YhRjyKXHgfKSbRQmCCUevGI/PwhGUXenBmZkVxAVsvQ34heBI7HcsmMMjMhs0DUYi9lQ hQww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=qbI4NOB0; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si1432717pgt.674.2018.02.02.05.21.58; Fri, 02 Feb 2018 05:22:13 -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=@ti.com header.s=ti-com-17Q1 header.b=qbI4NOB0; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751979AbeBBNUV (ORCPT + 99 others); Fri, 2 Feb 2018 08:20:21 -0500 Received: from fllnx209.ext.ti.com ([198.47.19.16]:26394 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751470AbeBBNUQ (ORCPT ); Fri, 2 Feb 2018 08:20:16 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w12DJDl6005283; Fri, 2 Feb 2018 07:19:13 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1517577553; bh=kWcG+xiTyk90ipxAeQ5CuVyVRl9oqNuCx/G/DeFHCbI=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=qbI4NOB0YM5Z5UvUlmvVb7BSTbNEFIF/hfWxDwTHupdArGrn/KG5Rtl+fo8lJn39w 0ABNEy/u/UHeE/foffdBnqshOMTwerMKI6gyb6bDN3H4bFh2THHC03a5qs853WpVyb e+IGed+08aFXR5ZQ4ihWXhSHgBQF/w5iXsepMmOM= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w12DJDqH000882; Fri, 2 Feb 2018 07:19:13 -0600 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Fri, 2 Feb 2018 07:19:13 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Fri, 2 Feb 2018 07:19:13 -0600 Received: from [172.24.190.171] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w12DJ8ws029744; Fri, 2 Feb 2018 07:19:08 -0600 Subject: Re: [PATCH v6 18/41] clk: davinci: New driver for TI DA8XX CFGCHIP clocks To: David Lechner , , , CC: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Kevin Hilman , Bartosz Golaszewski , Adam Ford , References: <1516468460-4908-1-git-send-email-david@lechnology.com> <1516468460-4908-19-git-send-email-david@lechnology.com> From: Sekhar Nori Message-ID: Date: Fri, 2 Feb 2018 18:49:07 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1516468460-4908-19-git-send-email-david@lechnology.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 20 January 2018 10:43 PM, David Lechner wrote: > +static const struct clk_ops da8xx_cfgchip_div4p5_clk_ops = { > + .enable = da8xx_cfgchip_gate_clk_enable, > + .disable = da8xx_cfgchip_gate_clk_disable, > + .is_enabled = da8xx_cfgchip_gate_clk_is_enabled, I assume the reason for not using clk-gate.c is lack of regmap support there? > + .recalc_rate = da8xx_cfgchip_div4p5_recalc_rate, > +}; > + > +static struct clk * __init > +da8xx_cfgchip_gate_clk_register(const struct da8xx_cfgchip_gate_clk_info *info, > + const char *parent_name, > + struct regmap *regmap) > +{ > + struct da8xx_cfgchip_gate_clk *gate; > + struct clk_init_data init; > + > + gate = kzalloc(sizeof(*gate), GFP_KERNEL); > + if (!gate) > + return ERR_PTR(-ENOMEM); > + > + init.name = info->name; > + if (info->flags & DA8XX_GATE_CLOCK_IS_DIV4P5) > + init.ops = &da8xx_cfgchip_div4p5_clk_ops; > + else > + init.ops = &da8xx_cfgchip_gate_clk_ops; This will be easier to read using ternary operator, I think. But you will probably have line breaks. Thanks, Sekhar