<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/mfd/cros_ec_dev.c, branch v7.3-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge tag 'mfd-next-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd</title>
<updated>2026-08-27T17:45:08+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-27T17:45:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=79b4f3baae2fa65060c30f827e3c0e8f1db99f98'/>
<id>79b4f3baae2fa65060c30f827e3c0e8f1db99f98</id>
<content type='text'>
Pull MFD updates from Lee Jones:
 "New Support &amp; Features:
   - MediaTek MT6397: Add mt6323 AUXADC support
   - MediaTek MT6397: Add mt6323 EFUSE support
   - Spreadtrum SC27xx: Add SC2730 regulator cell

  Improvements &amp; Fixes:
   - Apple SMC: Fix key count endianness annotation
   - Azoteq IQS62x: Reject zero-length firmware records
   - ChromeOS EC: Introduce cros_ec_read_features helper and read
     features during probe to catch transfer errors
   - Cirrus Logic CS42L43: Fix regmap defaults ordering
   - Cirrus Logic CS42L43: Remove redundant NULL checks on SoundWire
   - Congatec Board Controller: Fix teardown ordering in cgbc_remove()
   - HP iPAQ Micro: Fix out-of-bounds stack read in ipaq_micro_str
   - Marvell 88PM886: Initialize the battery page
   - QNAP MCU: Keep the reply buffer alive past a command timeout
   - RAVE SP: Validate received frame payload lengths
   - Silicon Labs Si476x: Drop duplicate NULL checks
   - Silicon Labs Si476x: Modernize GPIO handling
   - Silicon Motion SM501: Fix potential memory leaks during remove
   - UCB1x00: Convert Assabet gpio-keys to use software nodes and
     register software node for GPIO controller
   - Viperboard: Fix native fields type in structures as little-endian
   - Viperboard: Remove redundant NULL check before kfree()
   - X-Powers AXP20x: Preserve other control bits when powering off

  Cleanups &amp; Refactoring:
   - Core: Drop unused assignment of spi_device_id driver data
   - Core: Initialize spi_device_id arrays using member names
   - Core: Unify style of spi_device_id arrays
   - Maintainers: Add Intel LPSS section to follow the changes
   - Maintainers: Add a mailing list entry to MFD
   - Cirrus Logic CS42L43: Format sdw_device_id table
   - Cirrus Logic CS42L43: Use new SoundWire enumeration helper
   - ROHM PMIC: Factor out power button registration and convert
     gpio-keys to use software nodes
   - ST-Ericsson DB8500: Fold dbx500 header into db8500

  Device Tree Binding Updates:
   - Core: Add techvision vendor prefix
   - Marvell 88PM886: Allow vbus regulator
   - MediaTek MT8195 SCP: Add support for MT8189 SoC
   - Qualcomm SPMI PMIC: Document PMG1110
   - Qualcomm SPMI PMIC: Document haptics device
   - Qualcomm TCSR: Add compatible for Hawi and Maili SoCs
   - Qualcomm TCSR: Add compatible for Shikra
   - Qualcomm TCSR: Document the IPQ9650 TCSR block
   - STMicroelectronics STMPE: Fix typo st,stmpe601 (should be
     st,stmpe610)
   - Syscon: Add ESWIN EIC7700 compatible
   - Syscon: Allow syscon compatible for Loongson-2K0300 chip id
   - Syscon: Disallow simple-bus with syscon
   - Syscon: Drop custom select for older dtschema
   - TI OMAP USBHS TLL: Convert to DT schema"

