Skip to content

Commit

Permalink
sunxi-6.11: Fix compilation error incompatible pointer type
Browse files Browse the repository at this point in the history
  • Loading branch information
The-going committed Sep 27, 2024
1 parent b66533e commit fccd817
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ new file mode 100644
index 000000000000..113a45408116
--- /dev/null
+++ b/sound/soc/codecs/ac200.c
@@ -0,0 +1,774 @@
@@ -0,0 +1,772 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * X-Powers AC200 Codec Driver
Expand Down Expand Up @@ -810,14 +810,12 @@ index 000000000000..113a45408116
+ return ret;
+}
+
+static int ac200_codec_remove(struct platform_device *pdev)
+static void ac200_codec_remove(struct platform_device *pdev)
+{
+ struct ac200_codec *priv = dev_get_drvdata(&pdev->dev);
+
+ regmap_write(priv->regmap, AC200_SYS_AUDIO_CTL0, 0);
+ regmap_write(priv->regmap, AC200_SYS_AUDIO_CTL1, 0);
+
+ return 0;
+}
+
+static const struct of_device_id ac200_codec_match[] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ new file mode 100644
index 000000000000..a839666c50a5
--- /dev/null
+++ b/drivers/char/dump_reg/dump_reg.c
@@ -0,0 +1,888 @@
@@ -0,0 +1,887 @@
+/*
+ * dump registers sysfs driver
+ *
Expand Down Expand Up @@ -951,7 +951,7 @@ index 000000000000..a839666c50a5
+ return -1;
+}
+
+static int sunxi_dump_reg_remove(struct platform_device *pdev)
+static void sunxi_dump_reg_remove(struct platform_device *pdev)
+{
+ int i;
+
Expand All @@ -960,7 +960,6 @@ index 000000000000..a839666c50a5
+ }
+
+ class_destroy(dump_class);
+ return 0;
+}
+
+static struct platform_driver sunxi_dump_reg_driver = {
Expand Down Expand Up @@ -1368,7 +1367,7 @@ new file mode 100644
index 000000000000..a5b4e6c0b578
--- /dev/null
+++ b/drivers/char/sunxi-sysinfo/sunxi-sysinfo.c
@@ -0,0 +1,177 @@
@@ -0,0 +1,175 @@
+/*
+ * Based on drivers/char/sunxi-sysinfo/sunxi-sysinfo.c
+ *
Expand Down Expand Up @@ -1524,12 +1523,10 @@ index 000000000000..a5b4e6c0b578
+ return ret;
+}
+
+static int sunxi_info_remove(struct platform_device *pdev)
+static void sunxi_info_remove(struct platform_device *pdev)
+{
+ misc_deregister(&soc_info_device);
+ class_unregister(&info_class);
+
+ return 0;
+}
+
+static struct platform_driver sunxi_info_driver = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ new file mode 100644
index 000000000000..f4f2dcecbb48
--- /dev/null
+++ b/drivers/misc/sunxi-addr/sunxi-addr.c
@@ -0,0 +1,357 @@
@@ -0,0 +1,356 @@
+/*
+ * The driver of SUNXI NET MAC ADDR Manager.
+ *
Expand Down Expand Up @@ -584,10 +584,9 @@ index 000000000000..f4f2dcecbb48
+ return 0;
+}
+
+static int addr_mgt_remove(struct platform_device *pdev)
+static void addr_mgt_remove(struct platform_device *pdev)
+{
+ class_unregister(&addr_class);
+ return 0;
+}
+
+static struct platform_driver addr_mgt_driver = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ new file mode 100644
index 000000000000..1af735ce8e4d
--- /dev/null
+++ b/drivers/leds/rgb/leds-ws2812.c
@@ -0,0 +1,229 @@
@@ -0,0 +1,227 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2023, The Linux Foundation. All rights reserved.
Expand Down Expand Up @@ -241,12 +241,10 @@ index 000000000000..1af735ce8e4d
+ return 0;
+}
+
+static int ws2812_remove(struct platform_device *pdev)
+static void ws2812_remove(struct platform_device *pdev)
+{
+ misc_deregister(&ws2812_misc_dev);
+ gpio_free(ws2812_pin);
+
+ return 0;
+}
+
+static const struct of_device_id ws2812_of_match[] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Date: Thu, 9 May 2024 20:59:34 -0700
Subject: Sound for H616, H618 Allwinner SOCs

Signed-off-by: Stephen Graf <[email protected]>
Signed-off-by: The-going <[email protected]>

---
.../allwinner/sun50i-h616-orangepi-zero.dtsi | 18 +
.../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 75 +-
Expand All @@ -14,13 +16,13 @@ Signed-off-by: Stephen Graf <[email protected]>
sound/soc/soc-core.c | 25 +
sound/soc/sunxi/Kconfig | 8 +
sound/soc/sunxi/Makefile | 1 +
sound/soc/sunxi/sun50iw9-codec.c | 1093 ++++++++++++
sound/soc/sunxi/sun50iw9-codec.c | 1091 ++++++++++++
sound/soc/sunxi_v2/Kconfig | 48 +
sound/soc/sunxi_v2/Makefile | 11 +
sound/soc/sunxi_v2/drv_hdmi.h | 63 +
sound/soc/sunxi_v2/snd_sunxi_ahub.c | 1477 +++++++++++++++++
sound/soc/sunxi_v2/snd_sunxi_ahub.c | 1475 +++++++++++++++++
sound/soc/sunxi_v2/snd_sunxi_ahub.h | 67 +
sound/soc/sunxi_v2/snd_sunxi_ahub_dam.c | 534 ++++++
sound/soc/sunxi_v2/snd_sunxi_ahub_dam.c | 532 ++++++
sound/soc/sunxi_v2/snd_sunxi_ahub_dam.h | 291 ++++
sound/soc/sunxi_v2/snd_sunxi_common.c | 267 +++
sound/soc/sunxi_v2/snd_sunxi_common.h | 67 +
Expand All @@ -29,7 +31,7 @@ Signed-off-by: Stephen Graf <[email protected]>
sound/soc/sunxi_v2/snd_sunxi_mach.h | 17 +
sound/soc/sunxi_v2/snd_sunxi_mach_utils.c | 422 +++++
sound/soc/sunxi_v2/snd_sunxi_mach_utils.h | 116 ++
24 files changed, 5138 insertions(+), 18 deletions(-)
24 files changed, 5132 insertions(+), 18 deletions(-)
create mode 100644 sound/soc/sunxi/sun50iw9-codec.c
create mode 100644 sound/soc/sunxi_v2/Kconfig
create mode 100644 sound/soc/sunxi_v2/Makefile
Expand Down Expand Up @@ -368,10 +370,10 @@ index 7d1a70bcf73e..7a10ad229006 100644
obj-$(CONFIG_SND_SUN8I_ADDA_PR_REGMAP) += sun8i-adda-pr-regmap.o
diff --git a/sound/soc/sunxi/sun50iw9-codec.c b/sound/soc/sunxi/sun50iw9-codec.c
new file mode 100644
index 000000000000..38b1d3824c20
index 000000000000..a9dfc1a031e4
--- /dev/null
+++ b/sound/soc/sunxi/sun50iw9-codec.c
@@ -0,0 +1,1093 @@
@@ -0,0 +1,1091 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2014 Emilio López <[email protected]>
Expand Down Expand Up @@ -1435,7 +1437,7 @@ index 000000000000..38b1d3824c20
+ return ret;
+}
+
+static int sun50i_h616_codec_remove(struct platform_device *pdev)
+static void sun50i_h616_codec_remove(struct platform_device *pdev)
+{
+ struct snd_soc_card *card = platform_get_drvdata(pdev);
+ struct sun50i_h616_codec *scodec = snd_soc_card_get_drvdata(card);
Expand All @@ -1444,8 +1446,6 @@ index 000000000000..38b1d3824c20
+ if (scodec->rst)
+ reset_control_assert(scodec->rst);
+ clk_disable_unprepare(scodec->clk_apb);
+
+ return 0;
+}
+
+static struct platform_driver sun50i_h616_codec_driver = {
Expand Down Expand Up @@ -1607,10 +1607,10 @@ index 000000000000..2e05489b01e1
+#endif
diff --git a/sound/soc/sunxi_v2/snd_sunxi_ahub.c b/sound/soc/sunxi_v2/snd_sunxi_ahub.c
new file mode 100644
index 000000000000..8a1065e9183e
index 000000000000..6d4a847a928f
--- /dev/null
+++ b/sound/soc/sunxi_v2/snd_sunxi_ahub.c
@@ -0,0 +1,1477 @@
@@ -0,0 +1,1475 @@
+/*
+ * sound\soc\sunxi\snd_sunxi_ahub.c
+ * (C) Copyright 2021-2025
Expand Down Expand Up @@ -3021,7 +3021,7 @@ index 000000000000..8a1065e9183e
+ return ret;
+}
+
+static int sunxi_ahub_dev_remove(struct platform_device *pdev)
+static void sunxi_ahub_dev_remove(struct platform_device *pdev)
+{
+ struct sunxi_ahub_info *ahub_info = dev_get_drvdata(&pdev->dev);
+ struct sunxi_ahub_pinctl_info *pin_info = &ahub_info->pin_info;
Expand All @@ -3044,8 +3044,6 @@ index 000000000000..8a1065e9183e
+ devm_kfree(&pdev->dev, ahub_info);
+
+ SND_LOG_DEBUG(HLOG, "unregister ahub platform success\n");
+
+ return 0;
+}
+
+static const struct of_device_id sunxi_ahub_of_match[] = {
Expand Down Expand Up @@ -3163,10 +3161,10 @@ index 000000000000..b3c1cc592844
+#endif /* __SND_SUNXI_AHUB_H */
diff --git a/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.c b/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.c
new file mode 100644
index 000000000000..1fcc8aefd50c
index 000000000000..f3c7bb3c7cd2
--- /dev/null
+++ b/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.c
@@ -0,0 +1,534 @@
@@ -0,0 +1,532 @@
+/*
+ * sound\soc\sunxi\snd_sunxi_ahub_dam.c
+ * (C) Copyright 2021-2025
Expand Down Expand Up @@ -3633,7 +3631,7 @@ index 000000000000..1fcc8aefd50c
+ return ret;
+}
+
+static int sunxi_ahub_dam_dev_remove(struct platform_device *pdev)
+static void sunxi_ahub_dam_dev_remove(struct platform_device *pdev)
+{
+ struct sunxi_ahub_mem_info *mem_info = &g_mem_info;
+ struct sunxi_ahub_clk_info *clk_info = &g_clk_info;
Expand All @@ -3657,8 +3655,6 @@ index 000000000000..1fcc8aefd50c
+ reset_control_assert(clk_info->clk_rst);
+
+ SND_LOG_DEBUG(HLOG, "unregister ahub_dam platform success\n");
+
+ return 0;
+}
+
+static const struct of_device_id sunxi_ahub_dam_of_match[] = {
Expand Down Expand Up @@ -4383,7 +4379,7 @@ index 000000000000..89ad9fe71936
+#endif /* __SND_SUNXI_LOG_H */
diff --git a/sound/soc/sunxi_v2/snd_sunxi_mach.c b/sound/soc/sunxi_v2/snd_sunxi_mach.c
new file mode 100644
index 000000000000..27449ad6b843
index 000000000000..ea73eced251e
--- /dev/null
+++ b/sound/soc/sunxi_v2/snd_sunxi_mach.c
@@ -0,0 +1,479 @@
Expand Down Expand Up @@ -4819,11 +4815,11 @@ index 000000000000..27449ad6b843
+ return ret;
+}
+
+static int asoc_simple_remove(struct platform_device *pdev)
+static void asoc_simple_remove(struct platform_device *pdev)
+{
+ struct snd_soc_card *card = platform_get_drvdata(pdev);
+
+ return asoc_simple_clean_reference(card);
+ asoc_simple_clean_reference(card);
+}
+
+static const struct of_device_id snd_soc_sunxi_of_match[] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ Subject: driver: allwinner h618 emac
drivers/gpio/gpiolib-of.c | 29 +-
drivers/mfd/Kconfig | 10 +
drivers/mfd/Makefile | 1 +
drivers/mfd/sunxi-ac200.c | 288 +++
drivers/mfd/sunxi-ac200.c | 289 +++
drivers/net/ethernet/allwinner/Kconfig | 8 +
drivers/net/ethernet/allwinner/Makefile | 2 +
drivers/net/ethernet/allwinner/sunxi-gmac.c | 2219 +++++++++++++++++
drivers/net/ethernet/allwinner/sunxi-gmac.c | 2217 +++++++++++++++++
drivers/net/ethernet/allwinner/sunxi-gmac.h | 270 ++
.../net/ethernet/allwinner/sunxi_gmac_ops.c | 768 ++++++
drivers/net/phy/Kconfig | 8 +
drivers/net/phy/Makefile | 1 +
drivers/net/phy/sunxi-ephy.c | 518 ++++
drivers/net/phy/sunxi-ephy.c | 516 ++++
include/linux/mfd/ac200.h | 213 ++
include/linux/of_gpio.h | 18 +
14 files changed, 4338 insertions(+), 15 deletions(-)
14 files changed, 4335 insertions(+), 15 deletions(-)
create mode 100644 drivers/mfd/sunxi-ac200.c
create mode 100644 drivers/net/ethernet/allwinner/sunxi-gmac.c
create mode 100644 drivers/net/ethernet/allwinner/sunxi-gmac.h
Expand Down Expand Up @@ -108,10 +108,10 @@ index b2e864d702c4..ed61bddea637 100644
obj-$(CONFIG_MFD_AXP20X_RSB) += axp20x-rsb.o
diff --git a/drivers/mfd/sunxi-ac200.c b/drivers/mfd/sunxi-ac200.c
new file mode 100644
index 000000000000..7c5b0e0523cf
index 000000000000..75c032ce147f
--- /dev/null
+++ b/drivers/mfd/sunxi-ac200.c
@@ -0,0 +1,288 @@
@@ -0,0 +1,289 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * MFD core driver for X-Powers' AC200 IC
Expand Down Expand Up @@ -333,9 +333,10 @@ index 000000000000..7c5b0e0523cf
+ struct ac200_dev *ac200 = i2c_get_clientdata(i2c);
+
+ regmap_write(ac200->regmap, AC200_SYS_CONTROL, 0);
+
+ mfd_remove_devices(&i2c->dev);
+}static void ac200_i2c_shutdown(struct i2c_client *i2c)
+}
+
+static void ac200_i2c_shutdown(struct i2c_client *i2c)
+{
+ struct ac200_dev *ac200 = i2c_get_clientdata(i2c);
+
Expand Down Expand Up @@ -392,7 +393,7 @@ index 000000000000..7c5b0e0523cf
+ },
+ .probe = ac200_i2c_probe,
+ .remove = ac200_i2c_remove,
+ .shutdown = ac200_i2c_shutdown,
+ .shutdown = ac200_i2c_shutdown,
+ .id_table = ac200_ids,
+};
+module_i2c_driver(ac200_i2c_driver);
Expand Down Expand Up @@ -429,10 +430,10 @@ index ddd5a5079e8a..56b9c434a5b8 100644
+obj-$(CONFIG_SUNXI_GMAC) += sunxi_gmac.o
diff --git a/drivers/net/ethernet/allwinner/sunxi-gmac.c b/drivers/net/ethernet/allwinner/sunxi-gmac.c
new file mode 100644
index 000000000000..30efda8038f2
index 000000000000..249cee0607e3
--- /dev/null
+++ b/drivers/net/ethernet/allwinner/sunxi-gmac.c
@@ -0,0 +1,2219 @@
@@ -0,0 +1,2217 @@
+/*
+ * linux/drivers/net/ethernet/allwinner/sunxi_gmac.c
+ *
Expand Down Expand Up @@ -2598,7 +2599,7 @@ index 000000000000..30efda8038f2
+ return ret;
+}
+
+static int geth_remove(struct platform_device *pdev)
+static void geth_remove(struct platform_device *pdev)
+{
+ struct net_device *ndev = platform_get_drvdata(pdev);
+ struct geth_priv *priv = netdev_priv(ndev);
Expand All @@ -2612,8 +2613,6 @@ index 000000000000..30efda8038f2
+ geth_hw_release(pdev);
+ platform_set_drvdata(pdev, NULL);
+ free_netdev(ndev);
+
+ return 0;
+}
+
+static const struct of_device_id geth_of_match[] = {
Expand Down Expand Up @@ -3735,10 +3734,10 @@ index 4e3f7981a5e9..d004e4c79083 100644
obj-$(CONFIG_AIR_EN8811H_PHY) += air_en8811h.o
diff --git a/drivers/net/phy/sunxi-ephy.c b/drivers/net/phy/sunxi-ephy.c
new file mode 100644
index 000000000000..92f5ba101ced
index 000000000000..44eb2790ea62
--- /dev/null
+++ b/drivers/net/phy/sunxi-ephy.c
@@ -0,0 +1,518 @@
@@ -0,0 +1,516 @@
+/*
+ * Copyright © 2015-2016, Shuge
+ * Author: Sugar <[email protected]>
Expand Down Expand Up @@ -4172,11 +4171,9 @@ index 000000000000..92f5ba101ced
+ return 0;
+}
+
+static int ac200_ephy_remove(struct platform_device *pdev)
+static void ac200_ephy_remove(struct platform_device *pdev)
+{
+ ac200_ephy_disable(&ac200_ephy);
+
+ return 0;
+}
+
+static int ac200_ephy_suspend(struct device *dev)
Expand Down
Loading

0 comments on commit fccd817

Please sign in to comment.