[PATCH v4 07/11] mfd: cros_ec: Use kzalloc and cros_ec_cmd_xfer_status helper

2019-06-27 Thread Enric Balletbo i Serra
This patch makes use of cros_ec_cmd_xfer_status() instead of cros_ec_cmd_xfer() so we can remove some redundant code. It also uses kzalloc instead of kmalloc so we can remove more redundant code. Signed-off-by: Enric Balletbo i Serra Acked-by: Andy Shevchenko Tested-by: Gwendal Grignou

Re: [PATCH v2] platform/chrome: Expose resume result via debugfs

2019-06-26 Thread Enric Balletbo i Serra
Hi Evan, Two few comments and I think I'm fine with it. On 25/6/19 15:05, Lee Jones wrote: > On Mon, 17 Jun 2019, Evan Green wrote: > >> For ECs that support it, the EC returns the number of slp_s0 >> transitions and whether or not there was a timeout in the resume >> response. Expose the last

Re: [PATCH v3 0/2] Support accelerometers for veyron_minnie

2019-06-26 Thread Enric Balletbo i Serra
Hi Jonathan, On 26/6/19 21:21, Jonathan Cameron wrote: > On Tue, 25 Jun 2019 19:09:50 +0200 > Enric Balletbo i Serra wrote: > >> Hi, >> >> On 25/6/19 0:53, Gwendal Grignou wrote: >>> veyron_minnie - ASUS Chromebook Flip C100PA - embedded controller

Re: [PATCH] platform/chrome: lightbar: Assign drvdata during probe

2019-06-26 Thread Enric Balletbo i Serra
Hi Rajat, On 25/6/19 22:51, Rajat Jain wrote: > The lightbar driver never assigned the drvdata in probe method, and thus > causes a panic when it is accessed at the suspend time. Good catch, that's one of the problems I currently have with mainline on Samus. The other one, that I didn't find

Re: [PATCH v3 0/2] Support accelerometers for veyron_minnie

2019-06-25 Thread Enric Balletbo i Serra
anged, 84 insertions(+), 275 deletions(-) > Just a side note that I think that this patch depends on [1] to have the legacy sensors working on veyron minnie. For the full series: Tested-by: Enric Balletbo i Serra [1] https://lkml.org/lkml/2019/6/18/268

Re: [PATCH v3 6/8] iio: common: cros_ec_sensors: support protocol v3 message

2019-06-25 Thread Enric Balletbo i Serra
Hi Fabien, Jonathan, cc'ing Gwendal and Enrico who might be interested on this patch. It'd be nice if we can land this patch before [1], otherwise the legacy support for cros-ec sensors on veyron minnie won't work and we will mess the kernel log with a couple of errors. I just have a few

Re: [PATCH v7 2/2] iio: cros_ec: Add lid angle driver

2019-06-25 Thread Enric Balletbo i Serra
On 21/6/19 17:31, Jonathan Cameron wrote: > On Wed, 19 Jun 2019 22:49:04 +0200 > Enric Balletbo Serra wrote: > >> Missatge de Gwendal Grignou del dia dv., 14 de >> juny 2019 a les 23:56: >>> >>> On Sat, May 18, 2019 at 2:53 AM Jonathan Cameron wrote: On Fri, 17 May 2019 16:38:56

[PATCH v2] ASoC: rk3399_gru_sound: Support 32, 44.1 and 88.2 kHz sample rates

2019-06-21 Thread Enric Balletbo i Serra
rk3399-gru-sound sound: rockchip_sound_max98357a_hw_params() doesn't support this sample rate: 44100 rk3399-gru-sound sound: ASoC: machine hw_params failed: -22 Signed-off-by: Enric Balletbo i Serra --- Changes in v2: - Instead of add supported sample rates, relegate the work to the compone

[PATCH] ASoC: rk3399_gru_sound: Support 32, 44.1 and 88.2 kHz sample rates

2019-06-20 Thread Enric Balletbo i Serra
we get rid of the errors like the below and we are able to play files using these sample rates. rk3399-gru-sound sound: rockchip_sound_max98357a_hw_params() doesn't support this sample rate: 44100 rk3399-gru-sound sound: ASoC: machine hw_params failed: -22 Signed-off-by: Enric Balletbo i Serra ---

Re: [PATCH 1/3] platform/chrome: cros_ec_debugfs: Add debugfs entry to retrieve EC uptime

