* [PATCH] mfd: sprd: Add SPI device ID table
@ 2021-09-22 15:08 Mark Brown
2021-09-22 16:16 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2021-09-22 15:08 UTC (permalink / raw)
To: Lee Jones, Orson Zhai, Baolin Wang, Chunyan Zhang
Cc: linux-kernel, Mark Brown
Currently autoloading for SPI devices does not use the DT ID table, it uses
SPI modalises. Supporting OF modalises is going to be difficult if not
impractical, an attempt was made but has been reverted, so ensure that
module autoloading works for this driver by adding a SPI device ID table.
Fixes: 96c8395e2166 ("spi: Revert modalias changes")
Signed-off-by: Mark Brown <broonie@kernel.org>
---
drivers/mfd/sprd-sc27xx-spi.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c
index 6b7956604a0f..8b3ed5a0a524 100644
--- a/drivers/mfd/sprd-sc27xx-spi.c
+++ b/drivers/mfd/sprd-sc27xx-spi.c
@@ -230,6 +230,12 @@ static int sprd_pmic_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(sprd_pmic_pm_ops, sprd_pmic_suspend, sprd_pmic_resume);
+static const struct spi_device_id sprd_pmic_spi_ids[] = {
+ { .name = "sc2371", .driver_data = (unsigned long)&sc2731_data },
+ {},
+};
+MODULE_DEVICE_TABLE(spi, sprd_pmic_spi_ids);
+
static const struct of_device_id sprd_pmic_match[] = {
{ .compatible = "sprd,sc2731", .data = &sc2731_data },
{},
@@ -243,6 +249,7 @@ static struct spi_driver sprd_pmic_driver = {
.pm = &sprd_pmic_pm_ops,
},
.probe = sprd_pmic_probe,
+ .id_table = sprd_pmic_spi_ids,
};
static int __init sprd_pmic_init(void)
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] mfd: sprd: Add SPI device ID table
2021-09-22 15:08 [PATCH] mfd: sprd: Add SPI device ID table Mark Brown
@ 2021-09-22 16:16 ` Mark Brown
2021-09-22 18:23 ` Lee Jones
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2021-09-22 16:16 UTC (permalink / raw)
To: Lee Jones, Orson Zhai, Baolin Wang, Chunyan Zhang; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 475 bytes --]
On Wed, Sep 22, 2021 at 04:08:12PM +0100, Mark Brown wrote:
> Currently autoloading for SPI devices does not use the DT ID table, it uses
> SPI modalises. Supporting OF modalises is going to be difficult if not
> impractical, an attempt was made but has been reverted, so ensure that
> module autoloading works for this driver by adding a SPI device ID table.
Hang on, there's a typo and I found a bunch more MFDs that need updates
- I'll resend as part of a bigger series.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mfd: sprd: Add SPI device ID table
2021-09-22 16:16 ` Mark Brown
@ 2021-09-22 18:23 ` Lee Jones
0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2021-09-22 18:23 UTC (permalink / raw)
To: Mark Brown; +Cc: Orson Zhai, Baolin Wang, Chunyan Zhang, linux-kernel
On Wed, 22 Sep 2021, Mark Brown wrote:
> On Wed, Sep 22, 2021 at 04:08:12PM +0100, Mark Brown wrote:
> > Currently autoloading for SPI devices does not use the DT ID table, it uses
> > SPI modalises. Supporting OF modalises is going to be difficult if not
> > impractical, an attempt was made but has been reverted, so ensure that
> > module autoloading works for this driver by adding a SPI device ID table.
>
> Hang on, there's a typo and I found a bunch more MFDs that need updates
> - I'll resend as part of a bigger series.
Fine. Dropped.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mfd: sprd: Add SPI device ID table
2022-02-02 14:43 Mark Brown
2022-02-02 22:19 ` kernel test robot
@ 2022-02-14 13:32 ` Lee Jones
1 sibling, 0 replies; 6+ messages in thread
From: Lee Jones @ 2022-02-14 13:32 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel, Orson Zhai, Baolin Wang, Chunyan Zhang
On Wed, 02 Feb 2022, Mark Brown wrote:
> Currently autoloading for SPI devices does not use the DT ID table, it uses
> SPI modalises. Supporting OF modalises is going to be difficult if not
> impractical, an attempt was made but has been reverted, so ensure that
> module autoloading works for this driver by adding a SPI device ID table.
>
> Fixes: 96c8395e2166 ("spi: Revert modalias changes")
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Cc: Orson Zhai <orsonzhai@gmail.com>
> Cc: Baolin Wang <baolin.wang7@gmail.com>
> Cc: Chunyan Zhang <zhang.lyra@gmail.com>
> ---
>
> Rebased onto v5.17-rc1.
>
> drivers/mfd/sprd-sc27xx-spi.c | 6 ++++++
> 1 file changed, 6 insertions(+)
Applied, thanks.
--
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mfd: sprd: Add SPI device ID table
2022-02-02 14:43 Mark Brown
@ 2022-02-02 22:19 ` kernel test robot
2022-02-14 13:32 ` Lee Jones
1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-02-02 22:19 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2756 bytes --]
Hi Mark,
I love your patch! Yet something to improve:
[auto build test ERROR on lee-mfd/for-mfd-next]
[also build test ERROR on linux/master linus/master v5.17-rc2 next-20220202]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Mark-Brown/mfd-sprd-Add-SPI-device-ID-table/20220202-225306
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20220203/202202030612.SNF98yc5-lkp(a)intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/58e9e172a84cdd6af58985e7393703b5c2d23967
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mark-Brown/mfd-sprd-Add-SPI-device-ID-table/20220202-225306
git checkout 58e9e172a84cdd6af58985e7393703b5c2d23967
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/mfd/sprd-sc27xx-spi.c:255:35: error: redefinition of 'sprd_pmic_spi_ids'
255 | static const struct spi_device_id sprd_pmic_spi_ids[] = {
| ^~~~~~~~~~~~~~~~~
drivers/mfd/sprd-sc27xx-spi.c:242:35: note: previous definition of 'sprd_pmic_spi_ids' with type 'const struct spi_device_id[2]'
242 | static const struct spi_device_id sprd_pmic_spi_ids[] = {
| ^~~~~~~~~~~~~~~~~
vim +/sprd_pmic_spi_ids +255 drivers/mfd/sprd-sc27xx-spi.c
25ca4ae43466a4 Baolin Wang 2017-11-01 254
c5c7f067710705 Mark Brown 2021-09-24 @255 static const struct spi_device_id sprd_pmic_spi_ids[] = {
c5c7f067710705 Mark Brown 2021-09-24 256 { .name = "sc2731", .driver_data = (unsigned long)&sc2731_data },
c5c7f067710705 Mark Brown 2021-09-24 257 {},
c5c7f067710705 Mark Brown 2021-09-24 258 };
c5c7f067710705 Mark Brown 2021-09-24 259 MODULE_DEVICE_TABLE(spi, sprd_pmic_spi_ids);
c5c7f067710705 Mark Brown 2021-09-24 260
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] mfd: sprd: Add SPI device ID table
@ 2022-02-02 14:43 Mark Brown
2022-02-02 22:19 ` kernel test robot
2022-02-14 13:32 ` Lee Jones
0 siblings, 2 replies; 6+ messages in thread
From: Mark Brown @ 2022-02-02 14:43 UTC (permalink / raw)
To: Lee Jones
Cc: linux-kernel, Mark Brown, Orson Zhai, Baolin Wang, Chunyan Zhang
Currently autoloading for SPI devices does not use the DT ID table, it uses
SPI modalises. Supporting OF modalises is going to be difficult if not
impractical, an attempt was made but has been reverted, so ensure that
module autoloading works for this driver by adding a SPI device ID table.
Fixes: 96c8395e2166 ("spi: Revert modalias changes")
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: Orson Zhai <orsonzhai@gmail.com>
Cc: Baolin Wang <baolin.wang7@gmail.com>
Cc: Chunyan Zhang <zhang.lyra@gmail.com>
---
Rebased onto v5.17-rc1.
drivers/mfd/sprd-sc27xx-spi.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c
index 55d2c31bdfb2..864031eccd4c 100644
--- a/drivers/mfd/sprd-sc27xx-spi.c
+++ b/drivers/mfd/sprd-sc27xx-spi.c
@@ -239,6 +239,12 @@ static int sprd_pmic_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(sprd_pmic_pm_ops, sprd_pmic_suspend, sprd_pmic_resume);
+static const struct spi_device_id sprd_pmic_spi_ids[] = {
+ { .name = "sc2731", .driver_data = (unsigned long)&sc2731_data },
+ {},
+};
+MODULE_DEVICE_TABLE(spi, sprd_pmic_spi_ids);
+
static const struct of_device_id sprd_pmic_match[] = {
{ .compatible = "sprd,sc2731", .data = &sc2731_data },
{ .compatible = "sprd,sc2730", .data = &sc2730_data },
--
2.30.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-02-14 13:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22 15:08 [PATCH] mfd: sprd: Add SPI device ID table Mark Brown
2021-09-22 16:16 ` Mark Brown
2021-09-22 18:23 ` Lee Jones
2022-02-02 14:43 Mark Brown
2022-02-02 22:19 ` kernel test robot
2022-02-14 13:32 ` Lee Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.