max_discard_sectors can not be larger than UINT_MAX>>9,
otherwise, there is a risk that discard requests would be merged
into a request larger than 4GB.
Signed-off-by: Gwendal Grignou
---
block/blk-lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-lib.c b
max_discard_sectors can not be larger than UINT_MAX>>9,
otherwise, there is a risk that discard requests would be merged
into a request larger than 4GB.
Signed-off-by: Gwendal Grignou
---
drivers/mtd/mtd_blkdevs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drive
512 bytes
sectors.
Gwendal Grignou (4):
Limit max_discard_sectors to UINT_MAX>>9
Limit max_discard_sectors to UINT_MAX>>9
Limit max_discard_sectors to UINT_MAX>>9
Limit max_discard_sectors to UINT_MAX>>9
block/blk-lib.c | 2 +-
drivers/block/nbd.c | 2
i Serra (3):
>platform/chrome: cros_ec_sysfs: introduce to_cros_ec_dev define.
>platform/chrome: cros_ec_sysfs: use permission-specific DEVICE_ATTR
> variants
>platform/chrome: cros_ec_debugfs: Use octal permissions '0444'
> Gwendal Grignou (2):
>platform/chrom
On Tue, Mar 20, 2018 at 8:51 AM, Enric Balletbo i Serra
wrote:
> From: Gwendal Grignou
>
> This adds a sysfs attribute (/sys/class/chromeos/cros_ec/kb_wake_angle)
> used to set and get the keyboard wake lid angle. This attribute is
> present only if 2 accelerometers are contr
On Wed, Mar 7, 2018 at 8:28 AM Lee Jones wrote:
> On Wed, 21 Feb 2018, Enric Balletbo i Serra wrote:
> > From: Gwendal Grignou
> >
> > This adds a sysfs attribute (/sys/class/chromeos/cros_ec/kb_wake_angle)
> > used to set and get the keyboard wake lid angle. This at
: Enric Balletbo i Serra
Reviewed-by: Gwendal Grignou
> ---
> drivers/mfd/cros_ec_i2c.c | 12
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/mfd/cros_ec_i2c.c b/drivers/mfd/cros_ec_i2c.c
> index 9f70de1e4c70..9248490504a9 100644
> --- a/
On Mon, Feb 19, 2018 at 2:40 PM, Enric Balletbo i Serra
wrote:
> Check whether this EC instance has RTC host command support and instatiate
> the RTC driver as a subdevice in such case.
>
> Signed-off-by: Enric Balletbo i Serra
Reviewed-by: Gwendal Grignou
> ---
> drivers
egacy device is present on Chromebook devices with older EC
> firmware only supporting deprecated EC commands (Glimmer based devices).
>
> Tested-by: Gwendal Grignou
> Signed-off-by: Enric Balletbo i Serra
Reviewed-by: Gwendal Grignou
> ---
>
using the wrong protocol, the
> wrong buffer size, mixing the EC with other chips).
>
> Signed-off-by: Vincent Palatin
> Acked-by: Benson Leung
> Signed-off-by: Enric Balletbo i Serra
Reviewed-by: Gwendal Grignou
> ---
> drivers/mfd/cros_ec.c | 6 +-
> 1 file changed,
On Wed, Feb 21, 2018 at 9:07 AM, Enric Balletbo i Serra
wrote:
> From: Gwendal Grignou
>
> When accessing a sysfs attribute, if the EC command fails, -EPROTO is
> now returned instead of an error message as it is unlikely an app is
> parsing the error message to do something mea
On Mon, Feb 19, 2018 at 2:41 PM, Enric Balletbo i Serra
wrote:
> From: Gwendal Grignou
This patch is not needed anymore. It was added to
>
> Send dummy command to EC at resume time, wait for status.
> If EC loses that command and return a status for the
> pre-susp
Move to_cros_ec_dev macro to cros_ec.h and use it when the private ec
object is needed from device object.
Signed-off-by: Gwendal Grignou
---
drivers/mfd/cros_ec_dev.c | 4 ++--
drivers/platform/chrome/cros_ec_lightbar.c | 21 +++--
drivers/platform/chrome
Use dev_kzmalloc, remove .release entry point.
Signed-off-by: Gwendal Grignou
---
drivers/mfd/cros_ec_dev.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
index eafd06f62a3a..45d42511a3e5 100644
--- a/drivers
the ability to create any groups inside of that
group.
Signed-off-by: Daniel Rosenberg
Signed-off-by: Gwendal Grignou
---
fs/configfs/inode.c | 38 +++---
1 file changed, 31 insertions(+), 7 deletions(-)
diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c
index
From: Sarthak Kukreti
Use standard helper to set inode owner when created from user space.
This is a noop when the owner is root.
Signed-off-by: Sarthak Kukreti
Signed-off-by: Gwendal Grignou
---
fs/configfs/configfs_internal.h | 5 -
fs/configfs/inode.c | 14
This patch is not correct: When listed with ls, configfs attributes
have the uid/gid of the user who list them, but looks wrong.
I will test it more and repost.
Gwendal.
On Tue, Mar 6, 2018 at 7:36 PM, Gwendal Grignou wrote:
> From: Sarthak Kukreti
>
> Use standard helper to set in
On Thu, Feb 22, 2018 at 1:41 AM, Enric Balletbo i Serra
wrote:
> Hi Gwendal,
>
> On 22/02/18 03:20, Gwendal Grignou wrote:
>> On Mon, Feb 19, 2018 at 2:41 PM, Enric Balletbo i Serra
>> wrote:
>>> From: Gwendal Grignou
>> This patch is not needed anymore
On Wed, Jul 12, 2017 at 3:13 AM, Enric Balletbo i Serra
wrote:
> The cros_ec_dev driver should be used only to expose the Chrome OS Embedded
> Controller to user-space and should not be used to add MFD devices by
> calling mfd_add_devices. This patch moves this logic to the MFD cros_ec
> driver
On Tue, Dec 5, 2017 at 1:55 PM, Thierry Escande
wrote:
> Hi Gwendal,
>
> On 01/12/2017 20:54, Gwendal Grignou wrote:
>>
>> This is not required.
>> Looking with dmidecode, Glimmer reports:
>> ...
>> BIOS Information
>> Vendor: coreboot
&g
Reviewed-by: Gwendal Grignou
On Thu, Nov 30, 2017 at 12:50 PM, Guenter Roeck wrote:
> On Mon, Nov 20, 2017 at 8:15 AM, Thierry Escande
> wrote:
>> The cros_ec_dev module is responsible for registering the MFD devices
>> attached to the ChromeOS EC. This patch moves this mod
Reviewed-by: Gwendal Grignou
On Thu, Nov 30, 2017 at 12:49 PM, Guenter Roeck wrote:
> On Mon, Nov 20, 2017 at 8:15 AM, Thierry Escande
> wrote:
>> This patch splits the cros_ec_devs module in two parts with a
>> cros_ec_dev module responsible for handling MFD de
Checked against 7412f0a0d90ee6ddbad4cde794f88f1489422f3a (CHROMIUM:
platform/chrome: Support MKBP protocol over ACPI)
Reviewed-by: Gwendal Grignou
On Fri, Dec 1, 2017 at 5:42 AM, Thierry Escande
wrote:
> From: Enric Balletbo i Serra
>
> Commit 12278dc7c572 ("platform/chrome: cr
This is not required.
Looking with dmidecode, Glimmer reports:
...
BIOS Information
Vendor: coreboot
Version: Google_Glimmer.5216.198.19
...
Therefore, the first entry of cros_ec_lpc_dmi_table will match.
Gwendal.
On Fri, Dec 1, 2017 at 5:42 AM, Thierry Escande
wrote:
> This
Checked against 3bf98755f9c670c5c10ca05cba22848d65117cb2 (CHROMIUM:
iio: accel: Add cros_ec_accel_legacy driver)
Fixup f2b141a242e59017dbc774dc916748670a41da0b (FIXUP: CHROMIUM: iio:
accel: Add cros_ec_accel_legacy driver) is required for devices with
secondary Embedded Controllers.
Gwendal.
On
On Mon, Jan 25, 2021 at 10:52 AM Stephen Boyd wrote:
>
> Quoting Gwendal Grignou (2021-01-24 13:41:44)
> > On Sun, Jan 24, 2021 at 9:38 AM Jonathan Cameron wrote:
> > >
> > > On Fri, 22 Jan 2021 14:54:43 -0800
> > > Stephen Boyd wrote:
> > >
&g
comments syntax.
Gwendal Grignou (2):
platform: cros_ec: Call interrupt bottom half in ISH or RPMSG mode
platform: cros_ec: Call interrupt bottom half at probe time
drivers/platform/chrome/cros_ec.c | 33 -
drivers/platform/chrome/cros_ec.h | 4 ++-
drivers
While the AP was powered off, the EC may have send messages.
If the message is not serviced within 3s, the EC stops sending message.
Unlock the EC by purging stale messages at probe time.
Signed-off-by: Gwendal Grignou
---
Changes since v1: None.
drivers/platform/chrome/cros_ec.c | 7
Call the same bottom half for all EC protocols (threaded code).
Signed-off-by: Gwendal Grignou
---
Changes since v1:
- Fix merge issues, make changes in cros_ec.h instead of cros_ec_proto.h
- Fix function comments syntax.
drivers/platform/chrome/cros_ec.c | 26
If there is a feature flag in the EC (see
ec_feature_code), you can use cros_subdevices instead.
> };
>
> static const struct mfd_cell cros_ec_vbc_cells[] = {
> --
> 2.30.0.280.ga3ce27912f-goog
>
Reviewed-by: Gwendal Grignou
On Sat, Jan 23, 2021 at 7:53 AM Daisuke Nojiri wrote:
>
> This patch adds a driver for PCHG (Peripheral CHarGer). PCHG is a
> framework managing power supplies for peripheral devices.
>
> This driver creates a sysfs node for each peripheral charge port:
>
> /sys/class/power_supply/PCHGn
>
Call the same bottom half for all EC protocols (threaded code).
Signed-off-by: Gwendal Grignou
---
drivers/platform/chrome/cros_ec.c | 26 -
drivers/platform/chrome/cros_ec_ishtp.c | 6 +
drivers/platform/chrome/cros_ec_rpmsg.c | 6 +
include
Irrespective of the transport (i2c, spi, ish, rpmsg), have all cros ec
interrupt stack call the threaded part (bottom half) of the interrupt
handler.
Fix an issue where EC could be stuck if it sends a message while the AP
is not powered on.
Gwendal Grignou (2):
platform: cros_ec: Call interrupt
While the AP was powered off, the EC may have send messages.
If the message is not serviced within 3s, the EC stops sending message.
Unlock the EC by purging stale messages at probe time.
Signed-off-by: Gwendal Grignou
---
drivers/platform/chrome/cros_ec.c | 7 +++
1 file changed, 7
By default, set the calibscale vector to unit vector.
It prevents sending 0 as calibscale when not initialized.
Signed-off-by: Gwendal Grignou
---
drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/iio
On Thu, May 30, 2019 at 12:48 AM Lee Jones wrote:
>
> On Wed, 29 May 2019, Gwendal Grignou wrote:
>
> > On Wed, May 29, 2019 at 4:44 AM Lee Jones wrote:
> > >
> > > On Tue, 28 May 2019, Gwendal Grignou wrote:
> > >
> > >
On Fri, May 31, 2019 at 1:13 AM Lee Jones wrote:
>
> On Thu, 30 May 2019, Gwendal Grignou wrote:
>
> > On Thu, May 30, 2019 at 12:48 AM Lee Jones wrote:
> > >
> > > On Wed, 29 May 2019, Gwendal Grignou wrote:
> > >
> > >
On Tue, Jun 4, 2019 at 8:20 AM Enric Balletbo i Serra
wrote:
>
> 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
On Sat, May 18, 2019 at 2:53 AM Jonathan Cameron wrote:
>
> On Fri, 17 May 2019 16:38:56 -0700
> Gwendal Grignou wrote:
>
> > Add a IIO driver that reports the angle between the lid and the base for
> > ChromeOS convertible device.
> >
> > Tested on eve wi
red anymore
> > because all the defconfigs have been removed this option and migrated to
> > enable the CrOS EC parts individually.
> >
> > Signed-off-by: Enric Balletbo i Serra
>
> Reviewed-by: Guenter Roeck
Tested-by: Gwendal Grignou
>
> > ---
> >
> > dri
[-iio list][+kernel list]
On Tue, Aug 25, 2020 at 5:29 PM Gwendal Grignou wrote:
>
> By default, the lightbar commands are set to the
> biggest lightbar command and response. That length is greater than 128
> bytes and may not work on all machines.
> But all EC are prob
be:
cros_ec_cmd: version: 0, command: EC_CMD_LIGHTBAR_CMD, outsize: 194, insize:
128, result: 0
Afer:
cros_ec_cmd: version: 0, command: EC_CMD_LIGHTBAR_CMD, outsize: 1, insize: 8,
result: 0
Fixes: a841178445bb7 ("mfd: cros_ec: Use a zero-length array for command data")
Signed-off-by: Gwend
On Sat, Aug 29, 2020 at 8:54 AM Jonathan Cameron wrote:
>
> On Tue, 25 Aug 2020 17:29:45 -0700
> Gwendal Grignou wrote:
>
> > By default, the lightbar commands are set to the
> > biggest lightbar command and response. That length is greater than 128
> > bytes an
the command would be:
cros_ec_cmd: version: 0, command: EC_CMD_LIGHTBAR_CMD, outsize: 194, insize:
128, result: 0
Afer:
cros_ec_cmd: version: 0, command: EC_CMD_LIGHTBAR_CMD, outsize: 1, insize: 8,
result: 0
Signed-off-by: Gwendal Grignou
---
drivers/platform/chrome/cros_ec_lightbar.c | 2 ++
1
026: cros_ec_request_done: version: 0,
offset: 1, command: EC_CMD_USB_PD_POWER_INFO, outsize: 1, insize: 16,
ec result: EC_RES_SUCCESS, retval: 16
Signed-off-by: Gwendal Grignou
---
drivers/platform/chrome/cros_ec_trace.h | 27 +++--
1 file changed, 21 insertions(+), 6 deletions(-)
diff --
t;
> > > As part of this update, change the error handling inside
> > > cros_ec_get_sensor_count() such that the legacy LPC interface is tried
> > > on all error values, not just when msg->result != EC_RESULT_SUCCESS.
> > >
> > > Signed-off-by: Prashant
On Mon, Jan 25, 2021 at 3:44 PM Stephen Boyd wrote:
>
> Quoting Gwendal Grignou (2021-01-25 14:28:46)
> > On Mon, Jan 25, 2021 at 10:52 AM Stephen Boyd wrote:
> > >
> > > Quoting Gwendal Grignou (2021-01-24 13:41:44)
> > > > On Sun, Jan 24, 2021 a
tem. The idea is
> to move all the functionality that extends the bounds of what MFD was
> designed to platform/chrome subsystem.
>
> Signed-off-by: Enric Balletbo i Serra
> Acked-by: Andy Shevchenko
> Tested-by: Gwendal Grignou
> ---
>
> Changes in v4: None
> Changes in
Veyron minnie embedded controller presents 2 accelerometers using an
older interface. Add function to query the data in cros_ec_accel.
Verify accelerometers on veyron-minnie are presented and working.
Signed-off-by: Gwendal Grignou
Acked-by: Jonathan Cameron
---
drivers/iio/accel
INFO_SCALE is set both for each channel and all channels.
iio is using all channel setting, so the error was not user visible.
Signed-off-by: Gwendal Grignou
---
drivers/iio/accel/cros_ec_accel_legacy.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/accel/cros_ec_accel_legacy.c
.
Signed-off-by: Gwendal Grignou
Reviewed-by: Douglas Anderson
---
drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c | 4
include/linux/iio/common/cros_ec_sensors_core.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/drivers/iio/common/cros_ec_sensors
- to veyron_minnie.
veyron_minnie being ARM based, issue command over the I2C bus to the EC
instead of relying on the shared registers over LPC.
Gwendal Grignou (4):
iio: cros_ec: Add sign vector in core for backward compatibility
iio: cros_ec_accel_legacy: Fix incorrect channel setting
iio
Remove duplicate code in cros-ec-accel-legacy,
use cros-ec-sensors-core functions and structures when possible.
On glimmer, check the 2 accelerometers are presented and working.
Signed-off-by: Gwendal Grignou
Acked-by: Jonathan Cameron
---
drivers/iio/accel/Kconfig| 4
- to veyron_minnie.
veyron_minnie being ARM based, issue command over the I2C bus to the EC
instead of relying on the shared registers over LPC.
Gwendal Grignou (4):
iio: cros_ec: Add sign vector in core for backward compatibility
iio: cros_ec_accel_legacy: Fix incorrect channel setting
iio
.
Signed-off-by: Gwendal Grignou
Reviewed-by: Douglas Anderson
---
drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c | 4
include/linux/iio/common/cros_ec_sensors_core.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/drivers/iio/common/cros_ec_sensors
Veyron minnie embedded controller presents 2 accelerometers using an
older interface. Add function to query the data in cros_ec_accel.
Verify accelerometers on veyron-minnie are presented and working.
Signed-off-by: Gwendal Grignou
Acked-by: Jonathan Cameron
---
drivers/iio/accel
Remove duplicate code in cros-ec-accel-legacy,
use cros-ec-sensors-core functions and structures when possible.
On glimmer, check the 2 accelerometers are presented and working.
Signed-off-by: Gwendal Grignou
Acked-by: Jonathan Cameron
---
drivers/iio/accel/Kconfig| 4
INFO_SCALE is set both for each channel and all channels.
iio is using all channel setting, so the error was not user visible.
Signed-off-by: Gwendal Grignou
---
drivers/iio/accel/cros_ec_accel_legacy.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/accel/cros_ec_accel_legacy.c
Sorry for the original mistake. I upload a patch at
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1702884.
On Mon, Jul 15, 2019 at 1:04 PM Matthias Kaehlcke wrote:
>
> Hi Benson,
>
> On Mon, Jul 15, 2019 at 12:55:57PM -0700, Benson Leung wrote:
> > Hi Matthias,
> >
>
Let's use Matthias CL.
On Mon, Jul 15, 2019 at 4:17 PM Gwendal Grignou wrote:
>
> Sorry for the original mistake. I upload a patch at
> https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1702884.
>
> On Mon, Jul 15, 2019 at 1:04 PM Matthias Kaehlcke wr
On Thu, May 21, 2020 at 2:21 AM Enric Balletbo i Serra
wrote:
>
> Hi Gwendal,
>
> Thank you for your patch.
>
> On 21/5/20 7:28, Gwendal Grignou wrote:
> > When EC does not support uptime command (EC_CMD_GET_UPTIME_INFO),
> > return -EPROTO to read of /sys/kerne
When EC does not support uptime command (EC_CMD_GET_UPTIME_INFO),
do not create the uptime sysfs entry point.
User space application will not probe the file needlessly.
The EC console log will not contain EC_CMD_GET_UPTIME_INFO anymore.
Signed-off-by: Gwendal Grignou
---
drivers/platform
EC does not currently preserve range across sensor reinit.
If sensor is powered down at suspend, it will default to the EC default
range at resume, not the range set by the host.
Save range if modified, and apply at resume.
Signed-off-by: Gwendal Grignou
---
.../common/cros_ec_sensors
vice is present on Chromebook devices with older EC
> firmware only supporting deprecated EC commands (Glimmer based devices).
>
> Signed-off-by: Thierry Escande
Tested-by: Gwendal Grignou
Integrated into chromeos kernel [internal CL:891664]
Tested with Glimmer (legacy driver required)
On Thu, Dec 7, 2017 at 1:31 AM, Lee Jones wrote:
> On Fri, 01 Dec 2017, Gwendal Grignou wrote:
>
>> Checked against 3bf98755f9c670c5c10ca05cba22848d65117cb2 (CHROMIUM:
>> iio: accel: Add cros_ec_accel_legacy driver)
>>
>> Fixup f2b141a242e59017dbc774dc91674867
Reviewed-by: Gwendal Grignou
Note there is a patch series that move cros_ec_commands.h from
nclude/linux/mfd/ to include/linux/platform_data.
On Mon, Jul 8, 2019 at 11:16 AM Yicheng Li wrote:
>
> Update cros_ec_commands.h to match the fingerprint MCU section in
> the current ec_c
Remove CROS_EC_FIFO_SIZE and "u32 fifo_max_event_count;" from the
driver/iio/ code. This code is for a driver - cros-ec-sensor-ring -
that is not upstreamable. [see
http://lkml.iu.edu/hypermail/linux/kernel/1607.2/01335.html]. The EC
interface is fine though, we are working on a new version of the
deprecated EC commands:
- Glimmer based devices [Intel SOC using LPC transport]
- Veyron minnie devices [ARM SOC using SPI transport]
Tested-by: Gwendal Grignou
Signed-off-by: Enric Balletbo i Serra
Reviewed-by: Andy Shevchenko
Signed-off-by: Gwendal Grignou
---
Changes in v6:
- Remove .id field
On Sat, Jun 22, 2019 at 1:54 AM Jonathan Cameron wrote:
>
> On Thu, 20 Jun 2019 19:41:05 -0700
> Gwendal Grignou wrote:
>
> > To allow cros_ec iio core library to be used with legacy device, add a
> > vector to rotate sensor data if necessary: legacy devices are not
>
- to veyron_minnie.
veyron_minnie being ARM based, issue command over the I2C bus to the EC
instead of relying on the shared registers over LPC.
Gwendal Grignou (2):
iio: cros_ec: Add sign vector in core for backward compatibility
iio: cros_ec: Extend legacy support to ARM device
Changes in v3
are presented.
Signed-off-by: Gwendal Grignou
---
drivers/iio/accel/Kconfig| 4 +-
drivers/iio/accel/cros_ec_accel_legacy.c | 350 +--
2 files changed, 79 insertions(+), 275 deletions(-)
diff --git a/drivers/iio/accel/Kconfig b/drivers/iio/accel/Kconfig
.
Signed-off-by: Gwendal Grignou
Reviewed-by: Douglas Anderson
---
drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c | 4
include/linux/iio/common/cros_ec_sensors_core.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/drivers/iio/common/cros_ec_sensors
On Wed, May 29, 2019 at 4:44 AM Lee Jones wrote:
>
> On Tue, 28 May 2019, Gwendal Grignou wrote:
>
> > On Mon, Apr 1, 2019 at 8:46 PM Lee Jones wrote:
> > >
> > > On Wed, 27 Feb 2019, Gwendal Grignou wrote:
> > >
> > > > From: E
Due to an API misread, error code can be different for -EIO when reading
a sysfs entry. Return the error reported by the cros_ec stack.
Check the proper error message (protocol error, not supported) is
reported when there is an error returned by the EC stack.
Signed-off-by: Gwendal Grignou
Add calibration scale support to accel, gyro and magnetometer.
Check on eve with current firmware, check reading calibscale returns 1.0,
check with newer firmware values are applied.
Signed-off-by: Gwendal Grignou
---
.../common/cros_ec_sensors/cros_ec_sensors.c | 51
Sounds good to me, I will make the change in rev2.
On Mon, Sep 30, 2019 at 6:15 AM Enric Balletbo i Serra
wrote:
>
> Hi Gwendal,
>
> Many thanks for the patches.
>
> On 22/9/19 19:50, Gwendal Grignou wrote:
> > Add a new function to return the number of MEMS sensors ava
To improve sensor timestamp precision, given EC and AP are in
different time domains, the AP needs to try to record the exact
moment an event was signalled to the AP by the EC as soon as
possible after it happens.
First thing in the hard irq is the best place for this.
Signed-off-by: Gwendal
z.
This set is built upon the master branch of
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Enrico Granata (2):
platform: chrome: cros_ec: Do not attempt to register a non-positive
IRQ number
platform: chrome: cros_ec: handle MKBP more events flag
Gwendal Grignou
cros_ec_sensorhub registers a listener and query motion sense FIFO,
spread to iio sensors registers.
To test, we can use libiio:
iiod&
iio_readdev -u ip:localhost -T 1 -s 25 -b 16 cros-ec-gyro | od -x
Signed-off-by: Gwendal Grignou
---
drivers/iio/accel/cros_ec_accel_legacy.c |
. To mitigate
worst offenders, add a median filter to weed out bigger than expected
delays.
Signed-off-by: Gwendal Grignou
---
.../platform/chrome/cros_ec_sensorhub_ring.c | 485 +-
.../linux/platform_data/cros_ec_sensorhub.h | 65 +++
2 files changed, 533 insertions(+), 17 deletions
uto/
cros-ec-accel.15.auto/
iio:device1
It will be expanded to control EC sensor FIFO.
Signed-off-by: Gwendal Grignou
---
drivers/iio/common/cros_ec_sensors/Kconfig| 2 +-
drivers/platform/chrome/Kconfig |
TSb |
+---+ +---+
| TSb |
+---+
Signed-off-by: Gwendal Grignou
---
.../platform/chrome/cros_ec_sensorhub_ring.c | 99 ++-
1 file changed, 96 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/chrome/cros_ec_sensorhub_ring.c
b/driv
Controller supports.
Signed-off-by: Gwendal Grignou
---
drivers/mfd/cros_ec_dev.c | 61 -
include/linux/mfd/cros_ec.h | 17 +++
2 files changed, 77 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
index
Report the maximum amount of sample the EC can hold.
This is not tunable, but can be useful for application to find out the
maximum amount of time it can sleep when hwfifo_timeout is set to a
large number.
Signed-off-by: Gwendal Grignou
---
.../cros_ec_sensors/cros_ec_sensors_core.c| 35
- Add sensorhub include file
- Remove duplicate code in mfd, since mfd just register
cros_ec_sensorhub if at least one sensor is present
- Change iio cros_ec driver to get the pointer to the cros_ec_dev
through cros_ec_sensorhub.
Signed-off-by: Gwendal Grignou
---
drivers/iio/accel
timestamping as it keeps the desired
synchronization of event times between the two processors.
This patch adds kernel support for this EC feature, allowing the
ec_irq to loop until all events have been served.
Signed-off-by: Enrico Granata
Signed-off-by: Gwendal Grignou
---
drivers/platform/chrome
Expose EC sampling rate through buffer/hwfifo_timeout.
Rename frequency to sampling_frequency to match IIO ABI.
Signed-off-by: Gwendal Grignou
---
.../common/cros_ec_sensors/cros_ec_sensors.c | 1 -
.../cros_ec_sensors/cros_ec_sensors_core.c| 110 +-
drivers/iio/light
To be compliant with other sensors, set and get sensor sampling
frequency in Hz, not mHz.
Fixes: ae7b02ad2f32 ("iio: common: cros_ec_sensors: Expose
cros_ec_sensors frequency range via iio sysfs")
Signed-off-by: Gwendal Grignou
---
.../cros_ec_sensors/cros_ec_sensors_core
From: Enrico Granata
Add a layer of sanity checking to cros_ec_register against attempting to
register IRQ values that are not strictly greater than 0.
Signed-off-by: Enrico Granata
Signed-off-by: Enrico Granata
Signed-off-by: Gwendal Grignou
---
drivers/platform/chrome/cros_ec.c | 2 +-
1
When EC supports FIFO, the samples will flow from the kernel by
themselves.
When no FIFO, the user space app needs to call trigger_new, or better
register a high precision timer.
Signed-off-by: Gwendal Grignou
---
drivers/iio/accel/cros_ec_accel_legacy.c | 8 +--
.../cros_ec_sensors
On Thu, Apr 23, 2020 at 12:50 AM Peter Meerwald-Stadler
wrote:
>
> On Wed, 22 Apr 2020, Gwendal Grignou wrote:
>
> comments below
>
> > Add support for color sensors behind EC like TCS3400.
> > The color data can be presented in Red Green Blue color space (RGB) or
>
On Sat, Apr 25, 2020 at 10:31 AM Jonathan Cameron wrote:
>
> On Wed, 22 Apr 2020 17:02:30 -0700
> Gwendal Grignou wrote:
>
> > Add support for color sensors behind EC like TCS3400.
> > The color data can be presented in Red Green Blue color space (RGB) or
> > the
On Mon, Oct 21, 2019 at 9:45 AM Jonathan Cameron wrote:
>
> On Sun, 20 Oct 2019 22:54:03 -0700
> Gwendal Grignou wrote:
>
> > To be compliant with other sensors, set and get sensor sampling
> > frequency in Hz, not mHz.
> >
> > Fixes: ae7b02ad2f32 (&
string, it still does it when no
> > event mask or an empty event is set for backward compatibility (despite
> > nobody really using this feature).
> >
> > This will be used, for example, by the userspace daemon to receive and
> > treat the EC_MKBP_EVENT_FINGERPRINT se
Reviewed-by: Gwendal Grignou
On Thu, Jun 25, 2020 at 10:02 AM Enric Balletbo i Serra
wrote:
>
> Kerneldoc expects all kernel function members to be documented.
>
> Fixes the following W=1 level warnings:
>
> cros_ec_spi.c:153: warning: Function parameter or member 'ec_dev
Reviewed-by: Gwendal Grignou
On Thu, Jun 25, 2020 at 10:03 AM Enric Balletbo i Serra
wrote:
>
> Kerneldoc expects all kernel structure member to be documented.
>
> Fixes the following W=1 level warnings:
>
> cros_ec_rpmsg.c:49: warning: Function parameter or member 'ept
5ms-+-+-+---> t
Afer, at host level
1 2 3 4 5
--interrupt delay--+-2.5ms-+-2.5ms-+-2.5ms-+-2.5ms-+---> t
Signed-off-by: Gwendal Grignou
---
.../platform/chrome/cros_ec_sensorhub_ring.c | 94 +++
1 file changed, 33 insertio
On Mon, May 27, 2019 at 2:55 AM Fabien Lahoudere
wrote:
>
> Le dimanche 26 mai 2019 à 18:45 +0100, Jonathan Cameron a écrit :
> > On Thu, 23 May 2019 11:07:36 +0200
> > Fabien Lahoudere wrote:
> >
> > > In order to provide minimum and maximum frequencies for each
> > > sensors,
> > > we use a
On Mon, Apr 1, 2019 at 8:46 PM Lee Jones wrote:
>
> On Wed, 27 Feb 2019, Gwendal Grignou wrote:
>
> > From: Enric Balletbo i Serra
> >
> > With this patch, the cros_ec_ctl driver will register the legacy
> > accelerometer driver (named cros_ec_accel_legacy) if
On Thu, Jun 20, 2019 at 2:46 PM Doug Anderson wrote:
>
> Hi,
>
> On Thu, Jun 20, 2019 at 11:53 AM Gwendal Grignou wrote:
> >
> > To allow cros_ec iio core library to be used with legacy device, add a
> > vector to rotate sensor data if necessary: legacy devi
101 - 200 of 424 matches
Mail list logo