* tag 'mfd-next-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (45 commits)
  mfd: cs42l43: Fix regmap defaults ordering
  dt-bindings: mfd: syscon: Allow syscon compatible for Loongson-2K0300 chip id
  dt-bindings: mfd: syscon: Add ESWIN EIC7700 compatible
  mfd: qnap-mcu: keep the reply buffer alive past a command timeout
  dt-bindings: mfd: qcom,tcsr: Document the IPQ9650 TCSR block
  mfd: macsmc: Fix key count endianness annotation
  dt-bindings: mfd: qcom,spmi-pmic: Document haptics device
  mfd: iqs62x: Reject zero-length firmware records
  mfd: rave-sp: validate received frame payload lengths
  mfd: sm501: Fix potential memory leaks during remove
  mfd: viperboard: Fix native fields type in structures as little-endian
  mfd: si476x-i2c: Get rid of duplicate NULL checks
  dt-bindings: mfd: Convert OMAP USB TLL to DT schema
  mfd: cgbc: Fix teardown ordering in cgbc_remove()
  mfd: mt6397-core: Add mt6323 AUXADC support
  dt-bindings: mfd: qcom,tcsr: Add compatible for Hawi and Maili SoCs
  mfd: rohm: Factor out power button registration
  mfd: ucb1x00: Convert Assabet gpio-keys to use software nodes
  mfd: ucb1x00: Register software node for GPIO controller
  mfd: cs42l43: Tidy up formatting on sdw_device_id table
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull MFD updates from Lee Jones:
 "New Support &amp; Features:
   - MediaTek MT6397: Add mt6323 AUXADC support
   - MediaTek MT6397: Add mt6323 EFUSE support
   - Spreadtrum SC27xx: Add SC2730 regulator cell

  Improvements &amp; Fixes:
   - Apple SMC: Fix key count endianness annotation
   - Azoteq IQS62x: Reject zero-length firmware records
   - ChromeOS EC: Introduce cros_ec_read_features helper and read
     features during probe to catch transfer errors
   - Cirrus Logic CS42L43: Fix regmap defaults ordering
   - Cirrus Logic CS42L43: Remove redundant NULL checks on SoundWire
   - Congatec Board Controller: Fix teardown ordering in cgbc_remove()
   - HP iPAQ Micro: Fix out-of-bounds stack read in ipaq_micro_str
   - Marvell 88PM886: Initialize the battery page
   - QNAP MCU: Keep the reply buffer alive past a command timeout
   - RAVE SP: Validate received frame payload lengths
   - Silicon Labs Si476x: Drop duplicate NULL checks
   - Silicon Labs Si476x: Modernize GPIO handling
   - Silicon Motion SM501: Fix potential memory leaks during remove
   - UCB1x00: Convert Assabet gpio-keys to use software nodes and
     register software node for GPIO controller
   - Viperboard: Fix native fields type in structures as little-endian
   - Viperboard: Remove redundant NULL check before kfree()
   - X-Powers AXP20x: Preserve other control bits when powering off

  Cleanups &amp; Refactoring:
   - Core: Drop unused assignment of spi_device_id driver data
   - Core: Initialize spi_device_id arrays using member names
   - Core: Unify style of spi_device_id arrays
   - Maintainers: Add Intel LPSS section to follow the changes
   - Maintainers: Add a mailing list entry to MFD
   - Cirrus Logic CS42L43: Format sdw_device_id table
   - Cirrus Logic CS42L43: Use new SoundWire enumeration helper
   - ROHM PMIC: Factor out power button registration and convert
     gpio-keys to use software nodes
   - ST-Ericsson DB8500: Fold dbx500 header into db8500

  Device Tree Binding Updates:
   - Core: Add techvision vendor prefix
   - Marvell 88PM886: Allow vbus regulator
   - MediaTek MT8195 SCP: Add support for MT8189 SoC
   - Qualcomm SPMI PMIC: Document PMG1110
   - Qualcomm SPMI PMIC: Document haptics device
   - Qualcomm TCSR: Add compatible for Hawi and Maili SoCs
   - Qualcomm TCSR: Add compatible for Shikra
   - Qualcomm TCSR: Document the IPQ9650 TCSR block
   - STMicroelectronics STMPE: Fix typo st,stmpe601 (should be
     st,stmpe610)
   - Syscon: Add ESWIN EIC7700 compatible
   - Syscon: Allow syscon compatible for Loongson-2K0300 chip id
   - Syscon: Disallow simple-bus with syscon
   - Syscon: Drop custom select for older dtschema
   - TI OMAP USBHS TLL: Convert to DT schema"

