<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/platform/chrome, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/platform/chrome?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/platform/chrome?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-10-05T17:14:48Z</updated>
<entry>
<title>Merge tag 'tag-chrome-platform-for-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux</title>
<updated>2022-10-05T17:14:48Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-10-05T17:14:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1c2daf52185bbc91421f0e84e6bf2706bb350cce'/>
<id>urn:sha1:1c2daf52185bbc91421f0e84e6bf2706bb350cce</id>
<content type='text'>
Pull chrome platform updates from Tzung-Bi Shih:
 "cros_ec_proto:
   - Fix protocol failure if EC firmware jumps to RO part

  cros_typec_switch:
   - Add USB Type-C switch driver for mode switches and retimers
   - Integrate to EC for retimers, status update, and mode switches
   - Clean-ups

  cros_ec_typec:
   - Clean-ups
   - Use partner PDOs to register USB PD capabilities

  chromeos_laptop:
   - Fix a double-free

  cros_ec_chardev:
   - Check data length from userland to avoid a memory corruption

  cros_ec:
   - Expose suspend_timeout_ms in debugfs
   - Notify the PM about wake events during resume"

* tag 'tag-chrome-platform-for-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
  platform/chrome: cros_ec: Notify the PM of wake events during resume
  platform/chrome: cros_ec_typec: Register partner PDOs
  platform/chrome: cros_typec_switch: Inline DRV_NAME
  platform/chrome: cros_typec_switch: Use PTR_ERR_OR_ZERO() to simplify
  platform/chrome: cros_typec_switch: Remove impossible condition
  platform/chrome: cros_typec_switch: Add missing newline on printk
  platform/chrome: cros_ec_typec: Correct alt mode index
  platform/chrome: cros_ec_typec: Add bit offset for DP VDO
  platform/chrome: cros_ec: Expose suspend_timeout_ms in debugfs
  platform/chrome: fix memory corruption in ioctl
  platform/chrome: fix double-free in chromeos_laptop_prepare()
  platform/chrome: cros_ec_typec: Get retimer handle
  platform/chrome: cros_ec_typec: Cleanup switch handle return paths
  platform/chrome: cros_typec_switch: Register mode switches
  platform/chrome: cros_typec_switch: Add event check
  platform/chrome: cros_typec_switch: Set EC retimer
  platform/chrome: cros_typec_switch: Add switch driver
  platform/chrome: Add Type-C mux set command definitions
  platform/chrome: cros_ec_proto: Update version on GET_NEXT_EVENT failure
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec: Notify the PM of wake events during resume</title>
<updated>2022-09-19T02:34:38Z</updated>
<author>
<name>Jameson Thies</name>
<email>jthies@google.com</email>
</author>
<published>2022-09-13T20:49:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8edd2752b0aa498b3a61f3caee8f79f7e0567fad'/>
<id>urn:sha1:8edd2752b0aa498b3a61f3caee8f79f7e0567fad</id>
<content type='text'>
cros_ec_handle_event in the cros_ec driver can notify the PM of wake
events. When a device is suspended, cros_ec_handle_event will not check
MKBP events. Instead, received MKBP events are checked during resume by
cros_ec_report_events_during_suspend. But
cros_ec_report_events_during_suspend cannot notify the PM if received
events are wake events, causing wake events to not be reported if
received while the device is suspended.

Update cros_ec_report_events_during_suspend to notify the PM of wake
events during resume by calling pm_wakeup_event.

Signed-off-by: Jameson Thies &lt;jthies@google.com&gt;
Reviewed-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Reviewed-by: Benson Leung &lt;bleung@chromium.org&gt;
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Link: https://lore.kernel.org/r/20220913204954.2931042-1-jthies@google.com
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_typec: Register partner PDOs</title>
<updated>2022-09-07T18:02:57Z</updated>
<author>
<name>Prashant Malani</name>
<email>pmalani@chromium.org</email>
</author>
<published>2022-08-30T20:20:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=348a2e8c93d3ca622cf1b293cd2f597c9db74d9d'/>
<id>urn:sha1:348a2e8c93d3ca622cf1b293cd2f597c9db74d9d</id>
<content type='text'>
The ChromeOS EC exports partner source/sink cap PDOs (Power Data
Objects) to the application processor (AP). Use this information
to register USB PD (Power Delivery) capabilities with the
USB Type-C Power Delivery device class.

Cc: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220830202018.1884851-1-pmalani@chromium.org
[pmalani: Remove extra newline nit from original patch]
</content>
</entry>
<entry>
<title>platform/chrome: cros_typec_switch: Inline DRV_NAME</title>
<updated>2022-09-01T02:15:34Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2022-08-30T22:58:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=20dfb74783093e863228d511f7e6a8db8ee39e18'/>
<id>urn:sha1:20dfb74783093e863228d511f7e6a8db8ee39e18</id>
<content type='text'>
This macro is only used one place, let's inline it instead to save a
line or two.