2019-06-18 Thread Enric Balletbo i Serra
Hi Tim, On 14/6/19 13:15, Enric Balletbo i Serra wrote: > From: Tim Wawrzynczak > > The new debugfs entry 'uptime' is being made available to userspace so that > a userspace daemon can synchronize EC logs with host time. > > Signed-off-by: Tim Wawrzynczak > [rework

Re: [PATCH] Input: cros_ec_keyb: mask out extra flags in event_type

2019-06-18 Thread Enric Balletbo i Serra
On 14/6/19 8:54, Ting Shen wrote: > http://crosreview.com/1341159 added a EC_MKBP_HAS_MORE_EVENTS flag to > the event_type field, the receiver side should mask out this extra bit when > processing the event. > > Signed-off-by: Ting Shen > > --- > > drivers/input/keyboard/cros_ec_keyb.c | 2

Re: [PATCH 2/2] platform/chrome: wilco_ec: Add circular buffer as event queue

2019-06-18 Thread Enric Balletbo i Serra
On 14/6/19 22:56, Nick Crews wrote: > The current implementation of the event queue both > wastes space using a doubly linked list and isn't super > obvious in how it behaves. This converts the queue to an > actual circular buffer. The size of the queue is a > tunable module parameter. This

Re: [PATCH 1/2] platform/chrome: wilco_ec: Fix unreleased lock in event_read()

2019-06-18 Thread Enric Balletbo i Serra
On 14/6/19 22:56, Nick Crews wrote: > 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(+),

Re: [RFC PATCH chrome-platform-linux] platform/chrome: cros_ec_debugfs: cros_ec_uptime_fops can be static

2019-06-18 Thread Enric Balletbo i Serra
On 15/6/19 12:55, kbuild test robot wrote: > > Fixes: 909447f683b3 ("platform/chrome: cros_ec_debugfs: Add debugfs entry to > retrieve EC uptime") > Signed-off-by: kbuild test robot > --- > cros_ec_debugfs.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH] Revert "ARM: dts: rockchip: set PWM delay backlight settings for Minnie"

2019-06-18 Thread Enric Balletbo i Serra
on to BL enable) or T16 > (time from BL disable to PWM off). > Could you point from where the confusion comes from? I think will be helpful for the record. B101EAN01.8 vs B101EAN01.1 > Signed-off-by: Matthias Kaehlcke With the above added: Reviewed-by: Enric Balletbo i Serra Thank

Re: [PATCH] Revert "ARM: dts: rockchip: set PWM delay backlight settings for Minnie"

2019-06-17 Thread Enric Balletbo i Serra
Hi, On 16/6/19 17:41, Pavel Machek wrote: > Hi! > >> This reverts commit 288ceb85b505c19abe1895df068dda5ed20cf482. >> >> According to the commit message the AUO B101EAN01 panel on minnie >> requires a PWM delay of 200 ms, however this is not what the >> datasheet says. The datasheet mentions a

[PATCH v5 1/3] platform/chrome: cros_ec_lpc: Merge cros_ec_lpc and cros_ec_lpc_reg

2019-06-14 Thread Enric Balletbo i Serra
The cros_ec_lpc_reg files are only used by the cros_ec_lpc core and there isn't logical separation between them. So, merge those files into the cros_ec_lpc also allowing us to drop the header file used for the interface between the two. Signed-off-by: Enric Balletbo i Serra --- Changes in v5

[PATCH v5 2/3] platform/chrome: cros_ec_lpc: Choose Microchip EC at runtime

2019-06-14 Thread Enric Balletbo i Serra
boards that doesn't contain a MEC variant, but is a better solution than having to select 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

[PATCH v5 3/3] platform/chrome: cros_ec_lpc_mec: Fix kernel-doc comment first line

2019-06-14 Thread Enric Balletbo i Serra
kernel-doc comments have a prescribed format. To be _particularly_ correct we should also capitalise the brief description and terminate it with a period. Signed-off-by: Enric Balletbo i Serra --- Changes in v5: - Introduced this patch just to do some kernel-doc clean up. Changes in v4: None

[PATCH v2 03/10] mfd / platform: cros_ec: Miscellaneous character device to talk with the EC

2019-06-14 Thread Enric Balletbo i Serra
subsystem. Signed-off-by: Enric Balletbo i Serra Acked-by: Andy Shevchenko --- Changes in v2: - Remove the list, and the lock, as are not needed (Greg Kroah-Hartman) - Remove dev_info in probe, anyway we will see the chardev or not if the probe fails (Greg Kroah-Hartman) Documentation/ioctl

[PATCH v2 08/10] mfd: cros_ec: Add convenience struct to define dedicated CrOS EC MCUs

2019-06-14 Thread Enric Balletbo i Serra
With the increasing use of dedicated CrOS EC MCUs, it takes a fair amount of boiler plate code to add those devices, add a struct that can be used to specify a dedicated CrOS EC MCU so we can just add a new item to it to define a new dedicated MCU. Signed-off-by: Enric Balletbo i Serra Acked

[PATCH v2 09/10] mfd: cros_ec: Add convenience struct to define autodetectable CrOS EC subdevices

2019-06-14 Thread Enric Balletbo i Serra
The CrOS EC is gaining lots of subdevices that are autodetectable by sending the EC_FEATURE_GET_CMD, it takes fair amount of boiler plate code to add those devices. So, add a struct that can be used to quickly add new subdevices without having to duplicate code. Signed-off-by: Enric Balletbo i

[PATCH v2 05/10] mfd / platform: cros_ec: Rename config to a better name

2019-06-14 Thread Enric Balletbo i Serra
The cros-ec-dev is a multifunction device that now doesn't implement any chardev communication interface. MFD_CROS_EC_CHARDEV doesn't look a good name to describe that device and can cause confusion. Hence rename it to CROS_EC_DEV. Signed-off-by: Enric Balletbo i Serra Acked-by: Andy Shevchenko

[PATCH v2 04/10] mfd: cros_ec: Switch to use the new cros-ec-chardev driver

2019-06-14 Thread Enric Balletbo i Serra
should be implemented there. Signed-off-by: Enric Balletbo i Serra Acked-by: Andy Shevchenko --- Changes in v2: None drivers/mfd/cros_ec_dev.c | 221 ++-- include/linux/mfd/cros_ec.h | 2 - 2 files changed, 7 insertions(+), 216 deletions(-) diff --git

