From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Figa Subject: Re: [PATCH 01/16] ARM: dts: exynos4210: Replace legacy GPIO bank nodes with pinctrl bank nodes Date: Wed, 10 Oct 2012 20:22:51 +0200 Message-ID: <96424007.y4zaCRkHIe@flatron> References: <1349685556-23718-1-git-send-email-t.figa@samsung.com> <5075A1EF.60900@wwwdotorg.org> <20121010181253.GQ12552@atomide.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7476724617363955397==" Return-path: In-Reply-To: <20121010181253.GQ12552@atomide.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Tony Lindgren Cc: linux-samsung-soc@vger.kernel.org, Stephen Warren , devicetree-discuss@lists.ozlabs.org, kyungmin.park@samsung.com, kgene.kim@samsung.com, Linus Walleij , linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com List-Id: devicetree@vger.kernel.org This is a multi-part message in MIME format. --===============7476724617363955397== Content-Type: multipart/alternative; boundary="nextPart2330454.ke8rkMPPQu" Content-Transfer-Encoding: 7Bit This is a multi-part message in MIME format. --nextPart2330454.ke8rkMPPQu Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Dnia =C5=9Broda, 10 pa=C5=BAdziernika 2012 11:12:53 Tony Lindgren pisze= : > * Stephen Warren [121010 09:36]: > > On 10/10/2012 01:26 AM, Linus Walleij wrote: > > > On Mon, Oct 8, 2012 at 10:39 AM, Tomasz Figa = =20 wrote: > > >> Seuqential patches from this series introduce SoC-specific data=20= parsing > > >> from device tree. > > >>=20 > > >> This patch removes legacy GPIO bank nodes from exynos4210.dtsi a= nd > > >> replaces them with nodes and properties required for these patch= es. > > >=20 > > > So to be clear: > > >> + pinctrl-bank-types { > > >> + bank_off: bank-off { > > >> + samsung,reg-names =3D "func", "dat", "pu= d", > > >> + "drv", "conpdn",= > > >> "pudpdn"; > > >> + samsung,reg-params =3D <0x00 4>, <0x04 1= >,=20 <0x08 > > >> 2>, > > >> + <0x0C 2>, <0x10 = 2>, > > >> <0x14 2>; + }; > > >=20 > > > This is starting to look like a firmware language, I have mixed > > > feelings about this. Shall this be read: > > >=20 > > > "Poke 4 into 0x00, poke 1 into 0x04, poke 2 into 0x08" etc? > > >=20 > > > We really need to discuss this, Grant has already NACK:ed > > > such approaches once. > >=20 > > Well, I don't think he NACK'd Tony Lindgren's generic pinctrl drive= r, > > which is doing this exact same thing. I did raise the same point ab= out > > Tony's driver when he posted it, but nobody seemed inclined to NACK= it > > based on that at the time, IIRC... >=20 > To summarize, using reg value pairs in DT makes sense if the amount > of data is huge. Otherwise we'll be describing indidual hardware bits= > as properties in DT, or have to have huge amounts of static data in > the kernel. >=20 > Where it does not make sense is if there's a sequence of reads > and writes with test loops in between.. But that's does not look > to be the case here. >=20 > The reg value pairs will be readable when the DT preprocessing is > available, and that allows the values to be orred together while > DT properties don't. The alternative is to describe hardware register= > bits as DT properties, which is very bloated. >=20 > But considering all this.. Are the samsung,reg-names really needed > by the kernel? They are used to specify which registers are defined in reg-params prop= erty=20 and in which order. Most of the registers are not mandatory and this is= =20 needed to be able to specify only those that are present. At least I=20= couldn't think of a better solution for this. Do you have some suggesti= ons? Best regards, Tomasz Figa --nextPart2330454.ke8rkMPPQu Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"

Dni= a =C5=9Broda, 10 pa=C5=BAdziernika 2012 11:12:53 Tony Lindgren pisze:

>= ; * Stephen Warren <swarren@wwwdotorg.org> [121010 09:36]:

>= ; > On 10/10/2012 01:26 AM, Linus Walleij wrote:

>= ; > > On Mon, Oct 8, 2012 at 10:39 AM, Tomasz Figa <t.figa@sam= sung.com> wrote:

>= ; > >> Seuqential patches from this series introduce SoC-speci= fic data parsing

>= ; > >> from device tree.

>= ; > >>

>= ; > >> This patch removes legacy GPIO bank nodes from exynos42= 10.dtsi and

>= ; > >> replaces them with nodes and properties required for th= ese patches.

>= ; > >

>= ; > > So to be clear:

>= ; > >> + pinctrl-bank-types {

>= ; > >> + bank_off: bank-off {

>= ; > >> + samsung,reg-names =3D "fun= c", "dat", "pud",

>= ; > >> + "d= rv", "conpdn",

>= ; > >> "pudpdn";

>= ; > >> + samsung,reg-params =3D <0x00= 4>, <0x04 1>, <0x08

>= ; > >> 2>,

>= ; > >> + <0x0= C 2>, <0x10 2>,

>= ; > >> <0x14 2>; + };

>= ; > >

>= ; > > This is starting to look like a firmware language, I have m= ixed

>= ; > > feelings about this. Shall this be read:

>= ; > >

>= ; > > "Poke 4 into 0x00, poke 1 into 0x04, poke 2 into 0x08&= quot; etc?

>= ; > >

>= ; > > We really need to discuss this, Grant has already NACK:ed

>= ; > > such approaches once.

>= ; >

>= ; > Well, I don't think he NACK'd Tony Lindgren's generic pinctrl dr= iver,

>= ; > which is doing this exact same thing. I did raise the same point= about

>= ; > Tony's driver when he posted it, but nobody seemed inclined to N= ACK it

>= ; > based on that at the time, IIRC...

>= ;

>= ; To summarize, using reg value pairs in DT makes sense if the amount

>= ; of data is huge. Otherwise we'll be describing indidual hardware bits=

>= ; as properties in DT, or have to have huge amounts of static data in

>= ; the kernel.

>= ;

>= ; Where it does not make sense is if there's a sequence of reads

>= ; and writes with test loops in between.. But that's does not look

>= ; to be the case here.

>= ;

>= ; The reg value pairs will be readable when the DT preprocessing is

=

>= ; available, and that allows the values to be orred together while

>= ; DT properties don't. The alternative is to describe hardware register=

>= ; bits as DT properties, which is very bloated.

>= ;

>= ; But considering all this.. Are the samsung,reg-names really needed

>= ; by the kernel?

 

The= y are used to specify which registers are defined in reg-params propert= y and in which order. Most of the registers are not mandatory and this = is needed to be able to specify only those that are present. At least I= couldn't think of a better solution for this. Do you have some suggest= ions?

 

Bes= t regards,

Tom= asz Figa

 

--nextPart2330454.ke8rkMPPQu-- --===============7476724617363955397== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============7476724617363955397==--