<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/platform/chrome/cros_ec_debugfs.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-03-19T18:00:30Z</updated>
<entry>
<title>platform/chrome: cros_ec_debugfs: cancel/schedule logging work only if supported</title>
<updated>2019-03-19T18:00:30Z</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2019-03-19T16:32:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=57aeef7f7a6848024b92c32bf23e8c85a8ac896d'/>
<id>urn:sha1:57aeef7f7a6848024b92c32bf23e8c85a8ac896d</id>
<content type='text'>
The following traceback was reported on ASUS C201, which does not support
console logging.

------------[ cut here ]------------
WARNING: CPU: 2 PID: 361 at kernel/workqueue.c:3030 __flush_work+0x38/0x154
Modules linked in: snd_soc_hdmi_codec cros_ec_debugfs cros_ec_sysfs uvcvideo dw_hdmi_cec dw_hdmi_i2s_audio videobuf2_vmalloc cfg80211 gpio_charger rk_crypto rfkill videobuf2_memops videobuf2_v4l2 des_generic videobuf2_common ofpart m25p80 spi_nor tpm_i2c_infineon sbs_battery mtd tpm joydev cros_ec_dev coreboot_table evdev mousedev ip_tables x_tables [last unloaded: brcmutil]
CPU: 2 PID: 361 Comm: systemd-sleep Not tainted 5.1.0-rc1-1-ARCH+ #1
Hardware name: Rockchip (Device Tree)
[&lt;c020e4b0&gt;] (unwind_backtrace) from [&lt;c020ac18&gt;] (show_stack+0x10/0x14)
[&lt;c020ac18&gt;] (show_stack) from [&lt;c07a3e04&gt;] (dump_stack+0x7c/0x9c)
[&lt;c07a3e04&gt;] (dump_stack) from [&lt;c0222748&gt;] (__warn+0xd0/0xec)
[&lt;c0222748&gt;] (__warn) from [&lt;c022279c&gt;] (warn_slowpath_null+0x38/0x44)
[&lt;c022279c&gt;] (warn_slowpath_null) from [&lt;c02365d0&gt;] (__flush_work+0x38/0x154)
[&lt;c02365d0&gt;] (__flush_work) from [&lt;c023786c&gt;] (__cancel_work_timer+0x114/0x1a4)
[&lt;c023786c&gt;] (__cancel_work_timer) from [&lt;bf33233c&gt;] (cros_ec_debugfs_suspend+0x14/0x1c [cros_ec_debugfs])
[&lt;bf33233c&gt;] (cros_ec_debugfs_suspend [cros_ec_debugfs]) from [&lt;c056a888&gt;] (dpm_run_callback+0x64/0xcc)
[&lt;c056a888&gt;] (dpm_run_callback) from [&lt;c056ad2c&gt;] (__device_suspend+0x174/0x3a8)
[&lt;c056ad2c&gt;] (__device_suspend) from [&lt;c056b9e0&gt;] (dpm_suspend+0x174/0x1e0)
[&lt;c056b9e0&gt;] (dpm_suspend) from [&lt;c026b3e0&gt;] (suspend_devices_and_enter+0x6c/0x50c)
[&lt;c026b3e0&gt;] (suspend_devices_and_enter) from [&lt;c026ba8c&gt;] (pm_suspend+0x20c/0x274)
[&lt;c026ba8c&gt;] (pm_suspend) from [&lt;c026a628&gt;] (state_store+0x54/0x88)
[&lt;c026a628&gt;] (state_store) from [&lt;c03cd2d0&gt;] (kernfs_fop_write+0x114/0x180)
[&lt;c03cd2d0&gt;] (kernfs_fop_write) from [&lt;c035d48c&gt;] (__vfs_write+0x1c/0x154)
[&lt;c035d48c&gt;] (__vfs_write) from [&lt;c035f9e8&gt;] (vfs_write+0xb8/0x198)
[&lt;c035f9e8&gt;] (vfs_write) from [&lt;c035fbc0&gt;] (ksys_write+0x3c/0x74)
[&lt;c035fbc0&gt;] (ksys_write) from [&lt;c0201000&gt;] (ret_fast_syscall+0x0/0x4c)
Exception stack(0xe9365fa8 to 0xe9365ff0)
5fa0: 00000004 beef8b28 00000004 beef8b28 00000004 00000000
5fc0: 00000004 beef8b28 02319170 00000004 beef8b28 00000004 b6f3d900 beef8b74
5fe0: 0000006c beef8a98 b6c0adac b6c66534
---[ end trace f4ee5df14e8ea0ec ]---

