All of lore.kernel.org
 help / color / mirror / Atom feed
* PMBus and SMBUS_BLOCK with "extended" lenght
@ 2017-03-31  8:17 Benjamin Herrenschmidt
  2017-03-31 16:33 ` Wolfram Sang
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2017-03-31  8:17 UTC (permalink / raw)
  To: linux-i2c

Hi folks !

Did anybody give thoughts to how we could support "smbus" block
transfers with a size up to 0xff ? This is an extension of smbus
that part of the PMbus protocol spec.

Our current code has a lot of places where I2C_SMBUS_BLOCK_MAX is
hard wired. Including down in almost all drivers.

So it would have to be an evolutionary process.

I was thinking a message flag along with a functionality bit
maybe ?

Cheers,
Ben.
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PMBus and SMBUS_BLOCK with "extended" lenght
  2017-03-31  8:17 PMBus and SMBUS_BLOCK with "extended" lenght Benjamin Herrenschmidt
@ 2017-03-31 16:33 ` Wolfram Sang
  2017-04-19  5:40   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2017-03-31 16:33 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linux-i2c

[-- Attachment #1: Type: text/plain, Size: 759 bytes --]

Hi,

> Did anybody give thoughts to how we could support "smbus" block
> transfers with a size up to 0xff ? This is an extension of smbus
> that part of the PMbus protocol spec.

For completeness, SMBus Spec V3 (released 2015) increased the allowed
transfer size to 255 as well.

> 
> Our current code has a lot of places where I2C_SMBUS_BLOCK_MAX is
> hard wired. Including down in almost all drivers.
> 
> So it would have to be an evolutionary process.
> 
> I was thinking a message flag along with a functionality bit
> maybe ?

I have never really scratched my head about this issue yet and don't
know of any on-going activity. It is notable, though, that we export
I2C_SMBUS_BLOCK_MAX to userspace, too.

Regards,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PMBus and SMBUS_BLOCK with "extended" lenght
  2017-03-31 16:33 ` Wolfram Sang
@ 2017-04-19  5:40   ` Benjamin Herrenschmidt
  2017-04-19  6:54     ` Wolfram Sang
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2017-04-19  5:40 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c

On Fri, 2017-03-31 at 18:33 +0200, Wolfram Sang wrote:
> Hi,
> 
> > Did anybody give thoughts to how we could support "smbus" block
> > transfers with a size up to 0xff ? This is an extension of smbus
> > that part of the PMbus protocol spec.
> 
> For completeness, SMBus Spec V3 (released 2015) increased the allowed
> transfer size to 255 as well.
> 
> > 
> > Our current code has a lot of places where I2C_SMBUS_BLOCK_MAX is
> > hard wired. Including down in almost all drivers.
> > 
> > So it would have to be an evolutionary process.
> > 
> > I was thinking a message flag along with a functionality bit
> > maybe ?
> 
> I have never really scratched my head about this issue yet and don't
> know of any on-going activity. It is notable, though, that we export
> I2C_SMBUS_BLOCK_MAX to userspace, too.

Right. I don't think we can change it. We could either define a whole
new set of block read/write that support "extended" max, or probably
easier, a msg flag indicating that this is supported.

We would need a backend bus capability as well since all the busses
today will barf if the device returns something larger than
I2C_SMBUS_BLOCK_MAX.

Not a huge deal, all this is just a thought, I don't think I have a
device to deal with today that will return more on any of my systems (I
can double check later). I just noticed that while reading the PMbus
spec.

Cheers,
Ben.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PMBus and SMBUS_BLOCK with "extended" lenght
  2017-04-19  5:40   ` Benjamin Herrenschmidt
@ 2017-04-19  6:54     ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2017-04-19  6:54 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linux-i2c

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]


> Not a huge deal, all this is just a thought, I don't think I have a
> device to deal with today that will return more on any of my systems (I
> can double check later). I just noticed that while reading the PMbus
> spec.

I once stumbled over a TPM device which had a flag to send either 32 or
255 byte. Can't recall which exactly, though.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-19  6:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31  8:17 PMBus and SMBUS_BLOCK with "extended" lenght Benjamin Herrenschmidt
2017-03-31 16:33 ` Wolfram Sang
2017-04-19  5:40   ` Benjamin Herrenschmidt
2017-04-19  6:54     ` Wolfram Sang

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.