* tag 'mfd-next-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (45 commits)
  mfd: cs42l43: Fix regmap defaults ordering
  dt-bindings: mfd: syscon: Allow syscon compatible for Loongson-2K0300 chip id
  dt-bindings: mfd: syscon: Add ESWIN EIC7700 compatible
  mfd: qnap-mcu: keep the reply buffer alive past a command timeout
  dt-bindings: mfd: qcom,tcsr: Document the IPQ9650 TCSR block
  mfd: macsmc: Fix key count endianness annotation
  dt-bindings: mfd: qcom,spmi-pmic: Document haptics device
  mfd: iqs62x: Reject zero-length firmware records
  mfd: rave-sp: validate received frame payload lengths
  mfd: sm501: Fix potential memory leaks during remove
  mfd: viperboard: Fix native fields type in structures as little-endian
  mfd: si476x-i2c: Get rid of duplicate NULL checks
  dt-bindings: mfd: Convert OMAP USB TLL to DT schema
  mfd: cgbc: Fix teardown ordering in cgbc_remove()
  mfd: mt6397-core: Add mt6323 AUXADC support
  dt-bindings: mfd: qcom,tcsr: Add compatible for Hawi and Maili SoCs
  mfd: rohm: Factor out power button registration
  mfd: ucb1x00: Convert Assabet gpio-keys to use software nodes
  mfd: ucb1x00: Register software node for GPIO controller
  mfd: cs42l43: Tidy up formatting on sdw_device_id table
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: cros_ec: Read EC features during probe to catch transfer error</title>
<updated>2026-07-23T16:02:44+00:00</updated>
<author>
<name>Andrei Kuchynski</name>
<email>akuchynski@chromium.org</email>
</author>
<published>2026-06-08T21:15:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5855464dff6a2171847463775c7cdac92742e0f9'/>
<id>5855464dff6a2171847463775c7cdac92742e0f9</id>
<content type='text'>
cros_ec_check_features() does not return an error if the underlying
EC_CMD_GET_FEATURES command fails. Consequently, when the Fingerprint
device fails to respond, the probe function ignores the failure and falls
back to installing it as 'cros_ec' device instead of 'cros_fp'.
This leads to a sysfs duplicate filename collision later when the real
'cros_ec' device attempts to register:

  cros-ec-spi spi5.0: EC failed to respond in time
  cros-ec-dev.19.auto: cannot get EC features: -110
  sysfs : cannot create duplicate filename '/class/chromeos/cros_ec'
        : sysfs_do_create_link_sd+0x94/0xdc
        : ec_device_probe+0x150/0x4f0

Fix this by explicitly calling the newly introduced cros_ec_read_features()
function. If the transfer fails, abort the broken device initialization.
Move the initialization of class_dev before this call to prevent a missing
release() callback warning on the error path.

Signed-off-by: Andrei Kuchynski &lt;akuchynski@chromium.org&gt;
Link: https://patch.msgid.link/20260608211518.2214740-3-akuchynski@chromium.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cros_ec_check_features() does not return an error if the underlying
EC_CMD_GET_FEATURES command fails. Consequently, when the Fingerprint
device fails to respond, the probe function ignores the failure and falls
back to installing it as 'cros_ec' device instead of 'cros_fp'.
This leads to a sysfs duplicate filename collision later when the real
'cros_ec' device attempts to register:

  cros-ec-spi spi5.0: EC failed to respond in time
  cros-ec-dev.19.auto: cannot get EC features: -110
  sysfs : cannot create duplicate filename '/class/chromeos/cros_ec'
        : sysfs_do_create_link_sd+0x94/0xdc
        : ec_device_probe+0x150/0x4f0

Fix this by explicitly calling the newly introduced cros_ec_read_features()
function. If the transfer fails, abort the broken device initialization.
Move the initialization of class_dev before this call to prevent a missing
release() callback warning on the error path.

