linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/18] i2c: make creation of 8 bit addresses consistent
@ 2016-04-03 18:44 Wolfram Sang
  2016-04-03 18:44 ` [PATCH 01/18] i2c: guarantee that I2C_M_RD will be 0x0001 forever Wolfram Sang
                   ` (19 more replies)
  0 siblings, 20 replies; 27+ messages in thread
From: Wolfram Sang @ 2016-04-03 18:44 UTC (permalink / raw)
  To: linux-i2c; +Cc: Andy Shevchenko, Wolfram Sang

This series addresses two things which have come up in the past:

* document that I2C_M_RD is bit 0. It is not good coding style but some
  drivers (and userspace) silently assume so anyhow. To avoid regressions,
  let's make that explicit.

* use one function to generate an 8 bit address (7 bit address + RW bit)
  from a struct msg. People did this in various ways, sometimes overly
  brave and sometimes overly anxious with the operator precedence. That
  was partly not nice to read and partly triggering code checkers.

The new function was tested using a Renesas Lager board with the i2c-sh_mobile
driver. Buildbot was happy with the series, too. A branch can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/8bit_macro

I'd really appreciate more tests on real HW. Also happy for other comments,
reviews...

Thanks,

   Wolfram


Wolfram Sang (18):
  i2c: guarantee that I2C_M_RD will be 0x0001 forever
  i2c: introduce helper function to get 8 bit address from a message
  i2c: core: use new 8 bit address helper function
  i2c: i2c-bcm-iproc: use new 8 bit address helper function
  i2c: i2c-bcm-kona: use new 8 bit address helper function
  i2c: i2c-brcmstb: use new 8 bit address helper function
  i2c: i2c-cpm: use new 8 bit address helper function
  i2c: i2c-ibm_iic: use new 8 bit address helper function
  i2c: i2c-img-scb: use new 8 bit address helper function
  i2c: i2c-iop3xx: use new 8 bit address helper function
  i2c: i2c-lpc2k: use new 8 bit address helper function
  i2c: i2c-mt65xx: use new 8 bit address helper function
  i2c: i2c-ocores: use new 8 bit address helper function
  i2c: i2c-powermac: use new 8 bit address helper function
  i2c: i2c-qup: use new 8 bit address helper function
  i2c: i2c-sh_mobile: use new 8 bit address helper function
  i2c: i2c-sirf: use new 8 bit address helper function
  i2c: i2c-st: use new 8 bit address helper function

 drivers/i2c/busses/i2c-bcm-iproc.c |  2 +-
 drivers/i2c/busses/i2c-bcm-kona.c  |  5 +----
 drivers/i2c/busses/i2c-brcmstb.c   |  4 +---
 drivers/i2c/busses/i2c-cpm.c       |  4 +---
 drivers/i2c/busses/i2c-ibm_iic.c   |  2 +-
 drivers/i2c/busses/i2c-img-scb.c   |  4 +---
 drivers/i2c/busses/i2c-iop3xx.c    |  5 +----
 drivers/i2c/busses/i2c-lpc2k.c     |  4 +---
 drivers/i2c/busses/i2c-mt65xx.c    |  5 +----
 drivers/i2c/busses/i2c-ocores.c    |  5 +----
 drivers/i2c/busses/i2c-powermac.c  |  4 +---
 drivers/i2c/busses/i2c-qup.c       |  2 +-
 drivers/i2c/busses/i2c-sh_mobile.c |  3 +--
 drivers/i2c/busses/i2c-sirf.c      |  4 +---
 drivers/i2c/busses/i2c-st.c        |  3 +--
 drivers/i2c/i2c-core.c             |  2 +-
 include/linux/i2c.h                |  5 +++++
 include/uapi/linux/i2c.h           | 13 +++++++------
 18 files changed, 28 insertions(+), 48 deletions(-)

-- 
2.7.0

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

end of thread, other threads:[~2016-05-05 18:27 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-03 18:44 [PATCH 00/18] i2c: make creation of 8 bit addresses consistent Wolfram Sang
2016-04-03 18:44 ` [PATCH 01/18] i2c: guarantee that I2C_M_RD will be 0x0001 forever Wolfram Sang
2016-04-04 10:26   ` Andy Shevchenko
2016-04-04 10:29     ` Shevchenko, Andriy
2016-04-11 16:54       ` Wolfram Sang
2016-04-04 10:47     ` Wolfram Sang
2016-04-03 18:44 ` [PATCH 02/18] i2c: introduce helper function to get 8 bit address from a message Wolfram Sang
2016-04-03 18:44 ` [PATCH 03/18] i2c: core: use new 8 bit address helper function Wolfram Sang
2016-04-04 10:27   ` Andy Shevchenko
2016-04-03 18:44 ` [PATCH 04/18] i2c: i2c-bcm-iproc: " Wolfram Sang
2016-04-03 18:44 ` [PATCH 05/18] i2c: i2c-bcm-kona: " Wolfram Sang
2016-04-03 18:44 ` [PATCH 06/18] i2c: i2c-brcmstb: " Wolfram Sang
2016-04-03 18:44 ` [PATCH 07/18] i2c: i2c-cpm: " Wolfram Sang
2016-04-03 18:44 ` [PATCH 08/18] i2c: i2c-ibm_iic: " Wolfram Sang
2016-04-03 18:44 ` [PATCH 09/18] i2c: i2c-img-scb: " Wolfram Sang
2016-04-03 18:44 ` [PATCH 10/18] i2c: i2c-iop3xx: " Wolfram Sang
2016-04-03 18:44 ` [PATCH 11/18] i2c: i2c-lpc2k: " Wolfram Sang
2016-04-03 18:44 ` [PATCH 12/18] i2c: i2c-mt65xx: " Wolfram Sang
2016-04-03 18:44 ` [PATCH 13/18] i2c: i2c-ocores: " Wolfram Sang
2016-04-03 18:44 ` [PATCH 14/18] i2c: i2c-powermac: " Wolfram Sang
2016-04-03 18:44 ` [PATCH 15/18] i2c: i2c-qup: " Wolfram Sang
2016-05-05 18:27   ` [15/18] " Naveen Kaje
2016-04-03 18:44 ` [PATCH 16/18] i2c: i2c-sh_mobile: " Wolfram Sang
2016-04-03 18:45 ` [PATCH 17/18] i2c: i2c-sirf: " Wolfram Sang
2016-04-03 18:45 ` [PATCH 18/18] i2c: i2c-st: " Wolfram Sang
2016-04-04 10:31 ` [PATCH 00/18] i2c: make creation of 8 bit addresses consistent Andy Shevchenko
2016-04-11 17:07 ` Wolfram Sang

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).