Skip to content

spi: Introduce and use spi_bpw_to_bytes()

Andy Shevchenko linux-spi lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 4 repliesIn review
  2. v22 patches 2 repliesSuperseded
  3. v12 patches 6 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2spi: Add spi_bpw_to_bytes() helper and use itdrivers/spi/spi.c include/linux/spi/spi.h+27 -10 replies
2/2spi: dw: Use spi_bpw_to_bytes() helperdrivers/spi/spi-dw-core.c+1 -10 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDavid LechnerMukesh Kumar Savaliya
SeriesR-b A-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] spi: Introduce and use spi_bpw_to_bytes()

Recently in the discussion with David the idea of having a common helper popped up. The helper converts the given bits per word to bytes. The result will always be power-of-two (e.g. for 37 bits it returns 8 bytes) or 0 for 0 input. More details are in the respective code comment.

This mini-series introduces it and replaces current users under drivers/spi and we expect more (and possibly some lurking in other subsystems).

Mark, if you okay with the idea, please, make this to be an immutable branch or tag for others to pull.

In v3:
- fixed the typos in the examples

In v2:
- improved examples in the code comment and commit message (David)

Andy Shevchenko (2):
spi: Add spi_bpw_to_bytes() helper and use it
spi: dw: Use spi_bpw_to_bytes() helper

 drivers/spi/spi-dw-core.c |  2 +-
 drivers/spi/spi.c         |  2 +-
 include/linux/spi/spi.h   | 26 ++++++++++++++++++++++++++
 3 files changed, 28 insertions(+), 2 deletions(-)
Signature · 1 line
2.47.2