All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 0/7] EC-based USB Power Delivery support for Chrome machines
@ 2016-04-12 12:32 Tomeu Vizoso
  2016-04-12 12:32 ` [PATCH v8 1/7] mfd: cros_ec: Add MKBP event support Tomeu Vizoso
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Tomeu Vizoso @ 2016-04-12 12:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Sameer Nanda, Javier Martinez Canillas, Lee Jones, Benson Leung,
	Enric Balletbò,
	Vic Yang, Stephen Boyd, Vincent Palatin, Randall Spangler,
	Todd Broch, Gwendal Grignou, Tomeu Vizoso, linux-pm,
	Sebastian Reichel, Dmitry Eremin-Solenikov, Dmitry Torokhov,
	David Woodhouse, linux-input, Olof Johansson

Hi,

this series contains a driver that exposes a power_supply to userspace
representing a port that support USB PD charging.

Allows userspace to display to the user if the machine is charging and
on which port, and if another device is being charged by a port.

This series may be best integrated through the MFD tree, for which we'll
need ACKs from Olof (for the changes to platform/chrome), from Dmitry
(for changes to cros_ec_keyb.c) and from Sebastian Reichel for the
new driver.

Patches 1 and 2 need to be taken together because in the first the MFD
driver handles the EC interrupt and only in the second patch the
keyboard driver stops handling it and using the notifier instead.

Thanks,

Tomeu

Changes in v8:
- Split out changes to drivers/input/keyboard
- Improved error messages
- Fixed kerneldoc comments
- Don't call cros_ec_cmd_xfer from declaration block
- Remove unnecessary variable host_event
- Don't add stuff to cros_ec_commands.h not needed in this series

Changes in v7:
- Rebased onto 4.6-rc1, with no conflicts.

Changes in v6:
- Return 0 if the EC doesn't support MKBP, as expected by callers.

Changes in v5:
- Check explicitly for !EC_RES_SUCCESS as suggested by Benson Leung.
- Fix type of variable passed to do_div.

Changes in v4:
- Calculate correctly the size of the payloads in
  cros_ec_get_host_command_version_mask.
- Declare size parameters in ec_command as size_t

Changes in v3:
- Remove duplicated prototype of cros_ec_get_host_event.
- Use do_div so it builds on 32bit (suggested by 0-day kbuild bot).
- Remove sysfs attributes ext_current_lim and ext_voltage_lim because
  I don't know yet where they should be placed (and don't have HW to
  test them).
- Remove superfluous pre-allocated buffers ec_inbuf and ec_outbuf.
- Lots of misc comments from Stephen Boyd were addressed.
- Unregister notification listener in .remove callback.
- Only register the PD charger device if there are any PD ports in this
  EC.
- Dropped patch using EC_CMD_GET_FEATURES to decide whether to create a
  charger device because we are now only creating one if a EC has any PD
  ports.
- Dropped patch adding power_supply types because it has been merged
  already.

Changes in v2:
- Allocate enough for the structs in
  cros_ec_get_host_command_version_mask,
  not their pointers.
- Allocate msg in the stack in get_next_event and
  get_keyboard_state_event, as suggested by Gwendal.
- Split out changes to cros_ec_commands.h and the helpers added to
  mfd/cros_ec.h from the patch that adds the charger driver, as
  suggested by Lee.
- Actually call get_ec_num_ports.
- Move cros_ec_usb_pd_charger_register into cros_ec_dev.c.

Sameer Nanda (1):
  power: cros_usbpd-charger: Add EC-based USB PD charger driver

Tomeu Vizoso (4):
  mfd: cros_ec: Add cros_ec_cmd_xfer_status helper
  mfd: cros_ec: Add cros_ec_get_host_event
  mfd: cros_ec: Add more definitions for PD commands
  platform/chrome: Register USB PD charger device

Vic Yang (2):
  mfd: cros_ec: Add MKBP event support
  Input: cros_ec_keyb - Stop handling interrupts directly

 drivers/input/keyboard/cros_ec_keyb.c   | 135 ++----
 drivers/mfd/cros_ec.c                   |  58 ++-
 drivers/platform/chrome/cros_ec_dev.c   |  44 ++
 drivers/platform/chrome/cros_ec_proto.c | 127 ++++++
 drivers/power/Kconfig                   |  10 +
 drivers/power/Makefile                  |   1 +
 drivers/power/cros_usbpd-charger.c      | 780 ++++++++++++++++++++++++++++++++
 include/linux/mfd/cros_ec.h             |  45 ++
 include/linux/mfd/cros_ec_commands.h    | 216 +++++++++
 9 files changed, 1309 insertions(+), 107 deletions(-)
 create mode 100644 drivers/power/cros_usbpd-charger.c

-- 
2.5.5

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

end of thread, other threads:[~2016-07-04 11:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12 12:32 [PATCH v8 0/7] EC-based USB Power Delivery support for Chrome machines Tomeu Vizoso
2016-04-12 12:32 ` [PATCH v8 1/7] mfd: cros_ec: Add MKBP event support Tomeu Vizoso
2016-04-12 12:32 ` [PATCH v8 2/7] Input: cros_ec_keyb - Stop handling interrupts directly Tomeu Vizoso
2016-04-25 21:17   ` Dmitry Torokhov
2016-04-26  6:34     ` Tomeu Vizoso
2016-04-26  6:57       ` Lee Jones
2016-04-26  6:57         ` Lee Jones
2016-04-26  7:06         ` Tomeu Vizoso
2016-07-01  8:49           ` Enric Balletbo Serra
2016-07-04 11:23             ` Tomeu Vizoso
2016-04-12 12:32 ` [PATCH v8 3/7] mfd: cros_ec: Add cros_ec_cmd_xfer_status helper Tomeu Vizoso
2016-04-12 12:32 ` [PATCH v8 4/7] mfd: cros_ec: Add cros_ec_get_host_event Tomeu Vizoso
2016-04-12 12:32 ` [PATCH v8 5/7] mfd: cros_ec: Add more definitions for PD commands Tomeu Vizoso
2016-04-12 12:32 ` [PATCH v8 6/7] power: cros_usbpd-charger: Add EC-based USB PD charger driver Tomeu Vizoso
2016-04-20  7:42   ` Tomeu Vizoso
2016-04-26 10:47     ` Enric Balletbo i Serra
2016-05-09 12:59       ` Tomeu Vizoso
2016-04-12 12:32 ` [PATCH v8 7/7] platform/chrome: Register USB PD charger device Tomeu Vizoso

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.