From: "Bryan Wu" <cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: [PATCH 2/6] Blackfin I2C/TWI driver: Add platform_resource interface to support multi-port TWI controllers
Date: Tue, 25 Mar 2008 11:16:45 +0800 [thread overview]
Message-ID: <386072610803242016h2aa2bf79q1483456495e5da6f@mail.gmail.com> (raw)
In-Reply-To: <20080324204938.31350213-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
On Tue, Mar 25, 2008 at 3:49 AM, Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org> wrote:
> On Fri, 14 Mar 2008 00:22:36 -0700, Bryan Wu wrote:
> > From: Bryan Wu <bryan.wu-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
> >
> > - Dynamic alloc the resource of TWI driver data according to board information
> > - TWI register read/write accessor based on dynamic regs_base
> > - Support TWI0/TWI1 for BF54x
> >
> > Signed-off-by: Bryan Wu <bryan.wu-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
> > Signed-off-by: Bryan Wu <cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> > ---
> > drivers/i2c/busses/i2c-bfin-twi.c | 281 +++++++++++++++++++++++--------------
> > 1 files changed, 174 insertions(+), 107 deletions(-)
>
> Looks good, except:
>
>
> > diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c
> > index ea15125..515fe08 100644
> > --- a/drivers/i2c/busses/i2c-bfin-twi.c
> > +++ b/drivers/i2c/busses/i2c-bfin-twi.c
> > (...)
>
> > @@ -593,39 +646,55 @@ static int i2c_bfin_twi_probe(struct platform_device *dev)
> > (...)
>
> > + return 0;
> > +
> > +out_error_add_adapter:
> > + free_irq(iface->irq, iface);
> > +out_error_req_irq:
> > +out_error_no_irq:
> > + iounmap(iface->regs_base);
> > +out_error_ioremap:
> > +out_error_get_res:
> > + kfree(iface);
> > +out_error_nomem:
> > return rc;
> > }
>
> You forgot to add the same steps when removing the device in
> i2c_bfin_twi_remove(): you must call iounmap() and kfree() there too!
>
Exactly, I will add them.
> Also, it looks to me like this patch makes many bfin_read_TWI_* and
> bfin_write_TWI_* macros in include/asm-blackfin/mach-bf537/cdefBF534.h
> and include/asm-blackfin/mach-bf527/cdefBF52x_base.h unneeded, so it
> would probably be a good idea to delete them now to avoid any confusion?
>
This bfin_write_TWI_* macros are generated by script automatically. As
we moved to use low level bfin_write/bfin_read
, those TWI macros are useless. I will remove them in other patch.
Thanks a lot
-Bryan
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
prev parent reply other threads:[~2008-03-25 3:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-12 16:27 [PATCH 2/6] Blackfin I2C/TWI driver: Add platform_resource interface to support multi-port TWI controllers Bryan Wu
[not found] ` <1205479360-25240-3-git-send-email-cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2008-03-24 19:49 ` Jean Delvare
[not found] ` <20080324204938.31350213-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-03-25 3:16 ` Bryan Wu [this message]
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=386072610803242016h2aa2bf79q1483456495e5da6f@mail.gmail.com \
--to=cooloney-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox