Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2288250imm; Thu, 11 Oct 2018 08:02:09 -0700 (PDT) X-Google-Smtp-Source: ACcGV6256eboKnM1DIkm7S2GzgZrMNtq8ng2I4xsw4PAWafKucDP2qg99ow45vUNYlgyUha1J+Oi X-Received: by 2002:a17:902:5c4:: with SMTP id f62-v6mr1967713plf.18.1539270128965; Thu, 11 Oct 2018 08:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539270128; cv=none; d=google.com; s=arc-20160816; b=rkENQWOUL8PyLVT1mWsDFDjW4twOH7K7D9O8IV+wit48KkduVHBFStDmTFgmCS9xSa rDmFLEBO4C4OaRk93EK7zbwdU5+H45b/ypEdQQaVOLJYNUNPNSZaEuJe5F+rXuJxA3Yu /g1K2/XEIcSt2gu5r6IIDgThRA9dqLCIGmolIAHPA/jXX/Ak1pICwUaxw42VT2NGHXft 9q7oahIt3guZG31fuRXVygU+t7nZX6Q9WyP9eJsuKLdK2eZ2a87b+Nhg1L3Fj2a0QHVA Agh+wYQT+fy22Zh4hdlAMfMjLuWCQ0uBb60Q7/TX6WXglLcBhv9ICaPem68a3RpAbDiW sb8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TCLng7w7kxew+FKYbtyLDyjZ3+fnEkyKO2PrKXbvdNE=; b=YHw/whKIShKr6oJSpt8QFBzCzA4wiLKD7JfETppM/WmZ5meVgnMxR2vUpdRKhZbIhC LFvnramgLG7E/5XGX69KeL4tMpG82WnCQ+4tj0/PHBCedmVccFeJCW/F8A1ssY7OuqAC Gh5lyc+wts1OyVM651mGwyKUtg36avkebuwoa+39+h/6F3YWIYYodX2D1ooEFVvwvXyM nuhLlZj/g+QKY8bBf+4Fj7eogFiuSjCUDKf8ow76az432ibdCem3yUPQaJKRBz8fE08Z sDpWDJ3ygiNSGwC1mIpN/Cc2JPC6APruU0u1u09iQ0kPkIB2N1olWzu524Wopwb/mvoH eChA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=mjnWlJME; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s6-v6si36395776pfd.59.2018.10.11.08.01.54; Thu, 11 Oct 2018 08:02:08 -0700 (PDT) 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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=mjnWlJME; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726984AbeJKWV7 (ORCPT + 99 others); Thu, 11 Oct 2018 18:21:59 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:43384 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbeJKWV7 (ORCPT ); Thu, 11 Oct 2018 18:21:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=TCLng7w7kxew+FKYbtyLDyjZ3+fnEkyKO2PrKXbvdNE=; b=mjnWlJMErM6KNINZHFTzeICeN R4dEHVPJI8zJWsO5q2iLrOfxJHYmWWeDGEbMxckdPRekKnCFbTU+3GR0/66Btsh6+KcxBk9ltOBuW WXc/iLFaXSxJ+UoHUA1ILJ7+zT3PYgdSZWa+IzHolPLKavbJXg825IpZBRlJ6xCBzBR9U=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gAcM3-0001s2-3j; Thu, 11 Oct 2018 14:54:23 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id CB37E11223ED; Thu, 11 Oct 2018 15:54:22 +0100 (BST) Date: Thu, 11 Oct 2018 15:54:22 +0100 From: Mark Brown To: Stephen Boyd Cc: Charles Keepax , lee.jones@linaro.org, linus.walleij@linaro.org, mturquette@baylibre.com, robh+dt@kernel.org, mark.rutland@arm.com, lgirdwood@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH v2 3/5] clk: lochnagar: Add support for the Cirrus Logic Lochnagar Message-ID: <20181011145422.GG25351@sirena.org.uk> References: <20181008132542.19775-1-ckeepax@opensource.cirrus.com> <20181008132542.19775-3-ckeepax@opensource.cirrus.com> <153924124658.207691.10370075148426001371@swboyd.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="df+09Je9rNq3P+GE" Content-Disposition: inline In-Reply-To: <153924124658.207691.10370075148426001371@swboyd.mtv.corp.google.com> X-Cookie: Use at own risk. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --df+09Je9rNq3P+GE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 11, 2018 at 12:00:46AM -0700, Stephen Boyd wrote: > Quoting Charles Keepax (2018-10-08 06:25:40) > > +struct lochnagar_regmap_clk { > > + unsigned int cfg_reg; > > + unsigned int ena_mask; > > + unsigned int dir_mask; > > + > > + unsigned int src_reg; > > + unsigned int src_mask; > Are these 32 bits or 16 bits or 8 bits? Please use a u32/u16/u8 so we > know the register width. Note that regmap always uses unsigned int to represent registers regardless of the underlying physical register width, this can be an issue on reads since we pass the destination for the read in by address. > > +struct lochnagar_clk_priv { > > + struct device *dev; > > + struct lochnagar *lochnagar; > Is this used for anything besides getting the regmap? Can you get the > pointer to the parent in probe and use that to get the regmap pointer > from dev_get_remap() and also use the of_node of the parent to register dev_get_regmap() is pretty expensive, I'd not advise using it in anything that might approximate a fast path. It's kind of debatable when I2C gets involved but still feels wrong. --df+09Je9rNq3P+GE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlu/ZB4ACgkQJNaLcl1U h9DNJAf9EKHrofZgBKsBnywuSARMnN1WAY1k6GAd/yVMp1Ri4P1CQ5MtrBdFEHce IAGb09TNUUTrfG0VudexTn7YEc8zi/hZ7kNBFD383zkAlgyP2y3LRZRCftvgITOd KvgC4yxNVD9exrB1T/WhZh7q9rxv7qwpZwvIOfYzO+vxAtxuAvaTJk+tfKOHSi2H 20kFHKH3BgbtZYucNSlh9spFqIwT2HP7H27TFWbfDd34Gbg4f/9VeKIrtDlEFbTb EXfwpQasMEEBFv4SBJ056jPvDIzhxCZy7b7afuSbgwdjfWzfcaeS7MoqdaOVX1Ci ekUtnCdiZ+ujH8ekjSWAEuDFjrs2GA== =uWfp -----END PGP SIGNATURE----- --df+09Je9rNq3P+GE--