All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/17] platform/chrome: Replace cros_ec_cmd_xfer_status
@ 2020-02-05 18:59 ` Prashant Malani
  0 siblings, 0 replies; 35+ messages in thread
From: Prashant Malani @ 2020-02-05 18:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexandre Belloni, Neil Armstrong,
	open list:IIO SUBSYSTEM AND DRIVERS,
	moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
	Benjamin Tissoires, open list:I2C SUBSYSTEM HOST DRIVERS,
	Peter Meerwald-Stadler, Guenter Roeck, Fabien Lahoudere,
	Rushikesh S Kadam, Cheng-Yi Chiang,
	open list:REAL TIME CLOCK RTC SUBSYSTEM, Lars-Peter Clausen,
	Lee Jones, Takashi Iwai, Sebastian Reichel, Evan Green,
	Chanwoo Choi

Many callers of cros_ec_cmd_xfer_status() use similar setup and cleanup
code, including setting up the cros_ec_command message struct and
copying the received buffer.

This series introduces a replacement function cros_ec_cmd() that
performs this setup and teardown, and then updates all call sites that
used xfer_status() to use the new function instead.

The final patch in the series drops cros_ec_cmd_xfer_status() altogether.

Changes in v2:
- Renamed new function to cros_ec_cmd()
- Added a "result" pointer argument, for call-sites that are interested
  in the EC command result.
- Updated subsequent patches to new function name and parameter list.
- Used C99 element setting to initialize some structs directly rather
  than zeroing them, then setting them.

v1: https://lkml.org/lkml/2020/1/30/802

Prashant Malani (17):
  platform/chrome: Add EC command msg wrapper
  platform/chrome: chardev: Use cros_ec_cmd()
  platform/chrome: proto: Use cros_ec_cmd()
  platform/chrome: usbpd_logger: Use cros_ec_cmd()
  platform/chrome: sensorhub: Use cros_ec_cmd()
  platform/chrome: debugfs: Use cros_ec_cmd()
  platform/chrome: sysfs: Use cros_ec_cmd()
  extcon: cros_ec: Use cros_ec_cmd()
  hid: google-hammer: Use cros_ec_cmd()
  iio: cros_ec: Use cros_ec_cmd()
  ASoC: cros_ec_codec: Use cros_ec_cmd()
  power: supply: cros: Use cros_ec_cmd()
  pwm: cros-ec: Remove cros_ec_cmd_xfer_status()
  rtc: cros-ec: Use cros_ec_cmd()
  media: cros-ec-cec: Use cros_ec_cmd()
  i2c: cros-ec-tunnel: Use cros_ec_cmd()
  platform/chrome: Drop cros_ec_cmd_xfer_status()

 drivers/extcon/extcon-usbc-cros-ec.c          |  61 ++------
 drivers/hid/hid-google-hammer.c               |  23 +--
 drivers/i2c/busses/i2c-cros-ec-tunnel.c       |  22 ++-
 .../cros_ec_sensors/cros_ec_sensors_core.c    |  25 ++--
 .../media/platform/cros-ec-cec/cros-ec-cec.c  |  45 +++---
 drivers/platform/chrome/cros_ec_chardev.c     |  17 +--
 drivers/platform/chrome/cros_ec_debugfs.c     | 131 ++++++------------
 drivers/platform/chrome/cros_ec_proto.c       |  76 ++++++----
 drivers/platform/chrome/cros_ec_sensorhub.c   |  30 ++--
 drivers/platform/chrome/cros_ec_sysfs.c       | 103 ++++++--------
 drivers/platform/chrome/cros_usbpd_logger.c   |  12 +-
 drivers/power/supply/cros_usbpd-charger.c     |  58 ++------
 drivers/pwm/pwm-cros-ec.c                     |  59 +++-----
 drivers/rtc/rtc-cros-ec.c                     |  27 ++--
 include/linux/platform_data/cros_ec_proto.h   |   5 +-
 sound/soc/codecs/cros_ec_codec.c              | 119 ++++++----------
 16 files changed, 277 insertions(+), 536 deletions(-)

-- 
2.25.0.341.g760bfbb309-goog

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

end of thread, other threads:[~2020-06-24 12:04 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05 18:59 [PATCH v2 00/17] platform/chrome: Replace cros_ec_cmd_xfer_status Prashant Malani
2020-02-05 18:59 ` [alsa-devel] " Prashant Malani
2020-02-05 18:59 ` [PATCH v2 01/17] platform/chrome: Add EC command msg wrapper Prashant Malani
2020-02-05 18:59   ` [alsa-devel] " Prashant Malani
2020-02-05 18:59 ` [PATCH v2 02/17] platform/chrome: chardev: Use cros_ec_cmd() Prashant Malani
2020-02-05 18:59 ` [PATCH v2 03/17] platform/chrome: proto: " Prashant Malani
2020-02-05 19:00 ` [PATCH v2 04/17] platform/chrome: usbpd_logger: " Prashant Malani
2020-02-05 19:00 ` [PATCH v2 05/17] platform/chrome: sensorhub: " Prashant Malani
2020-02-05 19:00 ` [PATCH v2 06/17] platform/chrome: debugfs: " Prashant Malani
2020-02-05 19:00 ` [PATCH v2 07/17] platform/chrome: sysfs: " Prashant Malani
2020-02-05 19:00 ` [PATCH v2 08/17] extcon: cros_ec: " Prashant Malani
2020-02-05 19:00 ` [PATCH v2 09/17] hid: google-hammer: " Prashant Malani
2020-02-05 19:00 ` [PATCH v2 10/17] iio: cros_ec: " Prashant Malani
2020-02-05 19:42   ` Gwendal Grignou
2020-02-06 12:17   ` Jonathan Cameron
2020-02-06 13:45     ` Enric Balletbo i Serra
2020-02-06 18:49       ` Prashant Malani
2020-02-07 18:47         ` Gwendal Grignou
2020-02-10 11:03           ` Enric Balletbo i Serra
2020-02-10 20:14             ` Prashant Malani
2020-02-18 18:30               ` Prashant Malani
2020-02-20 16:07                 ` Enric Balletbo i Serra
2020-02-25  1:26                   ` Prashant Malani
2020-02-05 19:00 ` [PATCH v2 11/17] ASoC: cros_ec_codec: " Prashant Malani
2020-02-05 19:00   ` [alsa-devel] " Prashant Malani
2020-02-06 11:53   ` Mark Brown
2020-02-06 11:53     ` [alsa-devel] " Mark Brown
2020-02-05 19:00 ` [PATCH v2 12/17] power: supply: cros: " Prashant Malani
2020-02-24 17:13   ` Sebastian Reichel
2020-02-05 19:00 ` [PATCH v2 13/17] pwm: cros-ec: Remove cros_ec_cmd_xfer_status() Prashant Malani
2020-02-05 19:00   ` Prashant Malani
2020-02-05 19:00 ` [PATCH v2 14/17] rtc: cros-ec: Use cros_ec_cmd() Prashant Malani
2020-02-05 20:04   ` Alexandre Belloni
2020-02-05 19:00 ` [PATCH v2 15/17] media: cros-ec-cec: " Prashant Malani
2020-06-24 12:04   ` Hans Verkuil

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.