[PATCH v2 01/10] mfd / platform: cros_ec: Handle chained ECs as platform devices

2019-06-14 Thread Enric Balletbo i Serra
Balletbo i Serra Acked-by: Andy Shevchenko --- Changes in v2: - Collect acks received. - Remove '[PATCH 07/10] mfd: cros_ec: Update with SPDX Licence identifier and fix description' to avoid conflicts with some tree-wide patches that actually updates the Licence identifier. - Add '[PATCH 10/10] arm

[PATCH v2 07/10] mfd: cros_ec: Use kzalloc and cros_ec_cmd_xfer_status helper

2019-06-14 Thread Enric Balletbo i Serra
This patch makes use of cros_ec_cmd_xfer_status() instead of cros_ec_cmd_xfer() so we can remove some redundant code. It also uses kzalloc instead of kmalloc so we can remove more redundant code. Signed-off-by: Enric Balletbo i Serra Acked-by: Andy Shevchenko --- Changes in v2: None drivers

[PATCH v2 10/10] arm/arm64: defconfig: Update configs to use the new CROS_EC options

2019-06-14 Thread Enric Balletbo i Serra
Recently we refactored the CrOS EC drivers moving part of the code from the MFD subsystem to the platform chrome subsystem. During this change we needed to rename some config options, so, update the defconfigs accordingly. Signed-off-by: Enric Balletbo i Serra --- Changes in v2: None arch/arm

[PATCH v2 06/10] mfd / platform: cros_ec: Reorganize platform and mfd includes

2019-06-14 Thread Enric Balletbo i Serra
the protocol include - linux/platform_data/cros_ec_proto.h - linux/platform_data/cros_ec_commands.h - Drivers that need to know about the cros-ec mfd device also include - linux/mfd/cros_ec.h Signed-off-by: Enric Balletbo i Serra Acked-by: Andy Shevchenko Acked-by: Mark Brown

[PATCH 1/3] platform/chrome: cros_ec_debugfs: Add debugfs entry to retrieve EC uptime

2019-06-14 Thread Enric Balletbo i Serra
From: Tim Wawrzynczak The new debugfs entry 'uptime' is being made available to userspace so that a userspace daemon can synchronize EC logs with host time. Signed-off-by: Tim Wawrzynczak [rework based on Tim's first approach] Signed-off-by: Enric Balletbo i Serra --- Hi Tim, Sorry

[PATCH 2/3] platform/chrome: cros_ec_debugfs: Fix kernel-doc comment first line

2019-06-14 Thread Enric Balletbo i Serra
kernel-doc comments have a prescribed format. To be _particularly_ correct we should also capitalise the brief description and terminate it with a period. Signed-off-by: Enric Balletbo i Serra --- drivers/platform/chrome/cros_ec_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH 3/3] platform/chrome: cros_ec_debugfs: Add debugfs ABI documentation

2019-06-14 Thread Enric Balletbo i Serra
Add the missing ABI documentation for the already available debugfs entries: console_log, panicinfo and pdinfo. Signed-off-by: Enric Balletbo i Serra --- Documentation/ABI/testing/debugfs-cros-ec | 26 +++ 1 file changed, 26 insertions(+) diff --git a/Documentation/ABI

[PATCH v4] platform/chrome: cros_ec_lpc: Choose Microchip EC at runtime

2019-06-13 Thread Enric Balletbo i Serra
boards that doesn't contain a MEC variant, but is a better solution than having to select 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

Re: [PATCH] arm64: dts: rockchip: Update DWC3 modules on RK3399 SoCs

2019-06-13 Thread Enric Balletbo i Serra
Hi Robin, On 13/6/19 18:56, Robin Murphy wrote: > On 13/06/2019 17:27, Enric Balletbo i Serra wrote: >> As per binding documentation [1], the DWC3 core should have the "ref", >> "bus_early" and "suspend" clocks. As explained in the binding, t

[PATCH] arm64: dts: rockchip: Update DWC3 modules on RK3399 SoCs

2019-06-13 Thread Enric Balletbo i Serra
de and the DWC3 core node, have the clocks defined, but that's not really a problem and there isn't a side effect on do this. So, we can get rid of the annoying get clk error messages. [1] Documentation/devicetree/bindings/usb/dwc3.txt Signed-off-by: Enric Balletbo i Serra --- arch/arm64/boot/dts/

[PATCH] usb: dwc3: Fix core validation in probe, move after clocks are enabled

2019-06-13 Thread Enric Balletbo i Serra
re because, in most cases, the glue layer initializes SoC-specific things and then populates the child "snps,dwc3" with those clocks already enabled. Fixes: b873e2d0ea1ef ("usb: dwc3: Do core validation early on probe") Signed-off-by: Enric Balletbo i Serra --- drivers/usb/dw

[PATCH v3] platform/chrome: cros_ec_lpc: Choose Microchip EC at runtime

2019-06-12 Thread Enric Balletbo i Serra
boards that doesn't contain a MEC variant, but is a better solution than having to select 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

Re: [PATCH] platform/chrome: Expose resume result via sysfs

