Re: [PATCH 03/14] mfd: remove unused si476x driver
From: Arnd Bergmann
Date: Mon Nov 30 2026 - 16:48:31 EST
On Mon, Nov 30, 2026, at 14:28, TriplEight wrote:
> From: Denis Pisarev<pisarevden@xxxxxxxxx>
>
> On Wed, Sep 09, 2026 at 03:21:40PM +0200, Arnd Bergmann wrote:
>> The si476x driver was added in linux-3.9 without devicetree
>> support, and has always failed the probe function in the
>> absence of a si476x_platform_data definition.
>
> I tried to disprove this and could not for mainline, but I found an
> out-of-tree user that I think should be on Cc before this goes in.
>
> Mainline: on mfd/for-mfd-next (5a9a62afea20) si476x_core_probe()
> still returns -EINVAL when dev_get_platdata() is NULL. There is no
> of_match_table or fwnode parsing. A DT node with compatible "si4761"
> would still bind through the i2c_device_id fallback, but probe then
> fails on the missing platform data. No board file, .dts or defconfig
> in the tree instantiates the device.
>
> Out of tree: NXP's BSP kernel still ships it on the i.MX6 SABRE Auto
> board, in both lf-6.12.y and lf-6.18.y of github.com/nxp-imx/linux-imx:
>
> - drivers/mfd/si476x-i2c.c is patched to log "Using default platform
> data." and fill in defaults instead of returning -EINVAL, and to
> set of_compatible = "si476x-codec" on the codec cell;
> - imx6qdl-sabreauto.dtsi has si4763@63 (compatible = "si4761") with
> a si476x-codec child, and a sound-fm node using
> "fsl,imx-audio-si476x";
> - imx_v7_defconfig has CONFIG_MFD_SI476X_CORE=y and
> CONFIG_RADIO_SI476X=y.
Thanks for taking a closer look at this!
I suspect that the patches to use this driver have been forward-ported
for many years without actually being tested.
The oldest branch I could find in the imx git tree that references
this driver is imx_3.10.53_1.1.0_ga_caf and it has the exact same bug
of requiring but failing to define the platform data.
Obviously if someone is actually using this driver, we can fix it
using whatever patches they have, but it does seem quite unlikely.
> The fsl-asoc-card support that this patch removes was added for that
> board (77f1ff751037, "The si476x codec is used for FM radio function
> on i.MX6 auto board"). Shengjiu, does NXP still need FM radio on SABRE
> Auto, and would you upstream the DT support? If not, I see no
> technical reason to keep the driver in mainline, and NXP would carry
> it downstream.
>
> Two small things for the next revision:
>
> - Documentation/.renames.txt still has
> "media/v4l-drivers/si476x admin-guide/media/si476x". With the .rst
> gone, tools/docs/gen-redirects.py warns "target does not exist" on
> every docs build. a3fb9a5bf660 (smc91c92 removal) deleted its line
> in the same commit.
ok, fixed
> - fsl,imx-audio-si476x remains in
> Documentation/devicetree/bindings/sound/fsl-asoc-card.yaml (the
> sashiko report). No in-tree .dts uses it, but the NXP BSP does.
> Do you want to drop it in this patch or in a follow-up, depending
> on the answer above?
Not sure, I tend to leave those untouched normally but I suspect this
also trips up scripts that check for removed users of bindings.
> The patch no longer applies to for-mfd-next because of f06fa446a04c
> ("mfd: si476x-i2c: Cancel RDS drainer work before freeing RDS FIFO")
> and mainline changes since v7.3-rc2. The only conflicts are
> modify/delete in radio-si476x.c, si476x-i2c.c, si476x-core.h and
> sound/soc/codecs/si476x.c, and deleting the files resolves them.
>
> The driver keeps getting fixes while this is pending, which will also
> cause cross-tree conflicts:
>
> - broonie/sound for-7.5 has 7b2c273dbadf ("ASoC: codecs: si476x:
> Handle hw_params return value"). git merge-tree of the rebased
> removal with sound/for-7.5 (0dc77105b79d) gives one modify/delete
> conflict in sound/soc/codecs/si476x.c; fsl-asoc-card.c merges
> cleanly.
> - Uwe's "mfd: Use named initializers for arrays of *_device_data" v5
> and Jiale Yao's "mfd: si476x: queue polling work on freezable
> workqueue" (no reply yet) both touch si476x-i2c.c.
> - The docs/zh_CN media translation series (v4) adds "si476x" to its
> driver todo list.
Those are usually no problem.
Arnd