Skip to contentSkip to conversation

mfd: sprd: Add SC2730 PMIC to SPI device ID table

PATCH Applied Cixi Geng 2 participants 6 messages Apr 25, 2022 – Apr 27, 2022

Subsystems (2)
lore
Share & tools
lore

Cixi Geng

author
#0 lore raw

PATCH 1/1 mfd: sprd: Add SC2730 PMIC to SPI device ID table

From: Cixi Geng <[email protected]>

Add the SC2730 PMIC support for module autoloading through SPI modalises.

---
 drivers/mfd/sprd-sc27xx-spi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/sprd-sc27xx-spi.c +1 -0
index 55d2c31bdfb2..cf4f89114ae4 100644
@@ -248,6 +248,7 @@ MODULE_DEVICE_TABLE(of, sprd_pmic_match);
 
 static const struct spi_device_id sprd_pmic_spi_ids[] = {
 	{ .name = "sc2731", .driver_data = (unsigned long)&sc2731_data },
+	{ .name = "sc2730", .driver_data = (unsigned long)&sc2730_data },
 	{},
 };
 MODULE_DEVICE_TABLE(spi, sprd_pmic_spi_ids);
Signature · 1 line
2.25.1
#1 lore raw
Quoted 15 lines · Cixi Geng

From: Cixi Geng <[email protected]>

Add the SC2730 PMIC support for module autoloading through SPI modalises.

---
 drivers/mfd/sprd-sc27xx-spi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/sprd-sc27xx-spi.c +0 -0
index 55d2c31bdfb2..cf4f89114ae4 100644

drivers/mfd/sprd-sc27xx-spi.c MODULE_DEVICE_TABLE(of, sprd_pmic_match); · line 251

Quoted 4 lines
drivers/mfd/sprd-sc27xx-spi.c +1 -0
@@ -248,6 +248,7 @@ MODULE_DEVICE_TABLE(of, sprd_pmic_match);
 
 static const struct spi_device_id sprd_pmic_spi_ids[] = {
 	{ .name = "sc2731", .driver_data = (unsigned long)&sc2731_data },
+	{ .name = "sc2730", .driver_data = (unsigned long)&sc2730_data },

Nicer if these were ordered with the smallest number at the top.

Quoted 3 lines
drivers/mfd/sprd-sc27xx-spi.c +0 -0
 	{},
 };
 MODULE_DEVICE_TABLE(spi, sprd_pmic_spi_ids);
Signature · 4 lines
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
author
#2 lore raw
Quoted 19 lines · Lee Jones <[email protected]> 于2022年4月26日周二 22:44写道:
Quoted 16 lines · Cixi Geng

From: Cixi Geng <[email protected]>

Add the SC2730 PMIC support for module autoloading through SPI modalises.

---
 drivers/mfd/sprd-sc27xx-spi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/sprd-sc27xx-spi.c +0 -0
index 55d2c31bdfb2..cf4f89114ae4 100644
@@ -248,6 +248,7 @@ MODULE_DEVICE_TABLE(of, sprd_pmic_match);
 
Quoted 5 lines

drivers/mfd/sprd-sc27xx-spi.c MODULE_DEVICE_TABLE(of, sprd_pmic_match); · line 251

Quoted 3 lines
drivers/mfd/sprd-sc27xx-spi.c +1 -0
 static const struct spi_device_id sprd_pmic_spi_ids[] = {
      { .name = "sc2731", .driver_data = (unsigned long)&sc2731_data },
+     { .name = "sc2730", .driver_data = (unsigned long)&sc2730_data },

Nicer if these were ordered with the smallest number at the top.

I followed the order of struct of_device_id sprd_pmic_match[1],Do I need adjust it as well? [1].https://elixir.bootlin.com/linux/v5.18-rc4/source/drivers/mfd/sprd-sc27xx-spi.c#L242

Quoted 10 lines

drivers/mfd/sprd-sc27xx-spi.c MODULE_DEVICE_TABLE(of, sprd_pmic_match); · line 254

Quoted 4 lines
drivers/mfd/sprd-sc27xx-spi.c +0 -0
      {},
 };
 MODULE_DEVICE_TABLE(spi, sprd_pmic_spi_ids);

