Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753901AbcCBIY1 (ORCPT ); Wed, 2 Mar 2016 03:24:27 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36704 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753181AbcCBIYY (ORCPT ); Wed, 2 Mar 2016 03:24:24 -0500 From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Cc: Sameer Nanda , Javier Martinez Canillas , Lee Jones , Benson Leung , =?UTF-8?q?Enric=20Balletb=C3=B2?= , Vic Yang , Stephen Boyd , Vincent Palatin , Randall Spangler , Todd Broch , Gwendal Grignou , Tomeu Vizoso , linux-pm@vger.kernel.org, Sebastian Reichel , Dmitry Eremin-Solenikov , Dmitry Torokhov , David Woodhouse , linux-input@vger.kernel.org, Olof Johansson Subject: [RESEND PATCH v3 0/6] EC-based USB Power Delivery support for Chrome machines Date: Wed, 2 Mar 2016 09:23:26 +0100 Message-Id: <1456907012-19268-1-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2503 Lines: 66 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. Thanks, Tomeu 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 (1): mfd: cros_ec: Add MKBP event support drivers/input/keyboard/cros_ec_keyb.c | 135 ++---- drivers/mfd/cros_ec.c | 57 ++- drivers/platform/chrome/cros_ec_dev.c | 44 ++ drivers/platform/chrome/cros_ec_proto.c | 129 ++++++ drivers/power/Kconfig | 10 + drivers/power/Makefile | 1 + drivers/power/cros_usbpd-charger.c | 780 ++++++++++++++++++++++++++++++++ include/linux/mfd/cros_ec.h | 62 +++ include/linux/mfd/cros_ec_commands.h | 358 ++++++++++++++- 9 files changed, 1464 insertions(+), 112 deletions(-) create mode 100644 drivers/power/cros_usbpd-charger.c -- 2.5.0