All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sricharan" <sricharan@codeaurora.org>
To: "'Ivan T. Ivanov'" <iivanov@mm-sol.com>
Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	galak@codeaurora.org, linux-kernel@vger.kernel.org,
	linux-i2c@vger.kernel.org, agross@codeaurora.org,
	dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: RE: [PATCH V4 4/7] i2c: qup: Transfer each i2c_msg in i2c_msgs without a stop bit
Date: Tue, 21 Jul 2015 13:39:46 +0530	[thread overview]
Message-ID: <000601d0c38c$9f4177d0$ddc46770$@codeaurora.org> (raw)
In-Reply-To: <1437391374.6267.7.camel@mm-sol.com>

Hi Ivan,

> -----Original Message-----
> From: Ivan T. Ivanov [mailto:iivanov@mm-sol.com]
> Sent: Monday, July 20, 2015 4:53 PM
> To: Sricharan R
> Cc: devicetree@vger.kernel.org; linux-arm-msm@vger.kernel.org;
> galak@codeaurora.org; linux-kernel@vger.kernel.org; linux-
> i2c@vger.kernel.org; agross@codeaurora.org; dmaengine@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org
> Subject: Re: [PATCH V4 4/7] i2c: qup: Transfer each i2c_msg in i2c_msgs
> without a stop bit
> 
> 
> Hi,
> 
> On Thu, 2015-07-09 at 08:55 +0530, Sricharan R wrote:
> 
> <snip>
> 
> >  #define ONE_BYTE                       0x1
> > +#define QUP_I2C_MX_CONFIG_DURING_RUN   BIT(31)
> >
> >  struct qup_i2c_block {
> >         int     count;
> > @@ -121,6 +122,7 @@ struct qup_i2c_block {
> >         int     rx_tag_len;
> >         int     data_len;
> >         u8      tags[6];
> > +       int     config_run;
> 
> This is not directly related to "block" control logic, right?
> Could it made part of qup_i2c_dev structure?
> 
   Yes, can move it there.

> >  };
> >
> >  struct qup_i2c_dev {
> > @@ -152,6 +154,10 @@ struct qup_i2c_dev {
> >
> >         int (*qup_i2c_write_one)(struct qup_i2c_dev *qup,
> >                                         struct i2c_msg *msg);
> > +       /* Current i2c_msg in i2c_msgs */
> > +       int     cmsg;
> > +       /* total num of i2c_msgs */
> > +       int     num;
> 
> I think it will be simpler with just "bool is_last" evaluated in main xfer loop.
  
   Hmm ok. Will change it that way. Set it one place and use it other places.
> 
> <snip>
> 
> >
> > @@ -374,6 +383,9 @@ static void qup_i2c_get_blk_data(struct
> qup_i2c_dev *qup,
> >         /* There are 2 tag bytes that are read in to fifo for every block */
> >         if (msg->flags & I2C_M_RD)
> >                 qup->blk.rx_tag_len = qup->blk.count * 2;
> > +
> > +       if (qup->cmsg)
> > +               qup->blk.config_run = QUP_I2C_MX_CONFIG_DURING_RUN;
> 
> This could be moved to qup_i2c_xfer_v2() to avoid repeatedly setting it.
     Ok, correct.

Regards,
 Sricharan

WARNING: multiple messages have this Message-ID (diff)
From: sricharan@codeaurora.org (Sricharan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V4 4/7] i2c: qup: Transfer each i2c_msg in i2c_msgs without a stop bit
Date: Tue, 21 Jul 2015 13:39:46 +0530	[thread overview]
Message-ID: <000601d0c38c$9f4177d0$ddc46770$@codeaurora.org> (raw)
In-Reply-To: <1437391374.6267.7.camel@mm-sol.com>

Hi Ivan,

> -----Original Message-----
> From: Ivan T. Ivanov [mailto:iivanov at mm-sol.com]
> Sent: Monday, July 20, 2015 4:53 PM
> To: Sricharan R
> Cc: devicetree at vger.kernel.org; linux-arm-msm at vger.kernel.org;
> galak at codeaurora.org; linux-kernel at vger.kernel.org; linux-
> i2c at vger.kernel.org; agross at codeaurora.org; dmaengine at vger.kernel.org;
> linux-arm-kernel at lists.infradead.org
> Subject: Re: [PATCH V4 4/7] i2c: qup: Transfer each i2c_msg in i2c_msgs
> without a stop bit
> 
> 
> Hi,
> 
> On Thu, 2015-07-09 at 08:55 +0530, Sricharan R wrote:
> 
> <snip>
> 
> >  #define ONE_BYTE                       0x1
> > +#define QUP_I2C_MX_CONFIG_DURING_RUN   BIT(31)
> >
> >  struct qup_i2c_block {
> >         int     count;
> > @@ -121,6 +122,7 @@ struct qup_i2c_block {
> >         int     rx_tag_len;
> >         int     data_len;
> >         u8      tags[6];
> > +       int     config_run;
> 
> This is not directly related to "block" control logic, right?
> Could it made part of qup_i2c_dev structure?
> 
   Yes, can move it there.

> >  };
> >
> >  struct qup_i2c_dev {
> > @@ -152,6 +154,10 @@ struct qup_i2c_dev {
> >
> >         int (*qup_i2c_write_one)(struct qup_i2c_dev *qup,
> >                                         struct i2c_msg *msg);
> > +       /* Current i2c_msg in i2c_msgs */
> > +       int     cmsg;
> > +       /* total num of i2c_msgs */
> > +       int     num;
> 
> I think it will be simpler with just "bool is_last" evaluated in main xfer loop.
  
   Hmm ok. Will change it that way. Set it one place and use it other places.
> 
> <snip>
> 
> >
> > @@ -374,6 +383,9 @@ static void qup_i2c_get_blk_data(struct
> qup_i2c_dev *qup,
> >         /* There are 2 tag bytes that are read in to fifo for every block */
> >         if (msg->flags & I2C_M_RD)
> >                 qup->blk.rx_tag_len = qup->blk.count * 2;
> > +
> > +       if (qup->cmsg)
> > +               qup->blk.config_run = QUP_I2C_MX_CONFIG_DURING_RUN;
> 
> This could be moved to qup_i2c_xfer_v2() to avoid repeatedly setting it.
     Ok, correct.

Regards,
 Sricharan

WARNING: multiple messages have this Message-ID (diff)
From: "Sricharan" <sricharan@codeaurora.org>
To: "'Ivan T. Ivanov'" <iivanov@mm-sol.com>
Cc: <devicetree@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
	<galak@codeaurora.org>, <linux-kernel@vger.kernel.org>,
	<linux-i2c@vger.kernel.org>, <agross@codeaurora.org>,
	<dmaengine@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH V4 4/7] i2c: qup: Transfer each i2c_msg in i2c_msgs without a stop bit
Date: Tue, 21 Jul 2015 13:39:46 +0530	[thread overview]
Message-ID: <000601d0c38c$9f4177d0$ddc46770$@codeaurora.org> (raw)
In-Reply-To: <1437391374.6267.7.camel@mm-sol.com>

Hi Ivan,

> -----Original Message-----
> From: Ivan T. Ivanov [mailto:iivanov@mm-sol.com]
> Sent: Monday, July 20, 2015 4:53 PM
> To: Sricharan R
> Cc: devicetree@vger.kernel.org; linux-arm-msm@vger.kernel.org;
> galak@codeaurora.org; linux-kernel@vger.kernel.org; linux-
> i2c@vger.kernel.org; agross@codeaurora.org; dmaengine@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org
> Subject: Re: [PATCH V4 4/7] i2c: qup: Transfer each i2c_msg in i2c_msgs
> without a stop bit
> 
> 
> Hi,
> 
> On Thu, 2015-07-09 at 08:55 +0530, Sricharan R wrote:
> 
> <snip>
> 
> >  #define ONE_BYTE                       0x1
> > +#define QUP_I2C_MX_CONFIG_DURING_RUN   BIT(31)
> >
> >  struct qup_i2c_block {
> >         int     count;
> > @@ -121,6 +122,7 @@ struct qup_i2c_block {
> >         int     rx_tag_len;
> >         int     data_len;
> >         u8      tags[6];
> > +       int     config_run;
> 
> This is not directly related to "block" control logic, right?
> Could it made part of qup_i2c_dev structure?
> 
   Yes, can move it there.

> >  };
> >
> >  struct qup_i2c_dev {
> > @@ -152,6 +154,10 @@ struct qup_i2c_dev {
> >
> >         int (*qup_i2c_write_one)(struct qup_i2c_dev *qup,
> >                                         struct i2c_msg *msg);
> > +       /* Current i2c_msg in i2c_msgs */
> > +       int     cmsg;
> > +       /* total num of i2c_msgs */
> > +       int     num;
> 
> I think it will be simpler with just "bool is_last" evaluated in main xfer loop.
  
   Hmm ok. Will change it that way. Set it one place and use it other places.
> 
> <snip>
> 
> >
> > @@ -374,6 +383,9 @@ static void qup_i2c_get_blk_data(struct
> qup_i2c_dev *qup,
> >         /* There are 2 tag bytes that are read in to fifo for every block */
> >         if (msg->flags & I2C_M_RD)
> >                 qup->blk.rx_tag_len = qup->blk.count * 2;
> > +
> > +       if (qup->cmsg)
> > +               qup->blk.config_run = QUP_I2C_MX_CONFIG_DURING_RUN;
> 
> This could be moved to qup_i2c_xfer_v2() to avoid repeatedly setting it.
     Ok, correct.

Regards,
 Sricharan


  reply	other threads:[~2015-07-21  8:09 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09  3:25 [PATCH V4 0/7] i2c: qup: Add support for v2 tags and bam dma Sricharan R
2015-07-09  3:25 ` Sricharan R
2015-07-09  3:25 ` Sricharan R
2015-07-09  3:25 ` [PATCH V4 2/7] qup: i2c: factor out common code for reuse Sricharan R
2015-07-09  3:25   ` Sricharan R
2015-07-20  8:25   ` Ivan T. Ivanov
2015-07-20  8:25     ` Ivan T. Ivanov
2015-07-21  6:54     ` Sricharan
2015-07-21  6:54       ` Sricharan
2015-07-21  6:54       ` Sricharan
2015-07-09  3:25 ` [PATCH V4 3/7] i2c: qup: Add V2 tags support Sricharan R
2015-07-09  3:25   ` Sricharan R
2015-07-20  9:44   ` Ivan T. Ivanov
2015-07-20  9:44     ` Ivan T. Ivanov
     [not found]     ` <1437385443.6267.5.camel-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2015-07-21  7:11       ` Sricharan
2015-07-21  7:11         ` Sricharan
2015-07-21  7:11         ` Sricharan
     [not found] ` <1436412350-19519-1-git-send-email-sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-07-09  3:25   ` [PATCH V4 1/7] i2c: qup: Change qup_wait_writeready function to use for all timeouts Sricharan R
2015-07-09  3:25     ` Sricharan R
2015-07-09  3:25     ` Sricharan R
2015-07-09  3:25   ` [PATCH V4 4/7] i2c: qup: Transfer each i2c_msg in i2c_msgs without a stop bit Sricharan R
2015-07-09  3:25     ` Sricharan R
2015-07-09  3:25     ` Sricharan R
     [not found]     ` <1436412350-19519-5-git-send-email-sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-07-20 11:22       ` Ivan T. Ivanov
2015-07-20 11:22         ` Ivan T. Ivanov
2015-07-20 11:22         ` Ivan T. Ivanov
2015-07-21  8:09         ` Sricharan [this message]
2015-07-21  8:09           ` Sricharan
2015-07-21  8:09           ` Sricharan
2015-07-09  3:25   ` [PATCH V4 5/7] i2c: qup: Add bam dma capabilities Sricharan R
2015-07-09  3:25     ` Sricharan R
2015-07-09  3:25     ` Sricharan R
2015-07-20 14:46     ` Ivan T. Ivanov
2015-07-20 14:46       ` Ivan T. Ivanov
2015-07-21 11:10       ` Sricharan
2015-07-21 11:10         ` Sricharan
2015-07-21 11:10         ` Sricharan
2015-07-09  3:25 ` [PATCH V4 6/7] dts: msm8974: Add blsp2_bam dma node Sricharan R
2015-07-09  3:25   ` Sricharan R
2015-07-09  3:25 ` [PATCH V4 7/7] dts: msm8974: Add dma channels for blsp2_i2c1 node Sricharan R
2015-07-09  3:25   ` Sricharan R

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='000601d0c38c$9f4177d0$ddc46770$@codeaurora.org' \
    --to=sricharan@codeaurora.org \
    --cc=agross@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=iivanov@mm-sol.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@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.