[RFC PATCH 00/10] cros_ec: Add support for Wilco EC

2018-12-14 Thread Nick Crews
s! Duncan Laurie (6): CHROMIUM: cros_ec: Remove cros_ec dependency in lpc_mec CHROMIUM: wilco_ec: Add new driver for Wilco EC CHROMIUM: wilco_ec: Add sysfs attributes CHROMIUM: wilco_ec: Add support for raw commands in sysfs CHROMIUM: wilco_ec: Add RTC class driver CHROMIUM: wilco_

[RFC PATCH 01/10] CHROMIUM: cros_ec: Remove cros_ec dependency in lpc_mec

2018-12-14 Thread Nick Crews
now passes in the 0x800 base address this way. Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- drivers/platform/chrome/cros_ec_lpc_mec.c | 54 +++ drivers/platform/chrome/cros_ec_lpc_mec.h | 45 +++ drivers/platform/chrome/cros_ec_lpc_reg.c | 43

[RFC PATCH 04/10] CHROMIUM: wilco_ec: Add support for raw commands in sysfs

2018-12-14 Thread Nick Crews
/GOOG000C\:00/raw 00 37 33 38 65 64 00... Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- drivers/platform/chrome/Kconfig| 10 ++ drivers/platform/chrome/wilco_ec.h | 6 + drivers/platform/chrome/wilco_ec_mailbox.c | 6 - drivers/platform/chrome/wilco_ec_sysfs.

[RFC PATCH 03/10] CHROMIUM: wilco_ec: Add sysfs attributes

2018-12-14 Thread Nick Crews
ned-off-by: Nick Crews --- drivers/platform/chrome/Makefile | 3 +- drivers/platform/chrome/wilco_ec.h | 14 +++ drivers/platform/chrome/wilco_ec_mailbox.c | 12 ++ drivers/platform/chrome/wilco_ec_sysfs.c | 121 + 4 files changed, 148 insertions(+)

[RFC PATCH 05/10] CHROMIUM: wilco_ec: Add RTC class driver

2018-12-14 Thread Nick Crews
-29 17:08:00.780793-08:00 Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- drivers/platform/chrome/Makefile | 3 +- drivers/platform/chrome/wilco_ec.h | 29 drivers/platform/chrome/wilco_ec_mailbox.c | 15 ++ drivers/platform/chrome/wilco_ec_rtc.c

[RFC PATCH 09/10] CHROMIUM: wilco_ec: Add peakshift and adv_batt_charging

2018-12-14 Thread Nick Crews
> properties/peakshift/peakshift_monday -bash: echo: write error: Invalid argument > dmesg | tail -n1 [40.34534] wilco_ec GOOG00C:00: minutes must be at the quarter hour > echo "16 0 20 45 0 0" > properties/peakshift/peakshift_monday > cat properties/peakshift/peakshift_m

[RFC PATCH 07/10] CHROMIUM: wilco_ec: Move legacy attributes to separate file

2018-12-14 Thread Nick Crews
, #include-ing them in wilco_ec_sysfs.c, and then defining where to actually place the attributes in wilco_ec_sysfs.c Signed-off-by: Nick Crews --- drivers/platform/chrome/Makefile | 3 +- drivers/platform/chrome/wilco_ec_legacy.c | 204 ++ drivers/platform/chrome

[RFC PATCH 06/10] CHROMIUM: wilco_ec: Add event handling

2018-12-14 Thread Nick Crews
-- SYN_REPORT Event: type 1 (EV_KEY), code 225 (KEY_BRIGHTNESSUP), value 0 Event: -- SYN_REPORT Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- drivers/platform/chrome/Makefile | 4 +- drivers/platform/chrome/wilco_ec.h | 3

[RFC PATCH 02/10] CHROMIUM: wilco_ec: Add new driver for Wilco EC

2018-12-14 Thread Nick Crews
cros_ec device type. Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- drivers/platform/chrome/Kconfig| 14 +- drivers/platform/chrome/Makefile | 3 + drivers/platform/chrome/wilco_ec.h | 97 + drivers/platform/chrome/wilco_ec_mailbox.c | 395

[RFC PATCH 08/10] CHROMIUM: wilco_ec: Add EC properties

2018-12-14 Thread Nick Crews
> echo 1 > properties/global_mic_mute_led [mic mute led on keyboard turns on] > cat properties/global_mic_mute_led 1 > cat properties/wireless_sw_wlan cat: wireless_sw_wlan: Permission denied [Good, that is supposed to be write-only] > echo 0 > properties/wireless_sw_wlan Signed-off-by: Nick Crews

[RFC PATCH 10/10] CHROMIUM: wilco_ec: Add binary telemetry attributes

2018-12-14 Thread Nick Crews
change for comments, until the EC code is implemented. Signed-off-by: Nick Crews --- drivers/platform/chrome/Makefile | 3 +- drivers/platform/chrome/wilco_ec_sysfs.c | 17 - drivers/platform/chrome/wilco_ec_telemetry.c | 66 drivers/platform/chrome

[PATCH v4 2/2] power_supply: platform/chrome: wilco_ec: Add charging config driver

2019-04-16 Thread Nick Crews
get()ting Signed-off-by: Nick Crews --- .../ABI/testing/sysfs-class-power-wilco | 30 +++ drivers/platform/chrome/wilco_ec/Kconfig | 9 + drivers/platform/chrome/wilco_ec/Makefile | 2 + drivers/platform/chrome/wilco_ec/core.c | 16 ++ drivers/platform/chrome/wilco_ec

