From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon: (pmbus) Fix two issues
Date: Tue, 15 Nov 2011 02:54:22 +0000 [thread overview]
Message-ID: <20111115025422.GB28863@ericsson.com> (raw)
In-Reply-To: <1321249266-17071-1-git-send-email-Yuantian.Tang@freescale.com>
On Mon, Nov 14, 2011 at 09:35:44PM -0500, Tang Yuantian-B29983 wrote:
> Hi Jean Delvare,
>
> Please find my comments in line.
>
> > -----Original Message-----
> >
> > Again, no. PMBus goes on top of SMBus which includes SMBus block reads
> > (i2c_smbus_read_block_data) but not I2C block reads
> > (i2c_smbus_read_i2c_block_data). As a result, many hardware SMBus
> > controllers do not support I2C block reads, and it can't be added (only
> > the set of transfers supported by the hardware controller can be
> > implemented by the driver) which means that your proposed change would
> > break support on existing systems. This is not acceptable.
> >
> > On the other hand, an I2C controller which supports I2C block reads can
> > almost always get SMBus block reads added, it's only a matter of adding a
> > few lines of code to the bus driver.
> >
> > Which i2c bus driver are you using? From which kernel version?
> >
> [Yuantian:] I am using newest kernel 3.2. PowerPC arch.
> I2c bus driver file is: drivers/i2c/busses/i2c-mpc.c.
>
> I greped the i2c bus driver and found the following platform's i2c don't
> Support i2c_smbus_read_block_data. So Zl6100 driver can't work on these platforms.
> 1. drivers/i2c/busses/i2c-mpc.c(powerpc arch, which I am working on).
> 2. drivers/i2c/busses/i2c-mv64xxx.c
> 3. drivers/i2c/busses/i2c-nomadik.c
> 4. drivers/i2c/busses/i2c-octeon.c
> 5. drivers/i2c/busses/i2c-pxa.c
> 6. drivers/i2c/busses/i2c-s6000.c
> Almost all the platforms the kernel support.
> But they all support I2C_FUNC_SMBUS_EMUL, which means support i2c_smbus_read_i2c_block_data.
Hmm ... looking into the code, I2C_FUNC_SMBUS_READ_BLOCK_DATA is missing from I2C_FUNC_SMBUS_EMUL.
Now that is interesting.
If you change mpc_functionality() to
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_SMBUS_READ_BLOCK_DATA;
I bet your problem will disappear.
Jean, any idea why I2C_FUNC_SMBUS_EMUL doesn't include I2C_FUNC_SMBUS_READ_BLOCK_DATA ?
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2011-11-15 2:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 5:41 [lm-sensors] [PATCH] hwmon: (pmbus) Fix two issues Yuantian.Tang
2011-11-14 8:01 ` Jean Delvare
2011-11-14 8:48 ` Tang Yuantian-B29983
2011-11-14 12:59 ` Jean Delvare
2011-11-14 16:28 ` Guenter Roeck
2011-11-15 2:28 ` Tang Yuantian-B29983
2011-11-15 2:35 ` Tang Yuantian-B29983
2011-11-15 2:42 ` Guenter Roeck
2011-11-15 2:54 ` Guenter Roeck [this message]
2011-11-15 2:58 ` Tang Yuantian-B29983
2011-11-15 3:00 ` Tabi Timur-B04825
2011-11-15 3:39 ` Guenter Roeck
2011-11-15 4:14 ` Guenter Roeck
2011-11-15 5:37 ` Tang Yuantian-B29983
2011-11-15 6:14 ` Guenter Roeck
2011-11-15 7:24 ` Jean Delvare
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=20111115025422.GB28863@ericsson.com \
--to=guenter.roeck@ericsson.com \
--cc=lm-sensors@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.