All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: Vasily Khoruzhick <anarsoul@gmail.com>
Cc: "Arnaud Patard (Rtp)" <arnaud.patard@rtp-net.org>,
	linux-samsung-soc@vger.kernel.org,
	Ben Dooks <ben-linux@fluff.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] h1940: use gpiolib for latch access
Date: Tue, 24 Aug 2010 16:40:21 +0200	[thread overview]
Message-ID: <201008241640.21488.marek.vasut@gmail.com> (raw)
In-Reply-To: <201008241704.07384.anarsoul@gmail.com>

Dne Út 24. srpna 2010 16:04:00 Vasily Khoruzhick napsal(a):
> В сообщении от 24 августа 2010 16:49:51 автор Marek Vasut написал:
> > > +	ret = gpio_request(H1940_LATCH_BLUETOOTH_POWER, dev_name(&pdev-
> >
> >dev));
> >
> > This should contain the name of the GPIO, not dev_name I assume.
> 
> Ok
> 
> > > +	if (ret) {
> > > +		gpio_free(S3C2410_GPH(1));
> > 
> > What's this constant (the 1) here ? Maybe some sane #define wont hurt or
> > comment around it.
> 
> GPH(1) specifies gpio bit, that's not magic constant.

Defining S3C2410_GPH_GPIONAME for each bit might be better then.

> 
> > > +#ifndef __ASSEMBLY__
> > > +#define H1940_LATCH		((void __force __iomem *)0xF8000000)
> > > +#else
> > > +#define H1940_LATCH		0xF8000000
> > > +#endif
> > 
> > Is the __ASSEMBLY__ really needed ? You can establish mapping when the
> > kernel boots (looks like you're doing that already) but then use
> > __raw_readX __raw_writeX to access that space instead of this stuff
> > above.
> 
> Uh, I just moved this code from another file, not sure if __ASSEMBLY__ is
> necessary, I'll remove it if it is not.

Well this isn't included in any assembly file. So it's not. Also, I'd be happier 
if you could fix it the way I outlined.

Check for example mach-pxa/balloon3.c and how NAND access is done there. Cheers
> 
> Thanks for review :)

You're welcome.
> 
> Regards
> Vasily

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: marek.vasut@gmail.com (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] h1940: use gpiolib for latch access
Date: Tue, 24 Aug 2010 16:40:21 +0200	[thread overview]
Message-ID: <201008241640.21488.marek.vasut@gmail.com> (raw)
In-Reply-To: <201008241704.07384.anarsoul@gmail.com>

Dne ?t 24. srpna 2010 16:04:00 Vasily Khoruzhick napsal(a):
> ? ????????? ?? 24 ??????? 2010 16:49:51 ????? Marek Vasut ???????:
> > > +	ret = gpio_request(H1940_LATCH_BLUETOOTH_POWER, dev_name(&pdev-
> >
> >dev));
> >
> > This should contain the name of the GPIO, not dev_name I assume.
> 
> Ok
> 
> > > +	if (ret) {
> > > +		gpio_free(S3C2410_GPH(1));
> > 
> > What's this constant (the 1) here ? Maybe some sane #define wont hurt or
> > comment around it.
> 
> GPH(1) specifies gpio bit, that's not magic constant.

Defining S3C2410_GPH_GPIONAME for each bit might be better then.

> 
> > > +#ifndef __ASSEMBLY__
> > > +#define H1940_LATCH		((void __force __iomem *)0xF8000000)
> > > +#else
> > > +#define H1940_LATCH		0xF8000000
> > > +#endif
> > 
> > Is the __ASSEMBLY__ really needed ? You can establish mapping when the
> > kernel boots (looks like you're doing that already) but then use
> > __raw_readX __raw_writeX to access that space instead of this stuff
> > above.
> 
> Uh, I just moved this code from another file, not sure if __ASSEMBLY__ is
> necessary, I'll remove it if it is not.

Well this isn't included in any assembly file. So it's not. Also, I'd be happier 
if you could fix it the way I outlined.

Check for example mach-pxa/balloon3.c and how NAND access is done there. Cheers
> 
> Thanks for review :)

You're welcome.
> 
> Regards
> Vasily

  reply	other threads:[~2010-08-24 14:40 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19 15:00 [PATCH 0/3] h1940 series Vasily Khoruzhick
2010-08-19 15:00 ` Vasily Khoruzhick
2010-08-19 15:00 ` [PATCH 1/3] h1940: use gpiolib for latch access Vasily Khoruzhick
2010-08-19 15:00   ` Vasily Khoruzhick
2010-08-24 13:49   ` Marek Vasut
2010-08-24 13:49     ` Marek Vasut
2010-08-24 14:04     ` Vasily Khoruzhick
2010-08-24 14:04       ` Vasily Khoruzhick
2010-08-24 14:40       ` Marek Vasut [this message]
2010-08-24 14:40         ` Marek Vasut
2010-08-24 14:50         ` Vasily Khoruzhick
2010-08-24 14:50           ` Vasily Khoruzhick
2010-08-24 15:04           ` Marek Vasut
2010-08-24 15:04             ` Marek Vasut
2010-09-02 10:53   ` Russell King - ARM Linux
2010-09-02 10:53     ` Russell King - ARM Linux
2010-08-19 15:00 ` [PATCH 2/3] h1940: fix h1940-bluetooth compilation Vasily Khoruzhick
2010-08-19 15:00   ` Vasily Khoruzhick
2010-08-24 13:50   ` Marek Vasut
2010-08-24 13:50     ` Marek Vasut
2010-08-24 13:57     ` Vasily Khoruzhick
2010-08-24 13:57       ` Vasily Khoruzhick
2010-08-24 14:00       ` Marek Vasut
2010-08-24 14:00         ` Marek Vasut
2010-08-19 15:00 ` [PATCH 3/3] h1940: implement mmc_power function Vasily Khoruzhick
2010-08-19 15:00   ` Vasily Khoruzhick
2010-08-24 13:52   ` Marek Vasut
2010-08-24 13:52     ` Marek Vasut
2010-08-24 14:00     ` Vasily Khoruzhick
2010-08-24 14:00       ` Vasily Khoruzhick
2010-08-24 14:01       ` Marek Vasut
2010-08-24 14:01         ` Marek Vasut
2010-08-24 14:21         ` Vasily Khoruzhick
2010-08-24 14:21           ` Vasily Khoruzhick
2010-08-24 14:41           ` Marek Vasut
2010-08-24 14:41             ` Marek Vasut
2010-08-24 14:56             ` Vasily Khoruzhick
2010-08-24 14:56               ` Vasily Khoruzhick
2010-08-24 15:07               ` Marek Vasut
2010-08-24 15:07                 ` Marek Vasut
2010-08-24 15:19                 ` Vasily Khoruzhick
2010-08-24 15:19                   ` Vasily Khoruzhick
2010-08-24 13:24 ` [PATCH 0/3] h1940 series Vasily Khoruzhick
2010-08-24 13:24   ` Vasily Khoruzhick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201008241640.21488.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=anarsoul@gmail.com \
    --cc=arnaud.patard@rtp-net.org \
    --cc=ben-linux@fluff.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.