[PATCH v4 1/2] power_supply: Add more charge types and CHARGE_CONTROL_* properties

2019-04-16 Thread Nick Crews
ESHOLD. v4 changes: - Add documentation for the new properties, and add documentation for the the previously missing charge_control_limit and charge_control_limit_max properties. Signed-off-by: Nick Crews --- Documentation/ABI/testing/sysfs-class-power | 51 +++-- drivers/p

[PATCH v3 2/2] platform/chrome: wilco_ec: Add USB PowerShare Policy control

2019-04-16 Thread Nick Crews
cumentation to Documentation/ABI/testing/sysfs-platform-wilco-ec - Zero out reserved bytes in requests. Signed-off-by: Nick Crews --- .../ABI/testing/sysfs-platform-wilco-ec | 16 drivers/platform/chrome/wilco_ec/sysfs.c | 92 +++ 2 files changed, 108 insertions(+)

[PATCH v3 1/2] platform/chrome: wilco_ec: Add Boot on AC support

2019-04-16 Thread Nick Crews
v2 changes: - Move documentation to Documentation/ABI/testing/sysfs-platform-wilco-ec Signed-off-by: Nick Crews --- .../ABI/testing/sysfs-platform-wilco-ec | 11 +++ drivers/platform/chrome/wilco_ec/Makefile | 2 +- drivers/platform/chrome/wilco_ec/core.c | 9 +++ drivers/plat

Re: [PATCH v3 1/2] platform/chrome: wilco_ec: Add Boot on AC support

2019-04-18 Thread Nick Crews
There's one error that Guenter just found... > + > +int wilco_ec_add_sysfs(struct wilco_ec_device *ec) > +{ > + return sysfs_create_group(&ec->dev->kobj, &wilco_dev_attr_group); > +} > + > +void wilco_ec_remove_sysfs(struct wilco_ec_device *ec) > +{ > + sysfs_create_group(&ec->dev->kob

[PATCH v5 2/3] power_supply: Add CHARGE_CONTROL_{START_THRESHOLD,END_THRESHOLD} properties

2019-04-18 Thread Nick Crews
_limit and charge_control_limit_max properties. Signed-off-by: Nick Crews --- Documentation/ABI/testing/sysfs-class-power | 20 drivers/power/supply/power_supply_sysfs.c | 2 ++ include/linux/power_supply.h| 2 ++ 3 files changed, 24 insertions(+) diff --git a/Doc

[PATCH v5 3/3] power_supply: Add missing documentation for CHARGE_CONTROL_* properties

2019-04-18 Thread Nick Crews
The existing POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT and POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX properties don't have documentation. I add that documentation here. v5 changes: - Split this commit out from the previous two commits. Signed-off-by: Nick Crews --- Documentation/ABI/te

[PATCH v5 1/3] power_supply: Add Standard, Adaptive, and Custom charge types

2019-04-18 Thread Nick Crews
L_END_THRESHOLD properties into two different commits. v4 changes: - Add documentation for the new properties, and add documentation for the the previously missing charge_control_limit and charge_control_limit_max properties. Signed-off-by: Nick Crews --- Documentation/ABI/testing/sys

Re: [PATCH v4 1/2] power_supply: Add more charge types and CHARGE_CONTROL_* properties

2019-04-18 Thread Nick Crews
On Wed, Apr 17, 2019 at 3:40 PM Sebastian Reichel wrote: > > Hi, > > The changes itself look all good to me, but this does multiple > things in a single patch, so please split it into multiple commits. Thanks Sebastian! I split this into 3 commits: -add more charge_type's -add more CHARGE_CONTRO

[PATCH v8 2/2] power_supply: platform/chrome: wilco_ec: Add charging config driver

2019-04-24 Thread Nick Crews
Add control of the charging algorithm used on Wilco devices. See Documentation/ABI/testing/sysfs-class-power-wilco for the userspace interface and other info. Signed-off-by: Nick Crews Reviewed-by: Enric Balletbo i Serra --- v8 changes: -Several documentation and comment fixups. v6 changes

[PATCH v8 1/2] platform/chrome: wilco_ec: Add property helper library

2019-04-24 Thread Nick Crews
more complex binary data. This patch adds support for getting and setting properties. This will be useful for setting the charge algorithm and charge schedules, which all use properties. Signed-off-by: Nick Crews Acked-for-chrome-by: Enric Balletbo i Serra --- v7 changes: -Remove bogus gerrit

Re: [PATCH] platform/chrome: Add Wilco EC keyboard backlight LEDs support

2019-03-12 Thread Nick Crews
> > > Some Wilco devices do not support a keyboard backlight. This > > > is checked in probe(), and in this case the sysfs entry will > > > not appear, and everything will behave normally. > > > > It would be even better if we did not register platform device if EC > > does not support backlight.

Re: [PATCH] HID: intel-ish-hid: ISH firmware loader client driver

2019-03-26 Thread Nick Crews
Hi Rushikesh, I know I've been reviewing this on Chromium, but I have some more larges-scale design thoughts. > > diff --git a/drivers/hid/intel-ish-hid/ishtp-fw-loader.c > > b/drivers/hid/intel-ish-hid/ishtp-fw-loader.c > > new file mode 100644 > > index 000..85d71d3 > > --- /dev/null > > +++

