From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kishon Vijay Abraham I Subject: Re: [PATCH 1/2] regulator: pbias: use untranslated address to program pbias regulator Date: Mon, 31 Aug 2015 16:14:07 +0530 Message-ID: <55E42FF7.9010706@ti.com> References: <1437996250-2913-1-git-send-email-kishon@ti.com> <1437996250-2913-2-git-send-email-kishon@ti.com> <20150814180006.GB10748@sirena.org.uk> <55D2C872.9000400@ti.com> <20150819181149.GZ10748@sirena.org.uk> <55DC3D58.4030409@ti.com> <20150825135044.GJ27431@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150825135044.GJ27431@sirena.org.uk> Sender: linux-kernel-owner@vger.kernel.org To: Mark Brown , Grygorii Strashko Cc: tony@atomide.com, lgirdwood@gmail.com, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, nsekhar@ti.com, Tero Kristo List-Id: linux-omap@vger.kernel.org Hi Mark, On Tuesday 25 August 2015 07:20 PM, Mark Brown wrote: > On Tue, Aug 25, 2015 at 01:03:04PM +0300, Grygorii Strashko wrote: >> On 08/19/2015 09:11 PM, Mark Brown wrote: > >>> So substract this address from the start of the resource to get the >>> offset? Or provide a wrapper function in the resource code which does >>> that. > >> I'd be very appreciated if you have and can share any thought on >> How can we get this absolute base address to substract? > > Ask the syscon device for its resource? Or have it provide an absolute Even if we get the absolute address of syscon, we have to do the subtraction only for the newer dtbs (previous dtbs already have only the offset). Do you recommend adding a new property to differentiate between older dtbs and newer dtbs? Any other suggestions here? > address based interface for that matter? Syscon doesn't directly expose any API's to write to it's register. Rather it uses regmap APIs to read/write to it's register. I'm not sure if it's possible to add regmap APIs to write to a register with absolute address. Any hints? Thanks Kishon From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752796AbbHaKoR (ORCPT ); Mon, 31 Aug 2015 06:44:17 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:51897 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752036AbbHaKoQ (ORCPT ); Mon, 31 Aug 2015 06:44:16 -0400 Message-ID: <55E42FF7.9010706@ti.com> Date: Mon, 31 Aug 2015 16:14:07 +0530 From: Kishon Vijay Abraham I User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Mark Brown , Grygorii Strashko CC: , , , , , Tero Kristo Subject: Re: [PATCH 1/2] regulator: pbias: use untranslated address to program pbias regulator References: <1437996250-2913-1-git-send-email-kishon@ti.com> <1437996250-2913-2-git-send-email-kishon@ti.com> <20150814180006.GB10748@sirena.org.uk> <55D2C872.9000400@ti.com> <20150819181149.GZ10748@sirena.org.uk> <55DC3D58.4030409@ti.com> <20150825135044.GJ27431@sirena.org.uk> In-Reply-To: <20150825135044.GJ27431@sirena.org.uk> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, On Tuesday 25 August 2015 07:20 PM, Mark Brown wrote: > On Tue, Aug 25, 2015 at 01:03:04PM +0300, Grygorii Strashko wrote: >> On 08/19/2015 09:11 PM, Mark Brown wrote: > >>> So substract this address from the start of the resource to get the >>> offset? Or provide a wrapper function in the resource code which does >>> that. > >> I'd be very appreciated if you have and can share any thought on >> How can we get this absolute base address to substract? > > Ask the syscon device for its resource? Or have it provide an absolute Even if we get the absolute address of syscon, we have to do the subtraction only for the newer dtbs (previous dtbs already have only the offset). Do you recommend adding a new property to differentiate between older dtbs and newer dtbs? Any other suggestions here? > address based interface for that matter? Syscon doesn't directly expose any API's to write to it's register. Rather it uses regmap APIs to read/write to it's register. I'm not sure if it's possible to add regmap APIs to write to a register with absolute address. Any hints? Thanks Kishon