2019-06-12 Thread Enric Balletbo i Serra
Hi Evan, On 7/6/19 23:05, Evan Green wrote: > For ECs that support it, the EC returns the number of slp_s0 > transitions and whether or not there was a timeout in the resume > response. Expose the last resume result to usermode via sysfs so > that usermode can detect and report S0ix timeouts.

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-10 Thread Enric Balletbo i Serra
Hi Matthias, On 10/6/19 22:39, Matthias Kaehlcke wrote: > Hi Enric > > On Mon, Jun 10, 2019 at 12:00:02PM +0200, Enric Balletbo i Serra wrote: >> Hi Matthias, >> >> On 8/6/19 23:02, Pavel Machek wrote: >>> Hi! >>> >>>>> + * Note

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-10 Thread Enric Balletbo i Serra
Hi Matthias, On 8/6/19 23:02, Pavel Machek wrote: > Hi! > >>> +* Note that this method is based on empirical testing on different >>> +* devices with PWM of 8 and 16 bits of resolution. >>> +*/ >>> + n = period; >>> + while (n) { >>> + counter += n % 2; >>> +

[PATCH v2] platform/chrome: cros_ec_lpc: Choose Microchip EC at runtime

2019-06-07 Thread Enric Balletbo i Serra
boards that doesn't contain a MEC variant, but is a better solution than having to select 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 --- Hi, This is the second attempt

Re: [PATCH v4] platform/chrome: mfd/cros_ec_debugfs: Add debugfs entry to retrieve EC uptime.

2019-06-06 Thread Enric Balletbo i Serra
Hi Tim, Sorry for making you wait so much, now that the patches about cros_ec_commands include file has been accepted and the struct is up-to-date I can manage this. I've some few comments though, one of them is a change I requested but that now we should revert (sorry about that) Please rebase

Re: [PATCH v4] platform/chrome: wilco_ec: Add event handling

2019-06-06 Thread Enric Balletbo i Serra
On 24/5/19 1:06, Nick Crews wrote: > The Wilco Embedded Controller can create custom events that > are not handled as standard ACPI objects. These events can > contain information about changes in EC controlled features, > such as errors and events in the dock or display. For example, > an

Re: [PATCH v5] platform/chrome: wilco_ec: Add telemetry char device interface

2019-06-06 Thread Enric Balletbo i Serra
On 21/5/19 21:20, Nick Crews wrote: > The Wilco Embedded Controller is able to send telemetry data > which is useful for enterprise applications. A daemon running on > the OS sends a command to the EC via a write() to a char device, > and can read the response with a read(). The write() request

Re: [PATCH v2 -next] platform/chrome: cros_ec: Make some symbols static

2019-06-06 Thread Enric Balletbo i Serra
On 30/5/19 19:53, Benson Leung wrote: > Hello YueHaibing, > > On Thu, May 30, 2019 at 04:49:32PM +0800, YueHaibing wrote: >> Fix sparse warning: >> >> drivers/platform/chrome/cros_ec_debugfs.c:256:30: warning: symbol >> 'cros_ec_console_log_fops' was not declared. Should it be static? >>

Re: [PATCH v2] platform/chrome: wilco_ec: Add version sysfs entries

2019-06-06 Thread Enric Balletbo i Serra
Hi, On 5/6/19 17:12, Nick Crews wrote: > Thanks Raul and Enric, this looks good to me. > > On Mon, Jun 3, 2019 at 2:40 PM Enric Balletbo i Serra > wrote: >> >> Nick, >> >> On 3/6/19 20:16, Raul E Rangel wrote: >>> Add the ability to extract ver

[PATCH 10/10] mfd: cros_ec: Add convenience struct to define autodetectable CrOS EC subdevices

2019-06-04 Thread Enric Balletbo i Serra
The CrOS EC is gaining lots of subdevices that are autodetectable by sending the EC_FEATURE_GET_CMD, it takes fair amount of boiler plate code to add those devices. So, add a struct that can be used to quickly add new subdevices without having to duplicate code. Signed-off-by: Enric Balletbo i

[PATCH 06/10] mfd / platform: cros_ec: Reorganize platform and mfd includes

2019-06-04 Thread Enric Balletbo i Serra
the protocol include - linux/platform_data/cros_ec_proto.h - linux/platform_data/cros_ec_commands.h - Drivers that need to know about the cros-ec mfd device also include - linux/mfd/cros_ec.h Signed-off-by: Enric Balletbo i Serra --- drivers/extcon/extcon-usbc-cros-ec.c

[PATCH 07/10] mfd: cros_ec: Update with SPDX Licence identifier and fix description

2019-06-04 Thread Enric Balletbo i Serra
Update with SPDX Licence identifier to remove the licence boiler plate and fix description to be more clear on what's about this driver and to avoid confusions. Signed-off-by: Enric Balletbo i Serra --- drivers/mfd/cros_ec_dev.c | 4 ++-- include/linux/mfd/cros_ec.h | 12 ++-- 2

[PATCH 09/10] mfd: cros_ec: Add convenience struct to define dedicated CrOS EC MCUs

2019-06-04 Thread Enric Balletbo i Serra
With the increasing use of dedicated CrOS EC MCUs, it takes a fair amount of boiler plate code to add those devices, add a struct that can be used to specify a dedicated CrOS EC MCU so we can just add a new item to it to define a new dedicated MCU. Signed-off-by: Enric Balletbo i Serra

[PATCH 04/10] mfd: cros_ec: Switch to use the new cros-ec-chardev driver

2019-06-04 Thread Enric Balletbo i Serra
should be implemented there. Signed-off-by: Enric Balletbo i Serra --- drivers/mfd/cros_ec_dev.c | 221 ++-- include/linux/mfd/cros_ec.h | 2 - 2 files changed, 7 insertions(+), 216 deletions(-) diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c

[PATCH 01/10] mfd / platform: cros_ec: Handle chained ECs as platform devices

2019-06-04 Thread Enric Balletbo i Serra
Balletbo i Serra --- drivers/mfd/cros_ec.c | 61 + drivers/platform/chrome/cros_ec_i2c.c | 8 drivers/platform/chrome/cros_ec_lpc.c | 3 +- drivers/platform/chrome/cros_ec_rpmsg.c | 2 + drivers/platform/chrome/cros_ec_spi.c | 8 include

[PATCH 08/10] mfd: cros_ec: Use kzalloc and cros_ec_cmd_xfer_status helper

2019-06-04 Thread Enric Balletbo i Serra
This patch makes use of cros_ec_cmd_xfer_status() instead of cros_ec_cmd_xfer() so we can remove some redundant code. It also uses kzalloc instead of kmalloc so we can remove more redundant code. Signed-off-by: Enric Balletbo i Serra --- drivers/mfd/cros_ec_dev.c | 17 +++-- 1 file

[PATCH 05/10] mfd / platform: cros_ec: Rename config to a better name

2019-06-04 Thread Enric Balletbo i Serra
The cros-ec-dev is a multifunction device that now doesn't implement any chardev communication interface. MFD_CROS_EC_CHARDEV doesn't look a good name to describe that device and can cause confusion. Hence rename it to CROS_EC_DEV. Signed-off-by: Enric Balletbo i Serra --- drivers/mfd/Kconfig

Re: [PATCH] platform/chrome: fix crash during suspend

2019-06-04 Thread Enric Balletbo i Serra
Hi, On 31/5/19 20:15, Yang, Hyungwoo wrote: >> On 30/5/19 6:03, Hyungwoo Yang wrote: >>> Kernel crashes during suspend due to wrong conversion in suspend and >>> resume functions. >>> >>> Use the proper helper to get ishtp_cl_device instance. >>> >>> Signed-off-by: Hyungwoo Yang >>> --- >>>

Re: [PATCH v2] platform/chrome: wilco_ec: Add version sysfs entries

2019-06-03 Thread Enric Balletbo i Serra
Nick, On 3/6/19 20:16, Raul E Rangel wrote: > Add the ability to extract version information from the EC. > > Example Output: > $ cd /sys/bus/platform/devices/GOOG000C:00 > $ tail build_date build_revision version model_number > ==> build_date <== > 04/25/19 > > ==> build_revision <== >

Re: [PATCH] platform/chrome: wilco_ec: Add version sysfs entries

2019-06-03 Thread Enric Balletbo i Serra
Hi Raul, On 21/5/19 17:15, Raul E Rangel wrote: > Add the ability to extract version information from the EC. > > Signed-off-by: Raul E Rangel > --- > > This patch is rebased on platform/chrome: wilco_ec: Add Boot on AC support. > https://lkml.org/lkml/2019/4/16/1374 > > That patch wasn't in

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

2019-06-03 Thread Enric Balletbo i Serra
Hi Pavel, On 9/4/19 11:55, Pavel Machek wrote: >> The EC is in charge of controlling the keyboard backlight on >> the Wilco platform. We expose a standard LED class device at >> /sys/class/leds/chromeos::kbd_backlight. This driver is modeled > > As discussed, please use platform::. > Last time

Re: [PATCH v9 1/2] power_supply: wilco_ec: Add charging config driver

2019-06-03 Thread Enric Balletbo i Serra
Hi Sebastian, On 8/5/19 22:38, Nick Crews wrote: > Add a driver to control 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 Ba

Re: [PATCH] platform/chrome: fix crash during suspend

2019-05-31 Thread Enric Balletbo i Serra
Hi, Many thanks for this patch On 30/5/19 6:03, Hyungwoo Yang wrote: > Kernel crashes during suspend due to wrong conversion in > suspend and resume functions. > > Use the proper helper to get ishtp_cl_device instance. > > Signed-off-by: Hyungwoo Yang > --- >

Re: [PATCH v9 6/7] mfd: cros_ec: differentiate SCP from EC by feature bit.

2019-05-31 Thread Enric Balletbo i Serra
between them for the userspace, or they would both be > registered at /dev/cros_ec, causing a conflict. > > Signed-off-by: Pi-Hsun Shih I think I already did, but anyway, Acked-by: Enric Balletbo i Serra > > --- > Changes from v8: > - No change. > > Changes from v7: &

[PATCH] platform/chrome: cros_ec_lpc: Choose Microchip EC at runtime

2019-05-30 Thread Enric Balletbo i Serra
boards that doesn't contain a MEC variant, but is a better solution than having to select 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 --- Hi, This is the first attempt

Re: [PATCH v4 3/3] platform/chrome: cros_ec_spi: Request the SPI thread be realtime

2019-05-24 Thread Enric Balletbo i Serra
Hi, On 15/5/19 18:48, Douglas Anderson wrote: > All currently known ECs in the wild are very sensitive to timing. > Specifically the ECs are known to drop a transfer if more than 8 ms > passes from the assertion of the chip select until the transfer > finishes. > > Let's use the new feature

Re: [PATCH v5] platform/chrome: wilco_ec: Add telemetry char device interface

2019-05-24 Thread Enric Balletbo i Serra
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 > which is useful for enterprise applications. A daemon running on > the OS sends a command to the EC via a write() to a char device, > and can read the

Re: mainline/master boot bisection: v5.2-rc1-165-g54dee406374c on rk3288-veyron-jaq

2019-05-23 Thread Enric Balletbo i Serra
Hi Mark, On 23/5/19 15:12, Mark Brown wrote: > On Wed, May 22, 2019 at 07:23:09PM -0700, kernelci.org bot wrote: > >> Details:https://kernelci.org/boot/id/5ce5984c59b514e6a47a364c >> Plain log: >>

Re: [PATCH v4 1/3] platform/chrome: cros_ec_spi: Move to real time priority for transfers

2019-05-21 Thread Enric Balletbo i Serra
Hi, On 15/5/19 19:02, Guenter Roeck wrote: > On Wed, May 15, 2019 at 9:48 AM Douglas Anderson > wrote: >> >> In commit 37a186225a0c ("platform/chrome: cros_ec_spi: Transfer >> messages at high priority") we moved transfers to a high priority >> workqueue. This helped make them much more

Re: [PATCH v4 3/3] platform/chrome: cros_ec_spi: Request the SPI thread be realtime

2019-05-21 Thread Enric Balletbo i Serra
ensitive > then we could consider adding a property (or compatible string) to > not set this property. For now we need it across the board. > > Signed-off-by: Douglas Anderson > Reviewed-by: Guenter Roeck For my own reference: Acked-by: Enric Balletbo i Serra Thanks,

Re: [PATCH v4 2/3] spi: Allow SPI devices to request the pumping thread be realtime

2019-05-21 Thread Enric Balletbo i Serra
en in the > context of the caller so if you need realtime priority for all > transfers you should ensure the calling context is also realtime > priority. > > Signed-off-by: Douglas Anderson > Reviewed-by: Guenter Roeck Tested-by: Enric Balletbo i Serra Thanks, Enric > ---

Re: [PATCH] platform/chrome: cros_ec_spi: Always add of_match_table

2019-05-15 Thread Enric Balletbo i Serra
Hi, On 10/5/19 23:46, Benson Leung wrote: > Hi Evan, > > On Thu, May 09, 2019 at 11:17:50AM -0700, Evan Green wrote: >> The Chrome OS EC driver attaches to devices using the of_match_table >> even when ACPI is the underlying firmware. It does this using the >> magic PRP0001 ACPI HID, which tells

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

2019-05-15 Thread Enric Balletbo i Serra
Hi, On 10/5/19 18:09, Nick Crews wrote: > Thanks for the review Enric! > > I can resend the patch with the fixes, or if you think the fixes are > simple enough, you could tweak them as you apply them. Let > me know if you want me to resend a clean version. > No need to resend, I tweaked them.

Re: [PATCH v4 1/2] platform/chrome: wilco_ec: Remove 256 byte transfers

2019-05-15 Thread Enric Balletbo i Serra
Hi, On 8/5/19 23:38, Nick Crews wrote: > The 0xF6 command, intended to send and receive 256 byte payloads to > and from the EC, is not needed. The 0xF5 command for 32 byte > payloads is sufficient. This patch removes support for the 0xF6 > command and 256 byte payloads. > > Signed-off-by: Nick

Re: [PATCH v5] platform: chrome: Add ChromeOS EC ISHTP driver

2019-05-15 Thread Enric Balletbo i Serra
vice to connect > with cros_ec kernel stack (upper layer), and it registers a > client with the ISH Transport Protocol bus (lower layer) to > talk with the ISH firwmare. See description of the ISHTP > protocol at Documentation/hid/intel-ish-hid.txt > > Signed-off-by: Rushikesh S Kadam &

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

2019-05-15 Thread Enric Balletbo i Serra
Hi, On 24/4/19 18:56, Nick Crews wrote: > A Property is typically a data item that is stored to NVRAM > by the EC. Each of these data items has an index associated > with it, known as the Property ID (PID). Properties may have > variable lengths, up to a max of WILCO_EC_PROPERTY_MAX_SIZE > bytes.

Re: [PATCH v4 2/2] platform/chrome: wilco_ec: Add telemetry char device interface

2019-05-09 Thread Enric Balletbo i Serra
Hi Nick, Many thanks for the patch, some few comments below. On 8/5/19 23:38, Nick Crews wrote: > The Wilco Embedded Controller is able to send telemetry data > which is useful for enterprise applications. A daemon running on > the OS sends a command to the EC via a write() to a char device, >

[PATCH v4 0/3] mfd: cros_ec: Instantiate CrOS FP and TP devices

2019-05-08 Thread Enric Balletbo i Serra
: - Removed the patch to instantiate the ISH device as was already applied. - Rebased on top of for-mfd-next branch. Changes in v3: - Fix Andy Shevchenko email. Changes in v2: - Add a patch to introduce the required enums to build. Enric Balletbo i Serra (3): mfd: cros_ec: Update the EC feature codes

[PATCH v4 3/3] mfd: cros_ec: instantiate properly CrOS Touchpad MCU device

2019-05-08 Thread Enric Balletbo i Serra
regardless of the probing order between the actual cros_ec and cros_tp, the userspace and other kernel drivers should not confuse them. Signed-off-by: Wei-Ning Huang Signed-off-by: Enric Balletbo i Serra --- Changes in v4: None Changes in v3: None Changes in v2: None drivers/mfd/cros_ec_dev.c

[PATCH v4 1/3] mfd: cros_ec: Update the EC feature codes

2019-05-08 Thread Enric Balletbo i Serra
here, also fix a typo in one comment in the enum. Signed-off-by: Enric Balletbo i Serra --- Changes in v4: - Removed the patch to instantiate the ISH device as was already applied. - Rebased on top of for-mfd-next branch. Changes in v3: - Fix Andy Shevchenko email. Changes in v2: - Add a patch

[PATCH v4 2/3] mfd: cros_ec: instantiate properly CrOS FP MCU device

2019-05-08 Thread Enric Balletbo i Serra
regardless of the probing order between the actual cros_ec and cros_fp, the userspace and other kernel drivers should not confuse them. Signed-off-by: Vincent Palatin Signed-off-by: Enric Balletbo i Serra --- Changes in v4: None Changes in v3: None Changes in v2: None drivers/mfd/cros_ec_dev.c

[PATCH v4 1/2] power: supply: add input power and voltage limit properties

2019-05-07 Thread Enric Balletbo i Serra
, similar to input current limit, to re-configure the maximum voltage from the external supply at runtime based on system-level knowledge or user input. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Guenter Roeck Acked-by: Adam Thomson --- Changes in v4: - Add also input_power_limit. Changes

[PATCH v4 2/2] power: supply: cros: allow to set input voltage and current limit

2019-05-07 Thread Enric Balletbo i Serra
knowledge or user input. By default there is no limit, this is reported as a -1 when reading from userspace. Writing a value will set the current or voltage limit in uA or uV, and writing any negative value will remove that limit. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Guenter Roeck

Re: [PATCH 00/30] Update cros_ec_commands.h

2019-04-25 Thread Enric Balletbo i Serra
Hi, cc'ing some ASOC reviewers. On 25/4/19 18:00, Gwendal Grignou wrote: > On Thu, Apr 25, 2019 at 4:19 AM Enric Balletbo i Serra > wrote: >> >> Hi Gwendal, Lee >> >> On 25/4/19 10:12, Lee Jones wrote: >>> On Wed, 24 Apr 2019, Gwendal Grignou wrote

Re: [PATCH 00/30] Update cros_ec_commands.h

2019-04-25 Thread Enric Balletbo i Serra
problem, [PATCH 24/30] mfd: cros_ec: Update I2S API introduces a build problem because removes a struct that is currently used by the cros_ec_codec driver. I think that at the same time we should update that driver with the new struct name. Once this is fixed, Acked-by: Enric Balletbo i Serra for the full series. Thanks, Enric

Re: [PATCH v8 7/7] mfd: cros_ec: differentiate SCP from EC by feature bit.

2019-04-25 Thread Enric Balletbo i Serra
Hi Lee, On 25/4/19 11:06, Lee Jones wrote: > On Mon, 15 Apr 2019, Enric Balletbo i Serra wrote: >> On 12/4/19 9:18, Pi-Hsun Shih wrote: >>> System Companion Processor (SCP) is Cortex M4 co-processor on some >>> MediaTek platform that can run EC-style firmware. Since

Re: [PATCH 24/30] mfd: cros_ec: Update I2S API

2019-04-25 Thread Enric Balletbo i Serra
Hi Gwendal, On 25/4/19 1:29, Gwendal Grignou wrote: > Improve I2S API. > > Signed-off-by: Gwendal Grignou > --- > include/linux/mfd/cros_ec_commands.h | 44 +--- > 1 file changed, 20 insertions(+), 24 deletions(-) > [snip] > > -/* > - * For subcommand

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

2019-04-23 Thread Enric Balletbo i Serra
Sebastian, On 22/4/19 20:07, Nick Crews wrote: > 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 Ser

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

2019-04-23 Thread Enric Balletbo i Serra
y: Nick Crews For my own reference: Acked-for-chrome-by: Enric Balletbo i Serra That means that this patch is pushed out as testing in for-next branch to let the autobuilders play with it. If all goes well your patches would be in the chrome-platform-5.2 or chrome-platform-5.3 (as w

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

2019-04-23 Thread Enric Balletbo i Serra
mmits. > > Signed-off-by: Nick Crews Reviewed-by: Enric Balletbo i Serra > --- > Documentation/ABI/testing/sysfs-class-power | 19 +++ > 1 file changed, 19 insertions(+) > > diff --git a/Documentation/ABI/testing/sysfs-class-power > b/Documenta

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

2019-04-23 Thread Enric Balletbo i Serra
mits. > 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 Reviewed-by: Enric Balletbo i Serra > --- &g

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

2019-04-23 Thread Enric Balletbo i Serra
harge types and adding the > POWER_SUPPLY_PROP_CHARGE_CONTROL_START_THRESHOLD and > POWER_SUPPLY_PROP_CHARGE_CONTROL_END_THRESHOLD properties into > two different commits. > v4 changes: > - Add documentation for the new properties, and add documentation for >

Re: [PATCH v4] platform: chrome: Add ChromeOS EC ISHTP driver

2019-04-23 Thread Enric Balletbo i Serra
sion > > drivers/platform/chrome/Kconfig | 13 + > drivers/platform/chrome/Makefile| 1 + > drivers/platform/chrome/cros_ec_ishtp.c | 763 > ++++++++ > 3 files changed, 777 insertions(+) > create mode 100644 drivers/platform/chrome/cr

Re: [PATCH v6] platform/chrome: cros_ec: Add trace event to trace EC commands

2019-04-23 Thread Enric Balletbo i Serra
On 16/4/19 23:03, Raul E Rangel wrote: > This is useful to see which EC commands are being executed and when. > > To enable: > > echo 1 > /sys/kernel/debug/tracing/events/cros_ec/enable > > Example: > > /* cros_ec_cmd: version: 0, command: EC_CMD_GET_VERSION */ > /* cros_ec_cmd:

Re: [PATCH] PM / devfreq: Return -ENODEV from try_then_request_governor

2019-04-23 Thread Enric Balletbo i Serra
28) > > Signed-off-by: Tomeu Vizoso > Fixes: 23c7b54ca1cd ("PM / devfreq: Fix devfreq_add_device() when drivers are > built as modules.") > Reported-by: Alyssa Rosenzweig > Cc: Enric Balletbo i Serra > --- There is already a fix for that. The fix was initially

Re: [PATCH v5] chrome/platform: cros_ec_proto: Add trace event to trace EC commands

2019-04-16 Thread Enric Balletbo i Serra
Hi Raul, I really like the idea to have trace functionality in cros-ec. Only some few comments below and the patch looks good to me. On 15/4/19 22:57, Raul E Rangel wrote: > This is useful to see which EC commands are being executed and when. > > To enable: > > echo 'cros_ec:*' >>

Re: linux-next: build warning after merge of the chrome-platform tree

2019-04-16 Thread Enric Balletbo i Serra
On 16/4/19 6:30, Stephen Rothwell wrote: > Hi all, > > After merging the chrome-platform tree, today's linux-next build (x86_64 > allmodconfig) produced this warning: > > In file included from drivers/platform/chrome/wilco_ec/debugfs.c:11: > drivers/platform/chrome/wilco_ec/debugfs.c: In

Re: [RESEND PATCH v3 1/2] power: supply: add input voltage limit property

2019-04-16 Thread Enric Balletbo i Serra
Hi Pavel, On 16/4/19 9:19, Pavel Machek wrote: > Hi! > >> This patch exposes a new property, similar to input current limit, to >> re-configure the maximum voltage from the external supply at runtime >> based on system-level knowledge or user input. > > Well, and I suspect it should expose

[RESEND PATCH v3 2/2] power: supply: cros: allow to set input voltage and current limit

2019-04-15 Thread Enric Balletbo i Serra
knowledge or user input. By default there is no limit, this is reported as a -1 when reading from userspace. Writing a value will set the current or voltage limit in uA or uV, and writing any negative value will remove that limit. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Guenter Roeck

[RESEND PATCH v3 1/2] power: supply: add input voltage limit property

2019-04-15 Thread Enric Balletbo i Serra
power for thermal or other reasons. This patch exposes a new property, similar to input current limit, to re-configure the maximum voltage from the external supply at runtime based on system-level knowledge or user input. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Guenter Roeck Acked

[PATCH] platform/chrome: cros_ec_debugfs: Use cros_ec_cmd_xfer_status helper

2019-04-15 Thread Enric Balletbo i Serra
This patch makes use of cros_ec_cmd_xfer_status() instead of cros_ec_cmd_xfer() so we can remove some redundant code. Signed-off-by: Enric Balletbo i Serra --- drivers/platform/chrome/cros_ec_debugfs.c | 30 ++- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git

Re: [PATCH v8 6/7] platform/chrome: cros_ec: add EC host command support using rpmsg.

2019-04-15 Thread Enric Balletbo i Serra
Hi, On 12/4/19 9:18, Pi-Hsun Shih wrote: > Add EC host command support through rpmsg. > > Signed-off-by: Pi-Hsun Shih > --- > Changes from v7: > - Remove one unnecessary dev_err. > > Changes from v6: > - Make data for response aligned to 4 bytes. > > Changes from v5: > - Change commit

Re: [PATCH v8 7/7] mfd: cros_ec: differentiate SCP from EC by feature bit.

2019-04-15 Thread Enric Balletbo i Serra
between them for the userspace, or they would both be > registered at /dev/cros_ec, causing a conflict. > > Signed-off-by: Pi-Hsun Shih Acked-by: Enric Balletbo i Serra Lee, there are several patches touching these files right now so you could have to solve some trivial conflicts. If you want I s

Re: [PATCH v3] platform: chrome: Add ChromeOS EC ISHTP driver

2019-04-15 Thread Enric Balletbo i Serra
Hi Rushikesh, Just few style comments and this can go throught the hid tree. On 7/4/19 14:10, Rushikesh S Kadam wrote: > This driver implements a slim layer to enable the ChromeOS > EC kernel stack (cros_ec) to communicate with ChromeOS EC > firmware running on the Intel Integrated Sensor Hub

<    1   2   3   4   5   6   7   8   9   10   >