Re: [PATCH] HID: intel-ish-hid: ISH firmware loader client driver

2019-03-27 Thread Nick Crews
On Tue, Mar 26, 2019 at 8:22 PM Srinivas Pandruvada wrote: > > On Tue, 2019-03-26 at 18:39 -0600, Nick Crews wrote: > > Hi Rushikesh, I know I've been reviewing this on Chromium, but I have > > some more larges-scale design thoughts. > Hi Nick. > > Does this fun

Re: [PATCH v3] HID: intel-ish-hid: ISH firmware loader client driver

2019-04-01 Thread Nick Crews
r the clarifications! On Sat, Mar 30, 2019 at 10:27 AM Joe Perches wrote: > > On Sat, 2019-03-30 at 15:52 +0530, Rushikesh S Kadam wrote: > > On Fri, Mar 29, 2019 at 04:30:18PM -0700, Nick Crews wrote: > > > On Fri, Mar 29, 2019 at 1:03 PM Rushikesh S Kadam > > > wrote: > >

Re: [PATCH v4] HID: intel-ish-hid: ISH firmware loader client driver

2019-04-01 Thread Nick Crews
if (rv < 0) { > + dev_err(ishtp_device(cl_device), "Reset Failed\n"); > + return; > + } > + > + /* ISH firmware loading from host */ > + load_fw_from_host(client_data); > +} > + > +/** > + * loader_ishtp_cl_probe() -

[PATCH v3 2/2] platform/chrome: Add Wilco EC keyboard backlight LEDs support

2019-04-02 Thread Nick Crews
callback, as EC never changes brightness by itself. -Use a __packed struct as message instead of opaque array -Add exported wilco_ec_keyboard_leds_exist() so the core driver now only creates a platform _device if relevant -Fix use of keyboard_led_set_brightness() since it can sleep Signed-off

[PATCH v3 1/2] platform/chrome: wilco_ec: Standardize mailbox interface

2019-04-02 Thread Nick Crews
ommand and result from wilco_ec_message. This results in the reduction of total code, and makes it much more maintainable and understandable. Signed-off-by: Nick Crews --- drivers/platform/chrome/wilco_ec/debugfs.c | 43 --- drivers/platform/chrome/wilco_ec/mailbox.c | 53

[PATCH v4 2/2] platform/chrome: Add Wilco EC keyboard backlight LEDs support

2019-04-03 Thread Nick Crews
river now only creates a platform _device if relevant -Fix use of keyboard_led_set_brightness() since it can sleep Signed-off-by: Nick Crews Acked-by: Jacek Anaszewski --- drivers/platform/chrome/wilco_ec/Kconfig | 9 + drivers/platform/chrome/wilco_ec/Makefile | 2 + drivers/

[PATCH v4 1/2] platform/chrome: wilco_ec: Standardize mailbox interface

2019-04-03 Thread Nick Crews
ommand and result from wilco_ec_message. This results in the reduction of total code, and makes it much more maintainable and understandable. Signed-off-by: Nick Crews Acked-by: Alexandre Belloni --- drivers/platform/chrome/wilco_ec/debugfs.c | 43 --- drivers/platform/chrome/wilco_ec/

[PATCH v3] platform/chrome: Add Wilco EC Event Handling

2019-04-03 Thread Nick Crews
v3 changes: - Made commit description more accurate and useful. - Added an exclusive lock for opening the char device, so only one userspace process can read events at a time. Signed-off-by: Nick Crews --- drivers/platform/chrome/wilco_ec/Kconfig | 10 + drivers/platform/chrome/wilco_ec/Makef

Re: [PATCH v5 3/3] platform/chrome: Standardize Chrome OS keyboard backlight name

2019-04-08 Thread Nick Crews
I've just found a few [embarrassing :)] bugs in this version, so after we figure out the naming, please wait for me to send out another patch that fixes these. Thanks, Nick On Thu, Apr 4, 2019 at 11:10 AM Nick Crews wrote: > > We want all backlights for the system keyboard to >

[PATCH v6] platform/chrome: Add Wilco EC keyboard backlight LEDs support

2019-04-08 Thread Nick Crews
eep Signed-off-by: Nick Crews --- drivers/platform/chrome/wilco_ec/Kconfig | 9 + drivers/platform/chrome/wilco_ec/Makefile | 2 + drivers/platform/chrome/wilco_ec/core.c | 58 ++ .../chrome/wilco_ec/kbd_led_backlight.c | 166 ++ include/linux/plat

Re: [PATCH v3] platform/chrome: Add Wilco EC Event Handling

2019-04-09 Thread Nick Crews
Hi! I know people had questions with the structure/uses of the events in the previous versions of this patch. Does this clear things up? Thanks, Nick On Wed, Apr 3, 2019 at 6:31 PM Nick Crews wrote: > > The Wilco Embedded Controller can create custom events that > are not handled as

[PATCH] platform/chrome: wilco_ec: Add h1_gpio status to debugfs

2019-04-10 Thread Nick Crews
or really even related to the AP. The GPIO runs between the EC and the H1 security chip. Signed-off-by: Nick Crews --- drivers/platform/chrome/wilco_ec/debugfs.c | 66 +- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/wilco_ec/debugfs.c

[PATCH v2] platform/chrome: wilco_ec: Add h1_gpio status to debugfs

2019-04-10 Thread Nick Crews
or really even related to the AP. The GPIO runs between the EC and the H1 security chip. Changes in v2: - Zero out the unused fields in the request. - Format result as "%02x\n" instead of as a decimal. Signed-off-by: Nick Crews --- drivers/platform/chrome/wilco_ec/debugfs.c | 64 +

[PATCH v3] platform/chrome: wilco_ec: Add h1_gpio status to debugfs

2019-04-10 Thread Nick Crews
or really even related to the AP. The GPIO runs between the EC and the H1 security chip. Changes in v3: - Fix documentation to correspond with formatting change in v2. Changes in v2: - Zero out the unused fields in the request. - Format result as "%02x\n" instead of as a decimal. Signe

[PATCH v2 1/2] platform/chrome: wilco_ec: Add Boot on AC support

2019-04-10 Thread Nick Crews
Boot on AC is a policy which makes the device boot from S5 when AC power is connected. This is useful for users who want to run their device headless or with a dock. v2 changes: - Move documentation to Documentation/ABI/testing/sysfs-platform-wilco-ec Signed-off-by: Nick Crews --- .../ABI

[PATCH v2 2/2] platform/chrome: wilco_ec: Add USB PowerShare Policy control

2019-04-10 Thread Nick Crews
sts. Signed-off-by: Nick Crews --- .../ABI/testing/sysfs-platform-wilco-ec | 16 drivers/platform/chrome/wilco_ec/sysfs.c | 93 +++ 2 files changed, 109 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-platform-wilco-ec b/Documentation/ABI/testing/sy

[PATCH v2] platform/chrome: Add Wilco EC Event Handling

2019-02-25 Thread Nick Crews
; to "QSET" Signed-off-by: Nick Crews --- drivers/platform/chrome/wilco_ec/Kconfig | 9 + drivers/platform/chrome/wilco_ec/Makefile | 2 + drivers/platform/chrome/wilco_ec/event.c | 511 ++ 3 files changed, 522 insertions(+) create mode 100644 drivers/platform/chr

Re: [PATCH] platform/chrome: wilco_ec: Add debugfs test_event file

2019-09-06 Thread Nick Crews
Thanks for the patch Daniel! A few thoughts that I didn't have on the review on Gerrit, sorry :) After those changes, Reviewed-by: Nick Crews On Fri, Sep 6, 2019 at 4:42 PM Daniel Campello wrote: > > This change introduces a new debugfs file 'test_event' that when written

Re: Policy to keep USB ports powered in low-power states

2019-08-29 Thread Nick Crews
answers below as you see fit? Also, sorry if I make some beginner > >>>> mistakes here, I'm just getting familiar with the USB subsystem, and > >>>> thanks for > >>>> your patience. > >>>> > >>>> On Wed, Aug 14, 201

Re: [PATCH] platform/chrome: wilco_ec: Add batt_ppid_info command to telemetry driver

2019-08-22 Thread Nick Crews
Friendly bump on this :) On Mon, Aug 5, 2019 at 2:22 PM Nick Crews wrote: > > Add the GET_BATT_PPID_INFO=0x8A command to the allowlist of accepted > telemetry commands. In addition, since this new command requires > verifying the contents of some of the arguments, I also restr

[PATCH] rtc: wilco-ec: Sanitize values received from RTC

2019-09-10 Thread Nick Crews
Check that the time received from the RTC HW is valid, otherwise the computation of rtc_year_days() in the next line could, and sometimes does, crash the kernel. While we're at it, fix the license to plain "GPL". Signed-off-by: Nick Crews --- drivers/rtc/rtc-wilco-ec.c | 12

Re: [PATCH] rtc: wilco-ec: Sanitize values received from RTC

2019-09-15 Thread Nick Crews
Hi Alexandre, thanks for the thoughts. On Thu, Sep 12, 2019 at 9:09 AM Alexandre Belloni wrote: > > Hi Nick, > > On 10/09/2019 16:19:29+0100, Nick Crews wrote: > > Check that the time received from the RTC HW is valid, > > otherwise the computation of rtc_year_days() in

Re: [PATCH] rtc: wilco-ec: Sanitize values received from RTC

2019-09-16 Thread Nick Crews
On Mon, Sep 16, 2019 at 2:02 AM Alexandre Belloni wrote: > > On 15/09/2019 23:44:03+0100, Nick Crews wrote: > > Hi Alexandre, thanks for the thoughts. > > > > On Thu, Sep 12, 2019 at 9:09 AM Alexandre Belloni > > wrote: > > > > > > Hi Nick, >

[PATCH v2 1/2] rtc: wilco-ec: Remove yday and wday calculations

2019-09-16 Thread Nick Crews
The tm_yday and tm_wday fields are not used by userspace, so since they aren't needed within the driver, don't bother calculating them. This is especially needed since the rtc_year_days() call was crashing if the HW returned an invalid time. Signed-off-by: Nick Crews --- drivers/rtc

[PATCH v2 2/2] rtc: wilco-ec: Fix license to GPL from GPLv2

2019-09-16 Thread Nick Crews
Signed-off-by: Nick Crews --- drivers/rtc/rtc-wilco-ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-wilco-ec.c b/drivers/rtc/rtc-wilco-ec.c index e84faa268caf..951268f5e690 100644 --- a/drivers/rtc/rtc-wilco-ec.c +++ b/drivers/rtc/rtc-wilco-ec.c @@ -184,5

Re: [PATCH v3] rtc: wilco-ec: Handle reading invalid times

2019-10-03 Thread Nick Crews
> > > > > > Hi Nick, > > > > > > > > On 25/09/2019 14:32:09-0600, Nick Crews wrote: > > > > > If the RTC HW returns an invalid time, the rtc_year_days() > > > > > call would crash. This patch adds error logging in this >

Re: [PATCH v4] wilco_ec: Add Dell's USB PowerShare Policy control

2019-10-09 Thread Nick Crews
> - In S0ix, if usb_charge is enabled, then power will be supplied to > the port when on AC or if battery is > 50%. Else no power is supplied. > - In S5, if usb_charge is enabled, then power will be supplied to > the port when on AC. Else no power is supplied. > > Signed-off-by: Da

[PATCH v4] rtc: wilco-ec: Handle reading invalid times

2019-10-04 Thread Nick Crews
them. Signed-off-by: Nick Crews --- drivers/rtc/rtc-wilco-ec.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-wilco-ec.c b/drivers/rtc/rtc-wilco-ec.c index 8ad4c4e6d557..ff46066a68a4 100644 --- a/drivers/rtc/rtc-wilco-ec.c +++ b/drivers/rtc/rtc-wilco

Re: [PATCH v4] platform/chrome: wilco_ec: Add debugfs test_event file

2019-09-18 Thread Nick Crews
Assuming that the Kbuild bot doesn't get mad about the format string now, LGTM. Thanks Daniel! Reviewed-by: Nick Crews On Wed, Sep 18, 2019 at 2:43 PM Daniel Campello wrote: > > This change introduces a new debugfs file 'test_event' that when written > to causes the EC

Re: [PATCH v2 2/2] rtc: wilco-ec: Fix license to GPL from GPLv2

2019-09-24 Thread Nick Crews
On Tue, Sep 24, 2019 at 1:55 AM Pavel Machek wrote: > > On Sun 2019-09-22 22:43:53, Alexandre Belloni wrote: > > On 22/09/2019 22:29:48+0200, Pavel Machek wrote: > > > On Mon 2019-09-16 12:12:17, Nick Crews wrote: > > > > Signed-off-by: Nick Crews > > >

Re: [PATCH v5] platform/chrome: wilco_ec: Add debugfs test_event file

2019-09-24 Thread Nick Crews
send_ec_cmd > to be a common helper between h1_gpio_get and test_event_set. > > Signed-off-by: Daniel Campello Reviewed-by: Nick Crews > --- > Changes for v2: > - Cleaned up and added comments. > - Renamed and updated function signature from write_to_mailbox to >

Re: [PATCH v2 1/2] rtc: wilco-ec: Remove yday and wday calculations

2019-09-25 Thread Nick Crews
d calls to rtc_valid_tm(), but we feel that it is required. Thanks, Nick On Mon, Sep 23, 2019 at 2:19 PM Alexandre Belloni wrote: > > On 23/09/2019 11:20:42-0600, Nick Crews wrote: > > > This is coming from struct tm, it is part of C89 but I think I was not > > > born when this d

[PATCH v3] rtc: wilco-ec: Handle reading invalid times

2019-09-25 Thread Nick Crews
them. Signed-off-by: Nick Crews --- drivers/rtc/rtc-wilco-ec.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-wilco-ec.c b/drivers/rtc/rtc-wilco-ec.c index 8ad4c4e6d557..53da355d996a 100644 --- a/drivers/rtc/rtc-wilco-ec.c +++ b/drivers/rtc/rtc-wilco

Re: [PATCH -next] platform/chrome: wilco_ec: Use kmemdup in enqueue_events()

2019-09-27 Thread Nick Crews
On Thu, Sep 26, 2019 at 4:43 PM Benson Leung wrote: > > Hey Nick, > On Fri, Jun 21, 2019 at 7:51 AM Nick Crews wrote: > > > > Thanks Yue, looks good to me. > > > > Nick > > > > On Fri, Jun 21, 2019 at 7:59 AM YueHaibing wrote: > > > > &

Re: [PATCH v2 2/2] rtc: wilco-ec: Fix license to GPL from GPLv2

2019-09-23 Thread Nick Crews
/09/2019 22:29:48+0200, Pavel Machek wrote: > > On Mon 2019-09-16 12:12:17, Nick Crews wrote: > > > Signed-off-by: Nick Crews > > > --- > > > drivers/rtc/rtc-wilco-ec.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > &g

Re: [PATCH v2 1/2] rtc: wilco-ec: Remove yday and wday calculations

2019-09-23 Thread Nick Crews
On Sun, Sep 22, 2019 at 1:05 PM Alexandre Belloni wrote: > > On 22/09/2019 18:13:06+0200, Pavel Machek wrote: > > On Mon 2019-09-16 12:12:15, Nick Crews wrote: > > > The tm_yday and tm_wday fields are not used by userspace, > > > so since they aren't needed wi

Re: [PATCH v4] wilco_ec: Add Dell's USB PowerShare Policy control

2019-10-11 Thread Nick Crews
Many thanks Enric! On Fri, Oct 11, 2019 at 9:08 AM Enric Balletbo i Serra wrote: > > Hi Daniel, Nick > > On 9/10/19 17:00, Nick Crews wrote: > > On Tue, Oct 8, 2019 at 4:18 PM Daniel Campello > > wrote: > >> > >> USB PowerShare is a policy which

Re: [RESEND v2 1/1] power/supply/sbs-battery: Fix confusing battery status when idle or empty

2019-07-26 Thread Nick Crews
Hi Richard! Thanks for the patch. I'm not familiar with these batteries, but I have a few thoughts. For others, the SBS battery spec is at http://sbs-forum.org/specs/sbdat110.pdf, and section 5.1.21 at page 28 is useful. On Thu, Jul 25, 2019 at 2:55 AM Richard Tresidder wrote: > > When a battery

Re: [PATCH v3 1/1] power/supply/sbs-battery: Fix confusing battery status when idle or empty

2019-07-29 Thread Nick Crews
On Mon, Jul 29, 2019 at 2:07 AM Richard Tresidder wrote: > > When a battery or batteries in a system are in parallel then one or more > may not be providing any current to the system. > This fixes an incorrect status indication of FULL for the battery simply > because it wasn't discharging at that

[PATCH -next] platform/chrome: Fix off-by-one error in wilco_ec/debugfs.c

2019-02-20 Thread Nick Crews
Fixes: 46c7fd06f8c9 ("platform/chrome: wilco_ec: Add support for raw commands in debugfs") Signed-off-by: Nick Crews --- drivers/platform/chrome/wilco_ec/debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/platform/chrome/wilco_ec/debugfs.c b/drivers/

[PATCH -next] platform/chrome: Fix Kconfig dependencies for wilco_ec

2019-02-20 Thread Nick Crews
: 1733c32834e5d1 ("platform/chrome: Add new driver for Wilco EC") Signed-off-by: Nick Crews --- drivers/platform/chrome/Kconfig | 2 +- drivers/platform/chrome/wilco_ec/Kconfig | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/platform/chrome/Kconfig

Re: [PATCH -next] platform/chrome: Fix off-by-one error in wilco_ec/debugfs.c

2019-02-20 Thread Nick Crews
Hi Enric, On Wed, Feb 20, 2019 at 3:06 PM Enric Balletbo i Serra wrote: > > Hi Nick, > > Thanks for the patch. > > On 20/2/19 22:58, Nick Crews wrote: > > Before, in debugfs.c it was possible to supply only the message type, > > and not supply any other argum

[PATCH v6 3/4] platform/chrome: Add support for raw commands in debugfs

2019-02-07 Thread Nick Crews
esponse > cat raw 00 31 32 2f 32 31 2f 31 38 00 00 0f 01 00 01 00 .12/21/18... Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- Changes in v6: - s/4.19/5.1/ for kernel version in documentation, since that is the version this patch should land in. - Instead of requiring at

[PATCH v6 4/4] platform/chrome: rtc: Add RTC driver

2019-02-07 Thread Nick Crews
how --rtc /dev/rtc1 2018-11-29 17:08:00.780793-08:00 > hwclock --show --rtc /dev/rtc1 2007-12-31 16:01:20.460959-08:00 > hwclock --systohc --rtc /dev/rtc1 > hwclock --show --rtc /dev/rtc1 2018-11-29 17:08:00.780793-08:00 Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- Chang

[PATCH v6 0/4] platform/chrome: Add basic support for Wilco EC

2019-02-07 Thread Nick Crews
OX_DATA_SIZE defs - Make docstrings follow kernel style - Fix tags in commit msg - Move Kconfig to subdirectory - Reading raw now includes ASCII translation - rm license boiler plate - rm "wilco_ec_rtc -" prefix in docstring - Make rtc driver its own module within the drivers/rtc/ director

[PATCH v6 1/4] cros_ec: Remove cros_ec dependency in lpc_mec

2019-02-07 Thread Nick Crews
ng code for this fix. Maybe we'll come back through later and fix this. Signed-off-by: Duncan Laurie Acked-for-chrome-platform-by: Enric Balletbo i Serra Signed-off-by: Nick Crews --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: - Change <= t

[PATCH v6 2/4] platform/chrome: Add new driver for Wilco EC

2019-02-07 Thread Nick Crews
commit exports the wilco_ec_mailbox() function so that other modules can use it to communicate with the EC. Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- Changes in v6: - Re-added WILCO_EC_FLAG_EXTENDED_DATA and went back to always reading either EC_MAILBOX_DATA_SIZE or

Re: [PATCH v6 4/4] platform/chrome: rtc: Add RTC driver

2019-02-08 Thread Nick Crews
Hi Enric and Alexandre, On Fri, Feb 8, 2019 at 5:18 AM Enric Balletbo i Serra wrote: > > Hi, > > On 8/2/19 2:23, Nick Crews wrote: > > This Embedded Controller has an internal RTC that is exposed > > as a standard RTC class driver with read/write functionality. > >

[PATCH v7 0/4] platform/chrome: Add basic support for Wilco EC

2019-02-08 Thread Nick Crews
ot;wilco_ec_rtc -" prefix in docstring - Make rtc driver its own module within the drivers/rtc/ directory - Register a rtc device from core.c that is picked up by this driver Nick Crews (4): cros_ec: Remove cros_ec dependency in lpc_mec platform/chrome: Add new driver for Wilco EC platform/chr

[PATCH v7 1/4] cros_ec: Remove cros_ec dependency in lpc_mec

2019-02-08 Thread Nick Crews
ng code for this fix. Maybe we'll come back through later and fix this. Signed-off-by: Duncan Laurie Acked-for-chrome-platform-by: Enric Balletbo i Serra Signed-off-by: Nick Crews --- Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: - Change <= t

[PATCH v7 2/4] platform/chrome: Add new driver for Wilco EC

2019-02-08 Thread Nick Crews
commit exports the wilco_ec_mailbox() function so that other modules can use it to communicate with the EC. Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- Changes in v7: None Changes in v6: - Re-added WILCO_EC_FLAG_EXTENDED_DATA and went back to always reading either

[PATCH v7 3/4] platform/chrome: Add support for raw commands in debugfs

2019-02-08 Thread Nick Crews
esponse > cat raw 00 31 32 2f 32 31 2f 31 38 00 00 0f 01 00 01 00 .12/21/18... Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- Changes in v7: - Switch to #define for MAX_WORD_SIZE so array size can be determined at compile time. Changes in v6: - s/4.19/5.1/ for kernel version

[PATCH v7 4/4] platform/chrome: rtc: Add RTC driver

2019-02-08 Thread Nick Crews
cked-by: Alexandre Belloni Signed-off-by: Nick Crews --- Changes in v7: None Changes in v6: - In the core, actually unregister the RTC child platform_device. Changes in v5: None Changes in v4: - Change me email to @chromium.org from @google.com - Move "Add RTC driver" before "Add sys

Re: [PATCH v6 3/4] platform/chrome: Add support for raw commands in debugfs

2019-02-08 Thread Nick Crews
I just sent out a fixed version. Thanks! On Fri, Feb 8, 2019 at 10:18 AM Enric Balletbo Serra wrote: > > Hi Nick, > Missatge de Nick Crews del dia dv., 8 de febr. > 2019 a les 2:24: > > > > Add a debugfs attribute that allows sending raw commands to the EC. > >

[PATCH v8 4/4] platform/chrome: rtc: Add RTC driver

2019-02-08 Thread Nick Crews
cked-by: Alexandre Belloni Signed-off-by: Nick Crews --- Changes in v8: None Changes in v7: None Changes in v6: - In the core, actually unregister the RTC child platform_device. Changes in v5: None Changes in v4: - Change me email to @chromium.org from @google.com - Move "Add RTC driver"

[PATCH v8 0/4] platform/chrome: Add basic support for Wilco EC

2019-02-08 Thread Nick Crews
raw now includes ASCII translation - rm license boiler plate - rm "wilco_ec_rtc -" prefix in docstring - Make rtc driver its own module within the drivers/rtc/ directory - Register a rtc device from core.c that is picked up by this driver Nick Crews (4): cros_ec: Remove cros_ec dependency

[PATCH v8 3/4] platform/chrome: Add support for raw commands in debugfs

2019-02-08 Thread Nick Crews
esponse > cat raw 00 31 32 2f 32 31 2f 31 38 00 00 0f 01 00 01 00 .12/21/18... Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- Changes in v8: - Fix a comment about registering the debugfs driver Changes in v7: - Switch to #define for MAX_WORD_SIZE so array size can be dete

[PATCH v8 1/4] cros_ec: Remove cros_ec dependency in lpc_mec

2019-02-08 Thread Nick Crews
ng code for this fix. Maybe we'll come back through later and fix this. Signed-off-by: Duncan Laurie Acked-for-chrome-platform-by: Enric Balletbo i Serra Signed-off-by: Nick Crews --- Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in

[PATCH v8 2/4] platform/chrome: Add new driver for Wilco EC

2019-02-08 Thread Nick Crews
commit exports the wilco_ec_mailbox() function so that other modules can use it to communicate with the EC. Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- Changes in v8: None Changes in v7: None Changes in v6: - Re-added WILCO_EC_FLAG_EXTENDED_DATA and went back to always reading

Re: [PATCH v7 4/4] platform/chrome: rtc: Add RTC driver

2019-02-08 Thread Nick Crews
Sorry all, there is one more error in here I just found, I just sent out v8 that corrects it. Sorry Enric if you already started trying to merge this version. On Fri, Feb 8, 2019 at 12:38 PM Nick Crews wrote: > > This Embedded Controller has an internal RTC that is exposed > as a sta

[PATCH v2 2/9] platform/chrome: Add new driver for Wilco EC

2019-01-14 Thread Nick Crews
cros_ec device type. Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- Changes in v2: - Removed COMPILE_TEST from Kconfig because inb()/outb() won't work on anything but X86 - Moved everything to wilco_ec/ subdirectory - Moved header file to include/platform_data/ so could be used by f

[PATCH v2 0/9] platform/chrome: rtc: Add support for Wilco EC

2019-01-14 Thread Nick Crews
lpc_mec platform/chrome: Add new driver for Wilco EC platform/chrome: Add sysfs attributes platform/chrome: Add support for raw commands in sysfs platform/chrome: rtc: Add RTC driver for Wilco EC platform/chrome: Add event handling Nick Crews (3): platform/chrome: Add EC propert

[PATCH v2 1/9] platform/chrome: Remove cros_ec dependency in lpc_mec

2019-01-14 Thread Nick Crews
with all the calling code for this fix. Maybe we'll come back through later and fix this. Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- Changes in v2: - Fixed kernel-doc comments - Fixed include of linux/mfd/cros_ec_lpc_mec.h - cros_ec_lpc_mec_in_range() returns -EINVAL on er

[PATCH v2 8/9] platform/chrome: Add peakshift and adv_batt_charging

2019-01-14 Thread Nick Crews
> properties/peakshift/peakshift_monday -bash: echo: write error: Invalid argument > dmesg | tail -n1 [40.34534] wilco_ec GOOG00C:00: minutes must be at the quarter hour > echo "16 0 20 45 0 0" > properties/peakshift/peakshift_monday > cat properties/peakshift/peakshift_monday 1

[PATCH v2 3/9] platform/chrome: Add sysfs attributes

2019-01-14 Thread Nick Crews
SVN Revision : 738ed.99 Model Number : 08;8 Build Date : 08/30/18 Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- Changes in v2: - Remove license boiler plate - Remove "wilco_ec_sysfs -" docstring prefix - Fix accidental Makefile deletion - Add documentation for sysfs entri

[PATCH v2 5/9] platform/chrome: rtc: Add RTC driver for Wilco EC

2019-01-14 Thread Nick Crews
; hwclock --show --rtc /dev/rtc1 2018-11-29 17:08:00.780793-08:00 Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- Changes in v2: - rm license boiler plate - rm "wilco_ec_rtc -" prefix in docstring - Make rtc driver its own module within the drivers/rtc/ directory - Registe

[PATCH v2 4/9] platform/chrome: Add support for raw commands in sysfs

2019-01-14 Thread Nick Crews
/GOOG000C\:00/raw 00 37 33 38 65 64 00... Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- Changes in v2: - Add sysfs documentation - rm duplicate EC_MAILBOX_DATA_SIZE defs - Make docstrings follow kernel style - Fix tags in commit msg - Reading raw now includes ASCII translation .../AB

[PATCH v2 7/9] platform/chrome: Add EC properties

2019-01-14 Thread Nick Crews
> echo 1 > properties/global_mic_mute_led [mic mute led on keyboard turns on] > cat properties/global_mic_mute_led 1 > cat properties/wireless_sw_wlan cat: wireless_sw_wlan: Permission denied [Good, that is supposed to be write-only] > echo 0 > properties/wireless_sw_wlan Signed-off-by: Nick Crews

[PATCH v2 9/9] platform/chrome: Add binary telemetry attributes

2019-01-14 Thread Nick Crews
change for comments, until the EC code is implemented. Signed-off-by: Nick Crews --- Changes in v2: - rm "wilco_ec_telemetry - " prefix from docstring - rm license boiler plate - Fix commit msg tag .../ABI/testing/sysfs-platform-wilcoec| 6 ++ drivers/platform/chrome/wilco_e

[PATCH v2 6/9] platform/chrome: Add event handling

2019-01-14 Thread Nick Crews
-- SYN_REPORT Event: type 1 (EV_KEY), code 225 (KEY_BRIGHTNESSUP), value 0 Event: -- SYN_REPORT Signed-off-by: Duncan Laurie Signed-off-by: Nick Crews --- Changes in v2: - rm "wilco_ec_event -" prefix from docstring - rm license boiler plat

Re: [PATCH v2 5/9] platform/chrome: rtc: Add RTC driver for Wilco EC

2019-01-14 Thread Nick Crews
Thanks for the comments Alexandre, I've responded to your comments inline. I'll send out a new version of the patch in a bit On Mon, Jan 14, 2019 at 3:26 PM -700 Alexandre Belloni wrote: > > Hello, > > On 14/01/2019 15:03:52-0700, Nick Crews wrote: > > diff --git a/

Re: [PATCH v2 5/9] platform/chrome: rtc: Add RTC driver for Wilco EC

2019-01-18 Thread Nick Crews
Hi Alexandre, thanks for taking the time to review this. I've responded to your comments inline below. I'll send out a new version of this patch soon. On Mon, Jan 14, 2019 at 3:26 PM Alexandre Belloni wrote: > > Hello, > > On 14/01/2019 15:03:52-0700, Nick Crews wrote: &g

Re: [PATCH v2 4/9] platform/chrome: Add support for raw commands in sysfs

2019-01-18 Thread Nick Crews
Hi Enric, thanks for the comments. I'll send out a new version soon, with this moved to debugfs. On Tue, Jan 15, 2019 at 12:37 PM Enric Balletbo Serra wrote: > > Hi Nick, > > Missatge de Nick Crews del dia dl., 14 de gen. > 2019 a les 23:07: > > > > From: Du

[PATCH v3 0/9] platform/chrome: rtc: Add support for Wilco EC

2019-01-18 Thread Nick Crews
Wilco EC platform/chrome: Add support for raw commands in debugfs platform/chrome: Add sysfs attributes platform/chrome: rtc: Add RTC driver platform/chrome: Add event handling Nick Crews (3): platform/chrome: Add EC properties platform/chrome: Add peakshift and adv_batt_charging platfo

[PATCH v3 8/9] platform/chrome: Add peakshift and adv_batt_charging

2019-01-18 Thread Nick Crews
From: Nick Crews Create "peakshift" and "advanced_battery_charging" directories within the "properties" directory, and create the relevant attributes within these. These properties have to do with configuring some of the advanced power management options that pro

[PATCH v3 7/9] platform/chrome: Add EC properties

2019-01-18 Thread Nick Crews
From: Nick Crews A Property is typically a data item that is stored to NVRAM. Each of these data items has an index associated with it known as the Property ID (PID). The Property ID is used by the system BIOS (and EC) to refer to the Property. Properties may have variable lengths. Many features

  1   2   3   >