ct the
> EC variant at compile-time.
>
> While here also fix the alignment in Kconfig file for this config option
> replacing the spaces by tabs.
>
> Signed-off-by: Enric Balletbo i Serra
> Reviewed-by: Ezequiel Garcia
> Tested-by: Nick Crews
> ---
> Hi,
>
> Th
lso fix the alignment in Kconfig file for this config option
> replacing the spaces by tabs.
>
> Signed-off-by: Enric Balletbo i Serra
> Reviewed-by: Ezequiel Garcia
> Tested-by: Nick Crews
> ---
> Hi,
>
> This is another attempt to solve the issue to be able to select at
&g
When copying an event to userspace failed, the event queue
lock was never released. This fixes that.
Reported-by: Dan Carpenter
Signed-off-by: Nick Crews
---
drivers/platform/chrome/wilco_ec/event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/chrome
some logging, removes an unneeded lock()
from around a check for dev_data->exist in
hangup_device(), removes an unneeded null event pointer
check in enqueue_events(), adds some helper macros to
calculate the size of events, and corrects some
comments.
Signed-off-by: Nick Crews
---
drivers/platf
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 to generate a t
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 +
the EC's firmware build
date, by sending the WILCO_EC_TELEM_GET_VERSION command with
argument index=3. i.e. write [0x38, 0x00, 0x03]
to the device node. An ASCII string of the build date is
returned.
Signed-off-by: Nick Crews
---
v5 changes:
- Free device data in callback so that it isn't freed while
the binary data with
$ cat /dev/wilco_event0 | hexdump -ve '1/1 "%x\n"'
and then create an event by plugging/unplugging the battery.
Signed-off-by: Nick Crews
---
v4 changes:
- Added size limit to queue to kernel would not run out of
memory if there were no userspace consumers
- Chan
On Tue, May 21, 2019 at 9:15 AM Raul E Rangel wrote:
>
> Add the ability to extract version information from the EC.
>
> Signed-off-by: Raul E Rangel
Looks good to me, thanks Raul!
I applied to the chromium branch, and it works.
Reviewed-by: Nick Crews
Tested-by
Hey Enric, thanks for the review!
On Fri, May 24, 2019 at 3:51 AM Enric Balletbo i Serra
wrote:
>
> Hi Nick,
>
> I'm mostly fine with it but ...
>
> On 21/5/19 21:20, Nick Crews wrote:
> > The Wilco Embedded Controller is able to send telemetry data
> >
Hi!
On Fri, Jun 7, 2019 at 12:03 PM Ezequiel Garcia wrote:
>
> On Fri, 2019-06-07 at 12:27 +0200, Enric Balletbo i Serra wrote:
> > On many boards, communication between the kernel and the Embedded
> > Controller happens over an LPC bus. In these cases, the kernel config
> > CONFIG_CROS_EC_LPC
Actually adding Stefan Reinauer this time...
On Fri, Jun 7, 2019 at 1:26 PM Nick Crews wrote:
>
> Hi!
>
> On Fri, Jun 7, 2019 at 12:03 PM Ezequiel Garcia
> wrote:
> >
> > On Fri, 2019-06-07 at 12:27 +0200, Enric Balletbo i Serra wrote:
> > > On many boar
A few nits below, and otherwise looks good to me!
On Fri, Jun 7, 2019 at 2:51 PM Enric Balletbo Serra wrote:
>
> Hi,
>
> Missatge de Guenter Roeck del dia dv., 7 de juny
> 2019 a les 22:11:
> >
> > On Fri, Jun 7, 2019 at 12:27 PM Nick Crews wrote:
> > >
Thanks Richard, I still would like some more opinions
on this changing the userspace experience, but LGTM
otherwise.
Reviewed-by: Nick Crews
On Mon, Jul 29, 2019 at 8:00 PM Richard Tresidder
wrote:
>
> When a battery or batteries in a system are in parallel then one or more
I fixed this in the new version.
On Fri, Jun 21, 2019 at 6:55 PM kbuild test robot wrote:
>
> From: kbuild test robot
>
> drivers/platform/chrome/wilco_ec/event.c:161:3-4: Unneeded semicolon
>
>
> Remove unneeded semicolon.
>
> Generated by: scripts/coccinelle/misc/semicolon.cocci
>
> Fixes:
I applied this in the new version as well.
On Fri, Jun 21, 2019 at 6:55 PM kbuild test robot wrote:
>
> From: kbuild test robot
>
> drivers/platform/chrome/wilco_ec/event.c:270:1-17: WARNING: event_fops:
> .read() has stream semantic; safe to change nonseekable_open -> stream_open.
>
>
When copying an event to userspace failed, the event queue
lock was never released. This fixes that.
Reported-by: Dan Carpenter
Signed-off-by: Nick Crews
---
drivers/platform/chrome/wilco_ec/event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/chrome
ist
in hangup_device().
- Remove an unneeded null event pointer check in enqueue_events().
- Correct some comments.
Signed-off-by: Nick Crews
Reported-by: kbuild test robot
---
A v1 of this was applied to the chrome-platform-5.3 branch, but then
several errors were found, so Enric and Benson reverted the
each request, and change "whitelist" to
"allowlist".
Signed-off-by: Nick Crews
---
drivers/platform/chrome/wilco_ec/telemetry.c | 64 +---
1 file changed, 43 insertions(+), 21 deletions(-)
diff --git a/drivers/platform/chrome/wilco_ec/telemetry.c
b/drivers/plat
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:
> > >
> &
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, 2019 at
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
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,
>
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/rtc-wilco
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
> >
> > > > 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
&g
.
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-ec.c
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
er.
> - 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
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
019 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(-)
> > >
> > > di
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 within
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
> > >
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
> send_ec_c
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 decision wa
.
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-ec.c
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
> to caus
Thanks Yue, looks good to me.
Nick
On Fri, Jun 21, 2019 at 7:59 AM YueHaibing wrote:
>
> Use kmemdup rather than duplicating its implementation
>
> Signed-off-by: YueHaibing
> ---
> drivers/platform/chrome/wilco_ec/event.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff
t; - * Copyright (C) 2016 Google, Inc
> - */
> -
> -#ifndef __CROS_EC_LPC_REG_H
> -#define __CROS_EC_LPC_REG_H
> -
> -/**
> - * cros_ec_lpc_read_bytes - Read bytes from a given LPC-mapped address.
> - * Returns 8-bit checksum of all bytes read.
> - *
> - * @offset: Base read address
> - * @length: Number of bytes to read
> - * @dest: Destination buffer
> - */
> -u8 cros_ec_lpc_read_bytes(unsigned int offset, unsigned int length, u8
> *dest);
> -
> -/**
> - * cros_ec_lpc_write_bytes - Write bytes to a given LPC-mapped address.
> - * Returns 8-bit checksum of all bytes written.
> - *
> - * @offset: Base write address
> - * @length: Number of bytes to write
> - * @msg: Write data buffer
> - */
> -u8 cros_ec_lpc_write_bytes(unsigned int offset, unsigned int length, u8
> *msg);
> -
> -/**
> - * cros_ec_lpc_reg_init
> - *
> - * Initialize register I/O.
> - */
> -void cros_ec_lpc_reg_init(void);
> -
> -/**
> - * cros_ec_lpc_reg_destroy
> - *
> - * Cleanup reg I/O.
> - */
> -void cros_ec_lpc_reg_destroy(void);
> -
> -#endif /* __CROS_EC_LPC_REG_H */
Reviewed-by: Nick Crews
> --
> 2.20.1
>
sys/bus/platform/devices/GOOG000C:00
> > $ tail build_date build_revision version model_number
> > ==> build_date <==
> > 04/25/19
> >
> > ==> build_revision <==
> > d2592cae0
> >
> > ==> version <==
> > 00.00.14
> >
> &
at compile-time.
>
> While here also fix the alignment in Kconfig file for this config option
> replacing the spaces by tabs.
>
> Signed-off-by: Enric Balletbo i Serra
> Reviewed-by: Ezequiel Garcia
> Tested-by: Nick Crews
> ---
> Hi,
>
> This is another atte
bytes read / written
> */
> u8 cros_ec_lpc_io_bytes_mec(enum cros_ec_lpc_mec_io_type io_type,
> unsigned int offset, unsigned int length,
Reviewed-by: Nick Crews
> --
> 2.20.1
>
dev_data->events = event_queue_new(queue_size);
> + if (!dev_data->events) {
> + kfree(dev_data);
> + error = -ENOMEM;
> + goto free_minor;
> + }
> init_waitqueue_head(_data->wq);
> dev_data->exist = true;
> atomic_set(_data->available, 1);
Signed-off-by: Nick Crews
> --
> 2.20.1
>
On Tue, Jun 18, 2019 at 11:30 PM Dan Carpenter wrote:
>
> On Tue, Jun 18, 2019 at 04:39:24PM +0100, Colin King wrote:
> > diff --git a/drivers/platform/chrome/wilco_ec/event.c
> > b/drivers/platform/chrome/wilco_ec/event.c
> > index c975b76e6255..e251a989b152 100644
> > ---
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
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
er.
>From 0cfb3db970636983c1570827b7793e31e352716e Mon Sep 17 00:00:00 2001
From: Nick Crews
Date: Tue, 12 Feb 2019 16:46:15 -0700
Subject: [PATCH] FROMLIST: wilco_ec: Fix Kconfig dependencies
In the initial version of the Wilco EC Driver, the
dependency order was wrong. It before was possible to
select CO
as a
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 future
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 properties
plat
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 error
- Added parens around
> 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
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
; 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
/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
> 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
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
-- 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
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/drivers/rt
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.
>
ot; 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/chrome: Add support for
. 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 <= to >= in mec_in_range()
. This 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
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
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
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.
> >
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"
CII 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 in lpc_mec
platfo
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
. 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 v3:
- Change
. This 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
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
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:
> > di
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: Duncan
There is a new chromebook that contains a different Embedded Controller
(codename Wilco) than the rest of the chromebook series. Thus the kernel
requires a different driver than the already existing and generalized
cros_ec_* drivers. The core of the communication with the EC
is implemented in
n read the result. "12/21/18" is in the middle of the response
> 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
Acked-for-chrome-platform-by: Enric Balletbo i Serra
Signed-off-by: Nick Crews
---
Changes in v5:
- core now always c
as a
cros_ec device type.
Signed-off-by: Duncan Laurie
Acked-for-chrome-platform-by: Enric Balletbo i Serra
Signed-off-by: Nick Crews
---
Changes in v5:
- move checking of NO_RESPONSE flag before timeout check,
so now timeout doesn't always happen when EC isn't supposed
to respond.
- rm
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 v5: None
Changes in v4: None
Changes in v3:
- Change <= to >= in mec_in_range()
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
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
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/ directory
- Register a rtc d
. 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 <= to >= in mec_in_range()
. This 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
ents!
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_
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
/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.
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(+)
-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
> 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
, #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
-- 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
as a
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
> 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
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
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
ONTROL_END_THRESHOLD.
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
documentation 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(
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
There's one error that Guenter just found...
> +
> +int wilco_ec_add_sysfs(struct wilco_ec_device *ec)
> +{
> + return sysfs_create_group(>dev->kobj, _dev_attr_group);
> +}
> +
> +void wilco_ec_remove_sysfs(struct wilco_ec_device *ec)
> +{
> + sysfs_create_group(>dev->kobj,
trol_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
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/testing
1 - 100 of 201 matches
Mail list logo