public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Daniel Glöckner" <dg@emlix.com>
To: Kenneth Heitke <kheitke@codeaurora.org>
Cc: khali@linux-fr.org, ben-linux@fluff.org,
	linux-arm-msm@vger.kernel.org, sdharia@codeaurora.org,
	Crane Cai <crane.cai@amd.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Linus Walleij <linus.walleij@stericsson.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	srinidhi kasagar <srinidhi.kasagar@stericsson.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: Single-wire Serial Bus Interface for Qualcomm MSM chipsets
Date: Fri, 23 Jul 2010 12:18:00 +0200	[thread overview]
Message-ID: <4C496C58.1080806@emlix.com> (raw)
In-Reply-To: <1279734768-8436-1-git-send-email-kheitke@codeaurora.org>

On 07/21/2010 07:52 PM, Kenneth Heitke wrote:
> Unlike I2C, SSBI is a point-to-point connection, and therefore there is no
> need to specify a slave device address. The SSBI implementation
> overrides the slave device address to be a device register address
> instead.  This restricts the client drivers from using the SMBus
> communication APIs unless they update the address field (addr) of the
> i2c_client structure prior to every SMBus function call.

Is it just me who is uncomfortable with this?

If I am not mistaken, you still have to update the i2c_client structure
when using the SMBus API.

And how do you intend to bind a driver to an SSBI device if there is not a
single address to bind to?

The Qualcomm SSBI patent mentiones the possibility of adding logic to chips
to be accessible over both SSBI and the three wire SBI interface. The SBI
interface on the other hand is even closer to I2C and requires the use of
a slave ID byte. If you didn't abuse the address field, you could write
drivers that work on both interfaces.

Why not use one of the special addresses mentioned in the I2C specification
for SSBI? 0x02 might be appropriate.

> +static int
> +i2c_ssbi_write_bytes(struct i2c_ssbi_dev *ssbi, struct i2c_msg *msg)
> +{
> +	int ret = 0;
> +	u8 *buf = msg->buf;
> +	u16 len = msg->len;
> +	u16 addr = msg->addr;
> +
> +	if (ssbi->controller_type == MSM_SBI_CTRL_SSBI2) {
> +		u32 mode2 = readl(ssbi->base + SSBI2_MODE2);
> +		writel(SSBI_MODE2_REG_ADDR_15_8(mode2, addr),
> +				ssbi->base + SSBI2_MODE2);
> +	}
> +
> +	while (len) {

Where do you set the address if controller_type == MSM_SBI_CTRL_SSBI?

  Daniel


-- 
Dipl.-Math. Daniel Glöckner, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax -11, Bahnhofsallee 1b, 37081 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführer: Dr. Uwe Kracke, Ust-IdNr.: DE 205 198 055

emlix - your embedded linux partner

  reply	other threads:[~2010-07-23 10:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-21 17:52 [PATCH] i2c: Single-wire Serial Bus Interface for Qualcomm MSM chipsets Kenneth Heitke
2010-07-23 10:18 ` Daniel Glöckner [this message]
2010-07-23 18:32   ` Kenneth Heitke
2010-07-23 20:48   ` Kenneth Heitke
2010-07-23 20:50   ` Kenneth Heitke
2010-07-28 13:26 ` Pavel Machek
2010-08-10  2:26   ` Kenneth Heitke
2010-08-10 21:41     ` Pavel Machek
2010-09-24 22:48 ` Kenneth Heitke

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=4C496C58.1080806@emlix.com \
    --to=dg@emlix.com \
    --cc=ben-linux@fluff.org \
    --cc=crane.cai@amd.com \
    --cc=khali@linux-fr.org \
    --cc=kheitke@codeaurora.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=sameo@linux.intel.com \
    --cc=sdharia@codeaurora.org \
    --cc=srinidhi.kasagar@stericsson.com \
    /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