If console logging is not supported, the work structure is never
initialized, resulting in the traceback. Calling cancel/schedule functions
conditionally fixes the problem.

While at it, also fix error handling in the probe function.

Reported-by: Urja Rannikko &lt;urjaman@gmail.com&gt;
Cc: Urja Rannikko &lt;urjaman@gmail.com&gt;
Fixes: 6fce0a2cf5a05 ("mfd / platform: cros_ec: Move debugfs attributes to its own driver")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Benson Leung &lt;bleung@chromium.org&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_debugfs: switch to SPDX identifier</title>
<updated>2019-02-01T09:13:05Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2019-01-29T09:38:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cc2db0756fbbbfb8762cb7dc2a2b1c03bc1f0c2b'/>
<id>urn:sha1:cc2db0756fbbbfb8762cb7dc2a2b1c03bc1f0c2b</id>
<content type='text'>
Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
</content>
</entry>
<entry>
<title>mfd / platform: cros_ec: Move debugfs attributes to its own driver</title>
<updated>2019-02-01T08:09:27Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2018-12-12T17:33:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6fce0a2cf5a050e8a3326556d7d293e69be303be'/>
<id>urn:sha1:6fce0a2cf5a050e8a3326556d7d293e69be303be</id>
<content type='text'>
The entire way how cros debugfs attibutes are created is broken.
cros_ec_debugfs should be its own driver and its attributes should be
associated with a debugfs driver not the mfd driver.

Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: cros_ec: Don't try to grab log when suspended</title>
<updated>2018-05-29T08:10:39Z</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2018-04-18T10:24:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=44d99d737279eb2021b2c66df3cee6f8a21ff4e4'/>
<id>urn:sha1:44d99d737279eb2021b2c66df3cee6f8a21ff4e4</id>
<content type='text'>
We should stop our worker thread while we're suspended.  If we don't
then we'll get messages like:

  cros-ec-spi spi5.0: spi transfer failed: -108
  cros-ec-spi spi5.0: cs-deassert spi transfer failed: -108
  cros-ec-ctl cros-ec-ctl.0.auto: EC communication failed

Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_debugfs: Add PD port info to debugfs</title>
<updated>2018-04-11T05:24:51Z</updated>
<author>
<name>Shawn Nematbakhsh</name>
<email>shawnn@chromium.org</email>
</author>
<published>2018-03-23T17:42:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b082b2e1454c3e0217d7cf70f2211966c3d54301'/>
<id>urn:sha1:b082b2e1454c3e0217d7cf70f2211966c3d54301</id>
<content type='text'>
Add info useful for debugging USB-PD port state.

Signed-off-by: Shawn Nematbakhsh &lt;shawnn@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Benson Leung &lt;bleung@chromium.org&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_debugfs: Use octal permissions '0444'</title>
<updated>2018-04-11T05:24:16Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2018-03-23T17:42:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f63192800ebd01099d3487f7fef1dd0ee0b18b45'/>
<id>urn:sha1:f63192800ebd01099d3487f7fef1dd0ee0b18b45</id>
<content type='text'>
Fixed the following checkpatch warning:

    WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider
    using octal permissions '0444'.

Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Suggested-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Benson Leung &lt;bleung@chromium.org&gt;
</content>
</entry>
<entry>
<title>vfs: do bulk POLL* -&gt; EPOLL* replacement</title>
<updated>2018-02-11T22:34:03Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-02-11T22:34:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a9a08845e9acbd224e4ee466f5c1275ed50054e8'/>
<id>urn:sha1:a9a08845e9acbd224e4ee466f5c1275ed50054e8</id>
<content type='text'>
This is the mindless scripted replacement of kernel use of POLL*
variables as described by Al, done by this script:

    for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
        L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
        for f in $L; do sed -i "-es/^\([^\"]*\)\(\&lt;POLL$V\&gt;\)/\\1E\\2/" $f; done
    done

with de-mangling cleanups yet to come.

NOTE! On almost all architectures, the EPOLL* constants have the same
values as the POLL* constants do.  But they keyword here is "almost".
For various bad reasons they aren't the same, and epoll() doesn't
actually work quite correctly in some cases due to this on Sparc et al.

The next patch from Al will sort out the final differences, and we
should be all done.