Signed-off-by: Andrei Kuchynski &lt;akuchynski@chromium.org&gt;
Link: https://patch.msgid.link/20260608211518.2214740-3-akuchynski@chromium.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace &lt;linux/mod_devicetable.h&gt; by more specific &lt;linux/device-id/*.h&gt; (c files)</title>
<updated>2026-07-03T05:38:17+00:00</updated>
<author>
<name>Uwe Kleine-König (The Capable Hub)</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2026-06-30T09:24:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=995832b2cebe6969d1b42635db698803ee31294d'/>
<id>995832b2cebe6969d1b42635db698803ee31294d</id>
<content type='text'>
Replace the #include of &lt;linux/mod_devicetable.h&gt; by the more specific
&lt;linux/device-id/*.h&gt; where applicable. For most cases the include
can be dropped completely, only a few drivers need one or two headers
added.

Acked-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Acked-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Acked-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Link: https://patch.msgid.link/1a3f2007c5c5dcf555c09a4035ce3ae8ef1b6c49.1782808461.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König (The Capable Hub) &lt;u.kleine-koenig@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the #include of &lt;linux/mod_devicetable.h&gt; by the more specific
&lt;linux/device-id/*.h&gt; where applicable. For most cases the include
can be dropped completely, only a few drivers need one or two headers
added.

Acked-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Acked-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Acked-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Link: https://patch.msgid.link/1a3f2007c5c5dcf555c09a4035ce3ae8ef1b6c49.1782808461.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König (The Capable Hub) &lt;u.kleine-koenig@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: cros_ec: Delay dev_set_drvdata() until probe success</title>
<updated>2026-06-17T10:32:23+00:00</updated>
<author>
<name>Andrei Kuchynski</name>
<email>akuchynski@chromium.org</email>
</author>
<published>2026-04-27T13:17:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8b2c1d41bc36c100b38ce5ee6def246c527eaf8a'/>
<id>8b2c1d41bc36c100b38ce5ee6def246c527eaf8a</id>
<content type='text'>
If ec_device_probe() fails, cros_ec_class_release releases memory for the
cros_ec_dev structure. However, because the drvdata was already set,
sub-drivers like cros_ec_typec can still retrieve the stale pointer via the
platform device. This leads to a use-after-free when cros_ec_typec attempts
to access &amp;typec-&gt;ec-&gt;ec-&gt;dev on a device that has already been released.
Move dev_set_drvdata() to ensure that the pointer is only made available
once all initialization steps have succeeded.

 sysfs: cannot create duplicate filename '/class/chromeos/cros_ec'
 Call trace:
  sysfs_do_create_link_sd+0x94/0xdc
  sysfs_create_link+0x30/0x44
  device_add_class_symlinks+0x90/0x13c
  device_add+0xf0/0x50c
  ec_device_probe+0x150/0x4f0
  platform_probe+0xa0/0xe0
 ...
 BUG: KASAN: invalid-access in __memcpy+0x44/0x230
 Write at addr f5ffff809e2d33ac by task kworker/u32:5/125
 Pointer tag: [f5], memory tag: [fe]
 Tainted : [W]=WARN, [O]=OOT_MODULE
 Hardware name: Google Navi unprovisioned 0x7FFFFFFF/sku0 board/sku3
 Workqueue: events_unbound deferred_probe_work_func
 Call trace:
  __memcpy+0x44/0x230
  cros_ec_check_features+0x60/0xcc [cros_ec_proto]
  cros_typec_probe+0xe8/0x6e0 [cros_ec_typec]
  platform_probe+0xa0/0xe0

Cc: stable@vger.kernel.org
Fixes: 1c1d152cc5ac ("platform/chrome: cros_ec_dev - utilize new cdev_device_add helper function")
Co-developed-by: Sergey Senozhatsky &lt;senozhatsky@chromium.org&gt;
Signed-off-by: Sergey Senozhatsky &lt;senozhatsky@chromium.org&gt;
Signed-off-by: Andrei Kuchynski &lt;akuchynski@chromium.org&gt;
Reviewed-by: Benson Leung &lt;bleung@chromium.org&gt;
Link: https://patch.msgid.link/20260427131721.1165078-1-akuchynski@chromium.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If ec_device_probe() fails, cros_ec_class_release releases memory for the
cros_ec_dev structure. However, because the drvdata was already set,
sub-drivers like cros_ec_typec can still retrieve the stale pointer via the
platform device. This leads to a use-after-free when cros_ec_typec attempts
to access &amp;typec-&gt;ec-&gt;ec-&gt;dev on a device that has already been released.
Move dev_set_drvdata() to ensure that the pointer is only made available
once all initialization steps have succeeded.

 sysfs: cannot create duplicate filename '/class/chromeos/cros_ec'
 Call trace:
  sysfs_do_create_link_sd+0x94/0xdc
  sysfs_create_link+0x30/0x44
  device_add_class_symlinks+0x90/0x13c
  device_add+0xf0/0x50c
  ec_device_probe+0x150/0x4f0
  platform_probe+0xa0/0xe0
 ...
 BUG: KASAN: invalid-access in __memcpy+0x44/0x230
 Write at addr f5ffff809e2d33ac by task kworker/u32:5/125
 Pointer tag: [f5], memory tag: [fe]
 Tainted : [W]=WARN, [O]=OOT_MODULE
 Hardware name: Google Navi unprovisioned 0x7FFFFFFF/sku0 board/sku3
 Workqueue: events_unbound deferred_probe_work_func
 Call trace:
  __memcpy+0x44/0x230
  cros_ec_check_features+0x60/0xcc [cros_ec_proto]
  cros_typec_probe+0xe8/0x6e0 [cros_ec_typec]
  platform_probe+0xa0/0xe0

Cc: stable@vger.kernel.org
Fixes: 1c1d152cc5ac ("platform/chrome: cros_ec_dev - utilize new cdev_device_add helper function")
Co-developed-by: Sergey Senozhatsky &lt;senozhatsky@chromium.org&gt;
Signed-off-by: Sergey Senozhatsky &lt;senozhatsky@chromium.org&gt;
Signed-off-by: Andrei Kuchynski &lt;akuchynski@chromium.org&gt;
Reviewed-by: Benson Leung &lt;bleung@chromium.org&gt;
Link: https://patch.msgid.link/20260427131721.1165078-1-akuchynski@chromium.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: cros_ec: Don't add cros_ec_ucsi if it is defined in OF or ACPI</title>
<updated>2026-06-17T10:30:48+00:00</updated>
<author>
<name>Jameson Thies</name>
<email>jthies@google.com</email>
</author>
<published>2026-04-03T22:22:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=17f95281839db78be227a6924750dda699f74706'/>
<id>17f95281839db78be227a6924750dda699f74706</id>
<content type='text'>
On devices with a UCSI PPM in the EC, check for cros_ec_ucsi to be
defined in the OF device tree or an ACPI node. If it is defined by
either OF or ACPI, it does not need to be added as a subdevice of
cros_ec_dev mfd. cros_ec_ucsi will load from the OF or ACPI node.

Signed-off-by: Jameson Thies &lt;jthies@google.com&gt;
Reviewed-by: Benson Leung &lt;bleung@chromium.org&gt;
Reviewed-by: Abhishek Pandit-Subedi &lt;abhishekpandit@chromium.org&gt;
Link: https://patch.msgid.link/20260403222253.1888991-2-jthies@google.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On devices with a UCSI PPM in the EC, check for cros_ec_ucsi to be
defined in the OF device tree or an ACPI node. If it is defined by
either OF or ACPI, it does not need to be added as a subdevice of
cros_ec_dev mfd. cros_ec_ucsi will load from the OF or ACPI node.

Signed-off-by: Jameson Thies &lt;jthies@google.com&gt;
Reviewed-by: Benson Leung &lt;bleung@chromium.org&gt;
Reviewed-by: Abhishek Pandit-Subedi &lt;abhishekpandit@chromium.org&gt;
Link: https://patch.msgid.link/20260403222253.1888991-2-jthies@google.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: cros_ec: Separate charge-control probing from USB-PD</title>
<updated>2025-07-24T10:26:54+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-05-21T14:42:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e40fc1160d491c3bcaf8e940ae0dde0a7c5e8e14'/>
<id>e40fc1160d491c3bcaf8e940ae0dde0a7c5e8e14</id>
<content type='text'>
The charge-control subsystem in the ChromeOS EC is not strictly tied to
its USB-PD subsystem.

Since commit 7613bc0d116a ("mfd: cros_ec: Don't load charger with UCSI")
the presence of EC_FEATURE_UCSI_PPM would inhibit the probing of the
charge-control driver.

Furthermore recent versions of the EC firmware in Framework laptops
hard-disable EC_FEATURE_USB_PD to avoid probing cros-usbpd-charger,
which then also breaks cros-charge-control.

Instead use the dedicated EC_FEATURE_CHARGER.

Cc: stable@vger.kernel.org
Link: https://github.com/FrameworkComputer/EmbeddedController/commit/1d7bcf1d50137c8c01969eb65880bc83e424597e
Fixes: 555b5fcdb844 ("mfd: cros_ec: Register charge control subdevice")
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Reviewed-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Tested-by: Tom Vincent &lt;linux@tlvince.com&gt;
Link: https://lore.kernel.org/r/20250521-cros-ec-mfd-chctl-probe-v1-1-6ebfe3a6efa7@weissschuh.net
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The charge-control subsystem in the ChromeOS EC is not strictly tied to
its USB-PD subsystem.

Since commit 7613bc0d116a ("mfd: cros_ec: Don't load charger with UCSI")
the presence of EC_FEATURE_UCSI_PPM would inhibit the probing of the
charge-control driver.

Furthermore recent versions of the EC firmware in Framework laptops
hard-disable EC_FEATURE_USB_PD to avoid probing cros-usbpd-charger,
which then also breaks cros-charge-control.

Instead use the dedicated EC_FEATURE_CHARGER.

Cc: stable@vger.kernel.org
Link: https://github.com/FrameworkComputer/EmbeddedController/commit/1d7bcf1d50137c8c01969eb65880bc83e424597e
Fixes: 555b5fcdb844 ("mfd: cros_ec: Register charge control subdevice")
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Reviewed-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Tested-by: Tom Vincent &lt;linux@tlvince.com&gt;
Link: https://lore.kernel.org/r/20250521-cros-ec-mfd-chctl-probe-v1-1-6ebfe3a6efa7@weissschuh.net
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: Switch back to struct platform_driver::remove()</title>
<updated>2024-11-01T15:56:58+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2024-10-25T10:29:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=10821a061321f1f8ea1f2aadd28c148f8254976a'/>
<id>10821a061321f1f8ea1f2aadd28c148f8254976a</id>
<content type='text'>
After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/mfd to use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

On the way do a few whitespace changes to make indention consistent.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Link: https://lore.kernel.org/r/20241025102943.250184-2-u.kleine-koenig@baylibre.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/mfd to use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

On the way do a few whitespace changes to make indention consistent.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Link: https://lore.kernel.org/r/20241025102943.250184-2-u.kleine-koenig@baylibre.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: cros_ec: Don't load charger with UCSI</title>
<updated>2024-10-16T08:04:09+00:00</updated>
<author>
<name>Abhishek Pandit-Subedi</name>
<email>abhishekpandit@chromium.org</email>
</author>
<published>2024-09-10T10:15:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7613bc0d116ae9ee7fdda88d89057050b5e10b11'/>
<id>7613bc0d116ae9ee7fdda88d89057050b5e10b11</id>
<content type='text'>
When UCSI is enabled, don't load cros_usbpd_charger and cros_usbpd_logger
drivers. Charger functionality is provided by the UCSI driver already and
logging will need to be added.

Signed-off-by: Abhishek Pandit-Subedi &lt;abhishekpandit@chromium.org&gt;
Signed-off-by: Łukasz Bartosik &lt;ukaszb@chromium.org&gt;
Link: https://lore.kernel.org/r/20240910101527.603452-9-ukaszb@chromium.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When UCSI is enabled, don't load cros_usbpd_charger and cros_usbpd_logger
drivers. Charger functionality is provided by the UCSI driver already and
logging will need to be added.

Signed-off-by: Abhishek Pandit-Subedi &lt;abhishekpandit@chromium.org&gt;
Signed-off-by: Łukasz Bartosik &lt;ukaszb@chromium.org&gt;
Link: https://lore.kernel.org/r/20240910101527.603452-9-ukaszb@chromium.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
