<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/platform/chrome, branch v5.10</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.10</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.10'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-09-29T08:08:44Z</updated>
<entry>
<title>platform/chrome: Use kobj_to_dev() instead of container_of()</title>
<updated>2020-09-29T08:08:44Z</updated>
<author>
<name>Wang Qing</name>
<email>wangqing@vivo.com</email>
</author>
<published>2020-09-26T07:03:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9aa7bd452af17a3966e3583d959dcacab030bb8e'/>
<id>urn:sha1:9aa7bd452af17a3966e3583d959dcacab030bb8e</id>
<content type='text'>
Use kobj_to_dev() instead of container_of().

Signed-off-by: Wang Qing &lt;wangqing@vivo.com&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_proto: Drop cros_ec_cmd_xfer()</title>
<updated>2020-09-21T08:51:58Z</updated>
<author>
<name>Prashant Malani</name>
<email>pmalani@chromium.org</email>
</author>
<published>2020-09-21T08:51:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6b194ee986463ec7e6de7ccf3728ae4ede3b8d29'/>
<id>urn:sha1:6b194ee986463ec7e6de7ccf3728ae4ede3b8d29</id>
<content type='text'>
Since cros_ec_cmd_xfer_status() now returns Linux error codes and all
other files use that command, remove the now-unused function
cros_ec_cmd_xfer().

Signed-off-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_proto: Update cros_ec_cmd_xfer() call-sites</title>
<updated>2020-09-21T08:51:58Z</updated>
<author>
<name>Prashant Malani</name>
<email>pmalani@chromium.org</email>
</author>
<published>2020-09-21T08:51:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=64b02e54e50fea8ebe0a2b2dc37ea096d0030cc5'/>
<id>urn:sha1:64b02e54e50fea8ebe0a2b2dc37ea096d0030cc5</id>
<content type='text'>
Since all the other call-sites of cros_ec_cmd_xfer() have been converted
to use cros_ec_cmd_xfer_status() instead, update the remaining
call-sites to prepare for the merge of cros_ec_cmd_xfer() into
cros_ec_cmd_xfer_status().

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-&gt;result != EC_RESULT_SUCCESS.

Note that there is a slight change in API in cros_ec_get_sensor_count():
it will return a negative number of sensors when there are no sensors
on arm platform when MOTIONSENSE_CMD_DUMP is not supported (typical for
sensorless chromebook) instead of 0. However, this is not a problem when
probing the EC as we ignore errors only looking for cros_ec_get_sensor_count()
returning a positive number of sensors.

Signed-off-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Tested-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: Kconfig: Remove the transitional MFD_CROS_EC config</title>
<updated>2020-09-04T07:30:04Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2020-09-03T14:17:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dd92f7dfe1ba3bad556c8a529edacce7c6fd0195'/>
<id>urn:sha1:dd92f7dfe1ba3bad556c8a529edacce7c6fd0195</id>
<content type='text'>
The MFD_CROS_EC config was a transitional Kconfig option to not break
current defconfigs in the kernel. Now, this is not required 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 &lt;enric.balletbo@collabora.com&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Tested-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_lightbar: Reduce ligthbar get version command</title>
<updated>2020-09-04T07:30:04Z</updated>
<author>
<name>Gwendal Grignou</name>
<email>gwendal@chromium.org</email>
</author>
<published>2020-08-30T06:59:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1e7913ff5f9f1b73146ad8522958bd266f22a510'/>
<id>urn:sha1:1e7913ff5f9f1b73146ad8522958bd266f22a510</id>
<content type='text'>
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 probed for lightbar by sending a get version
request. Set that request size precisely.

Before 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

Fixes: a841178445bb7 ("mfd: cros_ec: Use a zero-length array for command data")
Signed-off-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_trace: Add fields to command traces</title>
<updated>2020-08-31T10:14:45Z</updated>
<author>
<name>Gwendal Grignou</name>
<email>gwendal@chromium.org</email>
</author>
<published>2020-08-15T03:39:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8143182426874a509f65481c7b740115df22f7f3'/>
<id>urn:sha1:8143182426874a509f65481c7b740115df22f7f3</id>
<content type='text'>
In ftrace, add more fields to the cros_ec command event:

  - Add size of commands to check if they are properly set.
  - Add offset (in case an EC is cascaded being another EC),
    to allow proper command output

With:

  echo 1 &gt; events/cros_ec/cros_ec_cmd/enable

We now have (on samus)

Invalid command for the sensor stack:

  ectool-6942  [002] ....  3082.783116: cros_ec_request_done: version: 3,
  offset: 0, command: EC_CMD_MOTION_SENSE_CMD, outsize: 2, insize: 19,
  ec result: EC_RES_INVALID_PARAM, retval: 0

Powerd accessing PD EC being the main EC:

  powerd-1272  [002] ....    40.644026: 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 &lt;gwendal@chromium.org&gt;
Acked-by: Raul E Rangel &lt;rrangel@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_typec: Re-order connector configuration steps</title>
<updated>2020-08-24T10:45:56Z</updated>
<author>
<name>Azhar Shaikh</name>
<email>azhar.shaikh@intel.com</email>
</author>
<published>2020-08-21T21:47:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a772336596dfadbbe22db24d4c4b9516c4b2dd57'/>
<id>urn:sha1:a772336596dfadbbe22db24d4c4b9516c4b2dd57</id>
<content type='text'>
As per USB Type-C Spec R2.0 section 4.5.1.2 (Connecting Sources and Sinks)
and section 4.5.2.2 (Connection State Machine Requirements), the typical
flow for configuring a device connected to a typeC port is as below:

1. Source/sink detection
2. Orientation
3. Data role
4. VCONN
5. VBUS (USB Type-C currents)
6. The connector is now configured. We can start the PD communication
   that should lead into configuration of the mux if we enter a mode.

But in existing code data role was set after the connector and mux are
already configured. So fix this by following the spec to set the data
role before the connector and mux are configured.

Signed-off-by: Azhar Shaikh &lt;azhar.shaikh@intel.com&gt;
Reviewed-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_typec: Avoid setting usb role twice during disconnect</title>
<updated>2020-08-24T10:45:56Z</updated>
<author>
<name>Azhar Shaikh</name>
<email>azhar.shaikh@intel.com</email>
</author>
<published>2020-08-21T21:47:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b12e4fd5f3e4852cdb1fa11d1a48498bea9e92cf'/>
<id>urn:sha1:b12e4fd5f3e4852cdb1fa11d1a48498bea9e92cf</id>
<content type='text'>
On disconnect port partner is removed and usb role is set to NONE.
But then in cros_typec_port_update() the role is set again.
Avoid this by moving usb_role_switch_set_role() to
cros_typec_configure_mux().

Suggested-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Signed-off-by: Azhar Shaikh &lt;azhar.shaikh@intel.com&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_typec: Send enum values to usb_role_switch_set_role()</title>
<updated>2020-08-24T10:45:56Z</updated>
<author>
<name>Azhar Shaikh</name>
<email>azhar.shaikh@intel.com</email>
</author>
<published>2020-08-21T21:47:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5381b0ed54b6af3c0e8184b43e34154e17904848'/>
<id>urn:sha1:5381b0ed54b6af3c0e8184b43e34154e17904848</id>
<content type='text'>
usb_role_switch_set_role() has the second argument as enum for usb_role.
Currently depending upon the data role i.e. UFP(0) or DFP(1) is sent.
This eventually translates to USB_ROLE_NONE in case of UFP and
USB_ROLE_DEVICE in case of DFP. Correct this by sending correct enum
values as USB_ROLE_DEVICE in case of UFP and USB_ROLE_HOST in case of
DFP.

Fixes: 7e7def15fa4b ("platform/chrome: cros_ec_typec: Add USB mux control")
Signed-off-by: Azhar Shaikh &lt;azhar.shaikh@intel.com&gt;
Cc: Prashant Malani &lt;pmalani@chromium.org&gt;
Reviewed-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_typec: USB4 support</title>
<updated>2020-08-24T09:37:34Z</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2020-07-10T19:40:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=46c5bbd2df4a8b7eed427db866a5bce7234744bf'/>
<id>urn:sha1:46c5bbd2df4a8b7eed427db866a5bce7234744bf</id>
<content type='text'>
With USB4 mode the mux driver needs the Enter_USB Data
Object (EUDO) that was used when the USB mode was entered.
Though the object is not available in the driver, it is
possible to construct it from the information we have.

Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
</feed>