Cc: Prashant Malani &lt;pmalani@chromium.org&gt;
Cc: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Acked-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Link: https://lore.kernel.org/r/20220830225831.2362403-5-swboyd@chromium.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_typec_switch: Use PTR_ERR_OR_ZERO() to simplify</title>
<updated>2022-09-01T02:15:34Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2022-08-30T22:58:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=dc22a33e35859835b09cff11f445928af0197808'/>
<id>urn:sha1:dc22a33e35859835b09cff11f445928af0197808</id>
<content type='text'>
Use the standard error pointer macro to shorten the code and simplify.

Cc: Prashant Malani &lt;pmalani@chromium.org&gt;
Cc: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Acked-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Link: https://lore.kernel.org/r/20220830225831.2362403-4-swboyd@chromium.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_typec_switch: Remove impossible condition</title>
<updated>2022-09-01T02:15:34Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2022-08-30T22:58:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bbb5fb85cf48757a18870aaeedf6936d5c1f1ead'/>
<id>urn:sha1:bbb5fb85cf48757a18870aaeedf6936d5c1f1ead</id>
<content type='text'>
The type of 'index' is unsigned long long, which can't possibly be less
than zero. Remove the impossible check.

Cc: Prashant Malani &lt;pmalani@chromium.org&gt;
Cc: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Acked-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Link: https://lore.kernel.org/r/20220830225831.2362403-3-swboyd@chromium.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_typec_switch: Add missing newline on printk</title>
<updated>2022-09-01T02:15:34Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2022-08-30T22:58:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8dab6a5939199a5dcf0731eb2dce757837575633'/>
<id>urn:sha1:8dab6a5939199a5dcf0731eb2dce757837575633</id>
<content type='text'>
We need a newline here to ensure the next printk starts fresh.

Cc: Prashant Malani &lt;pmalani@chromium.org&gt;
Cc: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Fixes: affc804c44c8 ("platform/chrome: cros_typec_switch: Add switch driver")
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Acked-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Link: https://lore.kernel.org/r/20220830225831.2362403-2-swboyd@chromium.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_typec: Correct alt mode index</title>
<updated>2022-08-26T22:34:02Z</updated>
<author>
<name>Prashant Malani</name>
<email>pmalani@chromium.org</email>
</author>
<published>2022-08-19T19:08:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4e477663e396f48c5cfc5f2d75d4b514f409516a'/>
<id>urn:sha1:4e477663e396f48c5cfc5f2d75d4b514f409516a</id>
<content type='text'>
Alt mode indices used by USB PD (Power Delivery) start with 1, not 0.

Update the alt mdoe registration code to factor this in to the alt mode
descriptor.

Fixes: de0f49487db3 ("platform/chrome: cros_ec_typec: Register partner altmodes")
Signed-off-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Reviewed-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Link: https://lore.kernel.org/r/20220819190807.1275937-3-pmalani@chromium.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_typec: Add bit offset for DP VDO</title>
<updated>2022-08-26T22:34:02Z</updated>
<author>
<name>Prashant Malani</name>
<email>pmalani@chromium.org</email>
</author>
<published>2022-08-19T19:08:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1903adae0464c1e1c36b132db474cb3aff7bc727'/>
<id>urn:sha1:1903adae0464c1e1c36b132db474cb3aff7bc727</id>
<content type='text'>
Use the right macro while constructing the DP_PORT_VDO to ensure the Pin
Assignment offsets are correct.

Fixes: 1ff5d97f070c ("platform/chrome: cros_ec_typec: Register port altmodes")
Signed-off-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Reviewed-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Link: https://lore.kernel.org/r/20220819190807.1275937-2-pmalani@chromium.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec: Expose suspend_timeout_ms in debugfs</title>
<updated>2022-08-24T02:37:07Z</updated>
<author>
<name>Evan Green</name>
<email>evgreen@chromium.org</email>
</author>
<published>2022-08-22T21:40:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e8bf17d58a4db4b4f38617925414097f12e0d509'/>
<id>urn:sha1:e8bf17d58a4db4b4f38617925414097f12e0d509</id>
<content type='text'>
In modern Chromebooks, the embedded controller has a mechanism where
it will watch a hardware-controlled line that toggles in suspend, and
wake the system up if an expected sleep transition didn't occur. This
can be very useful for detecting power management issues where the
system appears to suspend, but doesn't actually reach its lowest
expected power states.

Sometimes it's useful in debug and test scenarios to be able to control
the duration of that timeout, or even disable the EC timeout mechanism
altogether. Add a debugfs control to set the timeout to values other
than the EC-defined default, for more convenient debug and
development iteration.

Signed-off-by: Evan Green &lt;evgreen@chromium.org&gt;
Reviewed-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Reviewed-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Link: https://lore.kernel.org/r/20220822144026.v3.1.Idd188ff3f9caddebc17ac357a13005f93333c21f@changeid
[tzungbi: fix one nit in Documentation/ABI/testing/debugfs-cros-ec.]
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
</content>
</entry>
</feed>