Scripted-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2018-01-31T01:58:07Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-01-31T01:58:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=168fe32a072a4b8dc81a3aebf0e5e588d38e2955'/>
<id>urn:sha1:168fe32a072a4b8dc81a3aebf0e5e588d38e2955</id>
<content type='text'>
Pull poll annotations from Al Viro:
 "This introduces a __bitwise type for POLL### bitmap, and propagates
  the annotations through the tree. Most of that stuff is as simple as
  'make -&gt;poll() instances return __poll_t and do the same to local
  variables used to hold the future return value'.

  Some of the obvious brainos found in process are fixed (e.g. POLLIN
  misspelled as POLL_IN). At that point the amount of sparse warnings is
  low and most of them are for genuine bugs - e.g. -&gt;poll() instance
  deciding to return -EINVAL instead of a bitmap. I hadn't touched those
  in this series - it's large enough as it is.

  Another problem it has caught was eventpoll() ABI mess; select.c and
  eventpoll.c assumed that corresponding POLL### and EPOLL### were
  equal. That's true for some, but not all of them - EPOLL### are
  arch-independent, but POLL### are not.

  The last commit in this series separates userland POLL### values from
  the (now arch-independent) kernel-side ones, converting between them
  in the few places where they are copied to/from userland. AFAICS, this
  is the least disruptive fix preserving poll(2) ABI and making epoll()
  work on all architectures.

  As it is, it's simply broken on sparc - try to give it EPOLLWRNORM and
  it will trigger only on what would've triggered EPOLLWRBAND on other
  architectures. EPOLLWRBAND and EPOLLRDHUP, OTOH, are never triggered
  at all on sparc. With this patch they should work consistently on all
  architectures"

* 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (37 commits)
  make kernel-side POLL... arch-independent
  eventpoll: no need to mask the result of epi_item_poll() again
  eventpoll: constify struct epoll_event pointers
  debugging printk in sg_poll() uses %x to print POLL... bitmap
  annotate poll(2) guts
  9p: untangle -&gt;poll() mess
  -&gt;si_band gets POLL... bitmap stored into a user-visible long field
  ring_buffer_poll_wait() return value used as return value of -&gt;poll()
  the rest of drivers/*: annotate -&gt;poll() instances
  media: annotate -&gt;poll() instances
  fs: annotate -&gt;poll() instances
  ipc, kernel, mm: annotate -&gt;poll() instances
  net: annotate -&gt;poll() instances
  apparmor: annotate -&gt;poll() instances
  tomoyo: annotate -&gt;poll() instances
  sound: annotate -&gt;poll() instances
  acpi: annotate -&gt;poll() instances
  crypto: annotate -&gt;poll() instances
  block: annotate -&gt;poll() instances
  x86: annotate -&gt;poll() instances
  ...
</content>
</entry>
<entry>
<title>cros_ec: Move cros_ec_dev module to drivers/mfd</title>
<updated>2017-12-15T10:46:06Z</updated>
<author>
<name>Thierry Escande</name>
<email>thierry.escande@collabora.com</email>
</author>
<published>2017-11-20T16:15:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5e0115581bbc367c7958bf5ab8c511b808558533'/>
<id>urn:sha1:5e0115581bbc367c7958bf5ab8c511b808558533</id>
<content type='text'>
The cros_ec_dev module is responsible for registering the MFD devices
attached to the ChromeOS EC. This patch moves this module to drivers/mfd
so calls to mfd_add_devices() are not done from outside the MFD subtree
anymore.

Signed-off-by: Thierry Escande &lt;thierry.escande@collabora.com&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Tested-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>cros_ec: Split cros_ec_devs module</title>
<updated>2017-12-15T10:45:11Z</updated>
<author>
<name>Thierry Escande</name>
<email>thierry.escande@collabora.com</email>
</author>
<published>2017-11-20T16:15:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ea01a31b90581a94cdeef7fda9e4522f15ef64f2'/>
<id>urn:sha1:ea01a31b90581a94cdeef7fda9e4522f15ef64f2</id>
<content type='text'>
This patch splits the cros_ec_devs module in two parts with a
cros_ec_dev module responsible for handling MFD devices registration and
a cros_ec_ctl module responsible for handling the various user-space
interfaces.

For consistency purpose, the driver name for the cros_ec_dev module is
now cros-ec-dev instead of cros-ec-ctl.

In the next commit, the new cros_ec_dev module will be moved to the MFD
subtree so mfd_add_devices() calls are not done from outside MFD.

Signed-off-by: Thierry Escande &lt;thierry.escande@collabora.com&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Tested-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
</feed>
