public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ajay Bhargav <ajay.bhargav@einfochips.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] gpio: Add GPIO driver framework for Marvell SoCs
Date: Fri, 22 Jul 2011 10:08:02 +0530 (IST)	[thread overview]
Message-ID: <1945251147.44575.1311309482259.JavaMail.root@ahm.einfochips.com> (raw)
In-Reply-To: <F766E4F80769BD478052FB6533FA745D19FB089AF0@SC-VEXCH4.marvell.com>

Hi Prafulla,

Thank you so much for feedback.

> In this case mvgpio.c is enabling support for gpio framework that will
> be interfaced using asm/gpio.h.
> 
> 1. You can split stuff in mvgpio.h to asm/arch/gpio.h and/or mvgpio.c
> 2. you can move it to drivers/gpio/
> 
> I would recommend first option.
>  
So you mean the first patch will have only mvgpio.c that enables the support
for gpio for Marvell SoCs and then second patch will enable support for Armada
series via gpio.h file. So if anyone want to use mvgpio.c he/she should write a
compatible version of gpio.h in their arch folder. I hope i am getting your right.

> > +static int get_gpio_base(int bank)
> > +{
> > +        switch (bank) {
> > +        case 0:
> > +                return GPIO_BANK0_BASE;
> > +        case 1:
> > +                return GPIO_BANK1_BASE;
> > +        case 2:
> > +                return GPIO_BANK2_BASE;
> > +        case 3:
> > +                return GPIO_BANK3_BASE;
> > +        }
> > +        return 0;
> > +}
> 
> As discussed, this would be preferred macro in gpio.h
> 
I am finding it difficult to fit this as a macro. so i thought to have it as
inline function in gpio.h will that be ok?

Regards,
Ajay Bhargav

  reply	other threads:[~2011-07-22  4:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21  5:39 [U-Boot] [PATCH 1/2] gpio: Add GPIO driver framework for Marvell SoCs Ajay Bhargav
2011-07-21  6:40 ` Lei Wen
2011-07-21 13:41 ` Mike Frysinger
2011-07-21 22:36 ` Prafulla Wadaskar
2011-07-22  4:38   ` Ajay Bhargav [this message]
2011-07-22  7:02     ` Prafulla Wadaskar
2011-07-22  7:02       ` Ajay Bhargav
2011-07-21 22:45 ` Prafulla Wadaskar
     [not found] <1615493972.40419.1311230353868.JavaMail.root@ahm.einfochips.com>
2011-07-21  6:41 ` Ajay Bhargav
     [not found] <92930777.42522.1311251223310.JavaMail.root@ahm.einfochips.com>
2011-07-21 12:34 ` Ajay Bhargav
2011-07-21 14:01   ` Lei Wen

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=1945251147.44575.1311309482259.JavaMail.root@ahm.einfochips.com \
    --to=ajay.bhargav@einfochips.com \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox