From: "Uwe Kleine-König" <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Eddie Huang <eddie.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
Matthias Brugger
<matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Jean Delvare <jdelvare-l3A5Bk7waGM@public.gmane.org>,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
Andrew Bresticker
<abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
Max Schwarz <max.schwarz-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>,
Boris BREZILLON
<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Anders Berg <anders.berg-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org>,
Neelesh Gupta
<neelegup-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
Wei Yan <sledge.yanwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
Jim Cromie <jim.cromie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Bjorn Andersson
<bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>,
Beniamino Galvani <b.galvani@gmail.>
Subject: Re: [PATCH v4 2/2] I2C: mediatek: Add driver for MediaTek I2C controller
Date: Wed, 21 Jan 2015 09:20:22 +0100 [thread overview]
Message-ID: <20150121082022.GT22880@pengutronix.de> (raw)
In-Reply-To: <1421810004.15468.825.camel@mtksdaap41>
Hello,
On Wed, Jan 21, 2015 at 11:13:24AM +0800, Eddie Huang wrote:
> > > + /* set when doing the transfer */
> > > + u16 irq_stat; /* interrupt status */
> > > + unsigned int speed_hz; /* The speed in transfer */
> > > + bool trans_stop; /* i2c transfer stop */
> > > + enum mtk_trans_op op;
> > > + u16 msg_len;
> > > + u8 *msg_buf; /* pointer to msg data */
> > > + u16 msg_aux_len; /* WRRD mode to set AUX_LEN register*/
> > > + u16 addr; /* 7bit slave address, without read/write bit */
> > Wouldn't it be easier to maintain a pointer to the message to be
> > transferred?
> I think use mtk_i2c pointer is more flexible than maintain a pointer to
> message.
Not sure you understood what I intended to suggest. My idea was to drop
u16 msg_len;
u8 *msg_buf;
u16 msg_aux_len; // maybe
u16 addr;
from struct mtk_i2c and add a struct i2c_msg *msg instead. Up to you to
decide.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-01-21 8:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-16 10:33 [PATCH v4 0/2] ARM: mediatek: Add driver for Mediatek I2C controller Eddie Huang
2015-01-16 10:33 ` [PATCH v4 1/2] dt-bindings: Add I2C bindings for mt65xx/mt81xx Eddie Huang
[not found] ` <1421404418-50718-1-git-send-email-eddie.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-01-16 10:33 ` [PATCH v4 2/2] I2C: mediatek: Add driver for MediaTek I2C controller Eddie Huang
[not found] ` <1421404418-50718-3-git-send-email-eddie.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-01-18 10:18 ` Uwe Kleine-König
[not found] ` <20150118101816.GF22880-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-01-21 3:13 ` Eddie Huang
2015-01-21 6:30 ` Yingjoe Chen
2015-01-21 8:15 ` Uwe Kleine-König
[not found] ` <20150121081519.GS22880-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-01-21 12:49 ` Yingjoe Chen
2015-01-21 15:31 ` Uwe Kleine-König
[not found] ` <20150121153131.GV22880-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-01-22 1:30 ` Yingjoe Chen
2015-01-21 8:20 ` Uwe Kleine-König [this message]
[not found] ` <20150121082022.GT22880-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-01-21 8:34 ` Eddie Huang
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=20150121082022.GT22880@pengutronix.de \
--to=u.kleine-koenig-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=anders.berg-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=b.galvani@gmail. \
--cc=bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org \
--cc=boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=eddie.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=jdelvare-l3A5Bk7waGM@public.gmane.org \
--cc=jim.cromie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=max.schwarz-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org \
--cc=neelegup-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=sledge.yanwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@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;
as well as URLs for NNTP newsgroup(s).