--
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services

Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#3 lore raw
Quoted 20 lines · Cixi Geng
Quoted 19 lines · Lee Jones <[email protected]> 于2022年4月26日周二 22:44写道:
Quoted 16 lines · Cixi Geng

From: Cixi Geng <[email protected]>

Add the SC2730 PMIC support for module autoloading through SPI modalises.

---
 drivers/mfd/sprd-sc27xx-spi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/sprd-sc27xx-spi.c +0 -0
index 55d2c31bdfb2..cf4f89114ae4 100644
@@ -248,6 +248,7 @@ MODULE_DEVICE_TABLE(of, sprd_pmic_match);
 
Quoted 8 lines
Quoted 5 lines

drivers/mfd/sprd-sc27xx-spi.c MODULE_DEVICE_TABLE(of, sprd_pmic_match); · line 251

Quoted 3 lines
drivers/mfd/sprd-sc27xx-spi.c +1 -0
 static const struct spi_device_id sprd_pmic_spi_ids[] = {
      { .name = "sc2731", .driver_data = (unsigned long)&sc2731_data },
+     { .name = "sc2730", .driver_data = (unsigned long)&sc2730_data },

Nicer if these were ordered with the smallest number at the top.

I followed the order of struct of_device_id sprd_pmic_match[1],Do I need adjust it as well? [1].https://elixir.bootlin.com/linux/v5.18-rc4/source/drivers/mfd/sprd-sc27xx-spi.c#L242

I've applied this patch for now.

Could you please submit a follow-up changing both?

Signature · 4 lines
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
author
#4 lore raw
Quoted 28 lines · Lee Jones <[email protected]> 于2022年4月27日周三 15:37写道:
Quoted 25 lines · Cixi Geng
Quoted 24 lines · Lee Jones <[email protected]> 于2022年4月26日周二 22:44写道:
Quoted 15 lines · Cixi Geng

From: Cixi Geng <[email protected]>

Add the SC2730 PMIC support for module autoloading through SPI modalises.

---
 drivers/mfd/sprd-sc27xx-spi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/sprd-sc27xx-spi.c +0 -0
index 55d2c31bdfb2..cf4f89114ae4 100644

drivers/mfd/sprd-sc27xx-spi.c MODULE_DEVICE_TABLE(of, sprd_pmic_match); · line 251

Quoted 4 lines
drivers/mfd/sprd-sc27xx-spi.c +1 -0
@@ -248,6 +248,7 @@ MODULE_DEVICE_TABLE(of, sprd_pmic_match);
 
 static const struct spi_device_id sprd_pmic_spi_ids[] = {
      { .name = "sc2731", .driver_data = (unsigned long)&sc2731_data },
+     { .name = "sc2730", .driver_data = (unsigned long)&sc2730_data },

Nicer if these were ordered with the smallest number at the top.

Quoted 7 lines
Quoted 3 lines

I followed the order of struct of_device_id sprd_pmic_match[1],Do I need adjust it as well? [1].https://elixir.bootlin.com/linux/v5.18-rc4/source/drivers/mfd/sprd-sc27xx-spi.c#L242

I've applied this patch for now.

Could you please submit a follow-up changing both?

Thanks, a new patch to change the order send.

Quoted 6 lines

--
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services

Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Applied
#5 lore raw
In reply to Cixi Geng
Quoted 9 lines · Cixi Geng

From: Cixi Geng <[email protected]>

Add the SC2730 PMIC support for module autoloading through SPI modalises.

---
 drivers/mfd/sprd-sc27xx-spi.c | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog