* RE: [PATCH] spi: Remove explictly set bus_num and num_chipselect to default setting
[not found] <~B52fa2f760000.52fb9e020000.000d.mml.120010381@phoenix>
@ 2014-02-12 16:21 ` Stephen Warren
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Warren @ 2014-02-12 16:21 UTC (permalink / raw)
To: Axel Lin, Mark Brown
Cc: Chris Boot, Uwe Kleine-König, Thomas Langer, David Daney,
Kuninori Morimoto, Laxman Dewangan, Sourav Poddar,
linux-spi-u79uwXL29TY76Z2rM5mHXA
Axel Lin wrote at Tuesday, February 11, 2014 7:10 AM:
> The purpose of commit 1e8a52e18cfb
> "spi: By default setup spi_masters with 1 chipselect and dynamics bus number"
> is to avoid setting default value for bus_num and num_chipselect in spi master
> drivers. So let's remove the duplicate code.
Tegra drivers,
Acked-by: Stephen Warren <swarren@nvidia.com>
--
nvpublic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] spi: Remove explictly set bus_num and num_chipselect to default setting
2014-02-11 14:10 Axel Lin
2014-02-11 15:21 ` Uwe Kleine-König
2014-02-11 18:28 ` David Daney
@ 2014-02-16 1:51 ` Mark Brown
2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-02-16 1:51 UTC (permalink / raw)
To: Axel Lin
Cc: Chris Boot, Uwe Kleine-König, Thomas Langer, David Daney,
Kuninori Morimoto, Laxman Dewangan, Stephen Warren,
Sourav Poddar, linux-spi-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 321 bytes --]
On Tue, Feb 11, 2014 at 10:10:19PM +0800, Axel Lin wrote:
> The purpose of commit 1e8a52e18cfb
> "spi: By default setup spi_masters with 1 chipselect and dynamics bus number"
> is to avoid setting default value for bus_num and num_chipselect in spi master
> drivers. So let's remove the duplicate code.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] spi: Remove explictly set bus_num and num_chipselect to default setting
2014-02-11 14:10 Axel Lin
2014-02-11 15:21 ` Uwe Kleine-König
@ 2014-02-11 18:28 ` David Daney
2014-02-16 1:51 ` Mark Brown
2 siblings, 0 replies; 5+ messages in thread
From: David Daney @ 2014-02-11 18:28 UTC (permalink / raw)
To: Axel Lin
Cc: Mark Brown, Chris Boot, Uwe Kleine-König, Thomas Langer,
David Daney, Kuninori Morimoto, Laxman Dewangan, Stephen Warren,
Sourav Poddar, linux-spi-u79uwXL29TY76Z2rM5mHXA
On 02/11/2014 06:10 AM, Axel Lin wrote:
> The purpose of commit 1e8a52e18cfb
> "spi: By default setup spi_masters with 1 chipselect and dynamics bus number"
> is to avoid setting default value for bus_num and num_chipselect in spi master
> drivers. So let's remove the duplicate code.
It seems good to me, so ...
>
> Cc: Chris Boot <bootc-1Slo4GeK4H1eoWH0uzbU5w@public.gmane.org>
> Cc: Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Cc: Thomas Langer <thomas.langer-th3ZBGNqt+7QT0dZR+AlfA@public.gmane.org>
> Cc: David Daney <david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> Cc: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Cc: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Cc: Sourav Poddar <sourav.poddar-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
> ---
> drivers/spi/spi-bcm2835.c | 1 -
> drivers/spi/spi-efm32.c | 4 ----
> drivers/spi/spi-falcon.c | 2 --
> drivers/spi/spi-octeon.c | 2 --
> drivers/spi/spi-sh-hspi.c | 1 -
> drivers/spi/spi-tegra114.c | 1 -
> drivers/spi/spi-tegra20-sflash.c | 1 -
> drivers/spi/spi-tegra20-slink.c | 1 -
> drivers/spi/spi-ti-qspi.c | 1 -
> 9 files changed, 14 deletions(-)
>
[...]
> diff --git a/drivers/spi/spi-octeon.c b/drivers/spi/spi-octeon.c
> index cf88974..a4805f2 100644
> --- a/drivers/spi/spi-octeon.c
> +++ b/drivers/spi/spi-octeon.c
> @@ -257,8 +257,6 @@ static int octeon_spi_probe(struct platform_device *pdev)
> p->register_base = (u64)devm_ioremap(&pdev->dev, res_mem->start,
> resource_size(res_mem));
>
> - /* Dynamic bus numbering */
> - master->bus_num = -1;
> master->num_chipselect = 4;
> master->mode_bits = SPI_CPHA |
> SPI_CPOL |
... this bit:
Acked-By: David Daney <david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] spi: Remove explictly set bus_num and num_chipselect to default setting
2014-02-11 14:10 Axel Lin
@ 2014-02-11 15:21 ` Uwe Kleine-König
2014-02-11 18:28 ` David Daney
2014-02-16 1:51 ` Mark Brown
2 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2014-02-11 15:21 UTC (permalink / raw)
To: Axel Lin
Cc: Mark Brown, Chris Boot, Thomas Langer, David Daney,
Kuninori Morimoto, Laxman Dewangan, Stephen Warren,
Sourav Poddar, linux-spi-u79uwXL29TY76Z2rM5mHXA
On Tue, Feb 11, 2014 at 10:10:19PM +0800, Axel Lin wrote:
> The purpose of commit 1e8a52e18cfb
> "spi: By default setup spi_masters with 1 chipselect and dynamics bus number"
> is to avoid setting default value for bus_num and num_chipselect in spi master
> drivers. So let's remove the duplicate code.
>
> Cc: Chris Boot <bootc-1Slo4GeK4H1eoWH0uzbU5w@public.gmane.org>
> Cc: Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Cc: Thomas Langer <thomas.langer-th3ZBGNqt+7QT0dZR+AlfA@public.gmane.org>
> Cc: David Daney <david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> Cc: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Cc: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Cc: Sourav Poddar <sourav.poddar-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
> drivers/spi/spi-bcm2835.c | 1 -
> drivers/spi/spi-efm32.c | 4 ----
> drivers/spi/spi-falcon.c | 2 --
> drivers/spi/spi-octeon.c | 2 --
> drivers/spi/spi-sh-hspi.c | 1 -
> drivers/spi/spi-tegra114.c | 1 -
> drivers/spi/spi-tegra20-sflash.c | 1 -
> drivers/spi/spi-tegra20-slink.c | 1 -
> drivers/spi/spi-ti-qspi.c | 1 -
> 9 files changed, 14 deletions(-)
>
> diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c
> index 8a89dd1..6916745 100644
> --- a/drivers/spi/spi-bcm2835.c
> +++ b/drivers/spi/spi-bcm2835.c
> @@ -315,7 +315,6 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
>
> master->mode_bits = BCM2835_SPI_MODE_BITS;
> master->bits_per_word_mask = SPI_BPW_MASK(8);
> - master->bus_num = -1;
> master->num_chipselect = 3;
> master->transfer_one_message = bcm2835_spi_transfer_one;
> master->dev.of_node = pdev->dev.of_node;
> diff --git a/drivers/spi/spi-efm32.c b/drivers/spi/spi-efm32.c
> index 03cbb5e..f53bbea 100644
> --- a/drivers/spi/spi-efm32.c
> +++ b/drivers/spi/spi-efm32.c
> @@ -308,10 +308,6 @@ static int efm32_spi_probe_dt(struct platform_device *pdev,
> }
>
> ddata->pdata.location = location;
> -
> - /* spi core takes care about the bus number using an alias */
> - master->bus_num = -1;
> -
> return 0;
> }
>
> diff --git a/drivers/spi/spi-falcon.c b/drivers/spi/spi-falcon.c
> index 0ae7f45..09965f0 100644
> --- a/drivers/spi/spi-falcon.c
> +++ b/drivers/spi/spi-falcon.c
> @@ -419,9 +419,7 @@ static int falcon_sflash_probe(struct platform_device *pdev)
> priv->master = master;
>
> master->mode_bits = SPI_MODE_3;
> - master->num_chipselect = 1;
> master->flags = SPI_MASTER_HALF_DUPLEX;
> - master->bus_num = -1;
> master->setup = falcon_sflash_setup;
> master->prepare_transfer_hardware = falcon_sflash_prepare_xfer;
> master->transfer_one_message = falcon_sflash_xfer_one;
> diff --git a/drivers/spi/spi-octeon.c b/drivers/spi/spi-octeon.c
> index cf88974..a4805f2 100644
> --- a/drivers/spi/spi-octeon.c
> +++ b/drivers/spi/spi-octeon.c
> @@ -257,8 +257,6 @@ static int octeon_spi_probe(struct platform_device *pdev)
> p->register_base = (u64)devm_ioremap(&pdev->dev, res_mem->start,
> resource_size(res_mem));
>
> - /* Dynamic bus numbering */
> - master->bus_num = -1;
> master->num_chipselect = 4;
> master->mode_bits = SPI_CPHA |
> SPI_CPOL |
> diff --git a/drivers/spi/spi-sh-hspi.c b/drivers/spi/spi-sh-hspi.c
> index 82d2f92..755d7cc 100644
> --- a/drivers/spi/spi-sh-hspi.c
> +++ b/drivers/spi/spi-sh-hspi.c
> @@ -298,7 +298,6 @@ static int hspi_probe(struct platform_device *pdev)
>
> pm_runtime_enable(&pdev->dev);
>
> - master->num_chipselect = 1;
> master->bus_num = pdev->id;
> master->setup = hspi_setup;
> master->cleanup = hspi_cleanup;
> diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c
> index 3d10ece..4006495 100644
> --- a/drivers/spi/spi-tegra114.c
> +++ b/drivers/spi/spi-tegra114.c
> @@ -1042,7 +1042,6 @@ static int tegra_spi_probe(struct platform_device *pdev)
> master->setup = tegra_spi_setup;
> master->transfer_one_message = tegra_spi_transfer_one_message;
> master->num_chipselect = MAX_CHIP_SELECT;
> - master->bus_num = -1;
> master->auto_runtime_pm = true;
>
> tspi->master = master;
> diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c
> index 5db73c0..47869ea 100644
> --- a/drivers/spi/spi-tegra20-sflash.c
> +++ b/drivers/spi/spi-tegra20-sflash.c
> @@ -450,7 +450,6 @@ static int tegra_sflash_probe(struct platform_device *pdev)
> master->transfer_one_message = tegra_sflash_transfer_one_message;
> master->auto_runtime_pm = true;
> master->num_chipselect = MAX_CHIP_SELECT;
> - master->bus_num = -1;
>
> platform_set_drvdata(pdev, master);
> tsd = spi_master_get_devdata(master);
> diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
> index 8e21651..e3c1b93 100644
> --- a/drivers/spi/spi-tegra20-slink.c
> +++ b/drivers/spi/spi-tegra20-slink.c
> @@ -1038,7 +1038,6 @@ static int tegra_slink_probe(struct platform_device *pdev)
> master->unprepare_message = tegra_slink_unprepare_message;
> master->auto_runtime_pm = true;
> master->num_chipselect = MAX_CHIP_SELECT;
> - master->bus_num = -1;
>
> platform_set_drvdata(pdev, master);
> tspi = spi_master_get_devdata(master);
> diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
> index 7eb2cef..49ddfc7 100644
> --- a/drivers/spi/spi-ti-qspi.c
> +++ b/drivers/spi/spi-ti-qspi.c
> @@ -429,7 +429,6 @@ static int ti_qspi_probe(struct platform_device *pdev)
>
> master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_RX_DUAL | SPI_RX_QUAD;
>
> - master->bus_num = -1;
> master->flags = SPI_MASTER_HALF_DUPLEX;
> master->setup = ti_qspi_setup;
> master->auto_runtime_pm = true;
> --
> 1.8.1.2
>
>
>
>
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] spi: Remove explictly set bus_num and num_chipselect to default setting
@ 2014-02-11 14:10 Axel Lin
2014-02-11 15:21 ` Uwe Kleine-König
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Axel Lin @ 2014-02-11 14:10 UTC (permalink / raw)
To: Mark Brown
Cc: Chris Boot, Uwe Kleine-König, Thomas Langer, David Daney,
Kuninori Morimoto, Laxman Dewangan, Stephen Warren,
Sourav Poddar, linux-spi-u79uwXL29TY76Z2rM5mHXA
The purpose of commit 1e8a52e18cfb
"spi: By default setup spi_masters with 1 chipselect and dynamics bus number"
is to avoid setting default value for bus_num and num_chipselect in spi master
drivers. So let's remove the duplicate code.
Cc: Chris Boot <bootc-1Slo4GeK4H1eoWH0uzbU5w@public.gmane.org>
Cc: Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Thomas Langer <thomas.langer-th3ZBGNqt+7QT0dZR+AlfA@public.gmane.org>
Cc: David Daney <david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
Cc: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Sourav Poddar <sourav.poddar-l0cyMroinI0@public.gmane.org>
Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
drivers/spi/spi-bcm2835.c | 1 -
drivers/spi/spi-efm32.c | 4 ----
drivers/spi/spi-falcon.c | 2 --
drivers/spi/spi-octeon.c | 2 --
drivers/spi/spi-sh-hspi.c | 1 -
drivers/spi/spi-tegra114.c | 1 -
drivers/spi/spi-tegra20-sflash.c | 1 -
drivers/spi/spi-tegra20-slink.c | 1 -
drivers/spi/spi-ti-qspi.c | 1 -
9 files changed, 14 deletions(-)
diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c
index 8a89dd1..6916745 100644
--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -315,7 +315,6 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
master->mode_bits = BCM2835_SPI_MODE_BITS;
master->bits_per_word_mask = SPI_BPW_MASK(8);
- master->bus_num = -1;
master->num_chipselect = 3;
master->transfer_one_message = bcm2835_spi_transfer_one;
master->dev.of_node = pdev->dev.of_node;
diff --git a/drivers/spi/spi-efm32.c b/drivers/spi/spi-efm32.c
index 03cbb5e..f53bbea 100644
--- a/drivers/spi/spi-efm32.c
+++ b/drivers/spi/spi-efm32.c
@@ -308,10 +308,6 @@ static int efm32_spi_probe_dt(struct platform_device *pdev,
}
ddata->pdata.location = location;
-
- /* spi core takes care about the bus number using an alias */
- master->bus_num = -1;
-
return 0;
}
diff --git a/drivers/spi/spi-falcon.c b/drivers/spi/spi-falcon.c
index 0ae7f45..09965f0 100644
--- a/drivers/spi/spi-falcon.c
+++ b/drivers/spi/spi-falcon.c
@@ -419,9 +419,7 @@ static int falcon_sflash_probe(struct platform_device *pdev)
priv->master = master;
master->mode_bits = SPI_MODE_3;
- master->num_chipselect = 1;
master->flags = SPI_MASTER_HALF_DUPLEX;
- master->bus_num = -1;
master->setup = falcon_sflash_setup;
master->prepare_transfer_hardware = falcon_sflash_prepare_xfer;
master->transfer_one_message = falcon_sflash_xfer_one;
diff --git a/drivers/spi/spi-octeon.c b/drivers/spi/spi-octeon.c
index cf88974..a4805f2 100644
--- a/drivers/spi/spi-octeon.c
+++ b/drivers/spi/spi-octeon.c
@@ -257,8 +257,6 @@ static int octeon_spi_probe(struct platform_device *pdev)
p->register_base = (u64)devm_ioremap(&pdev->dev, res_mem->start,
resource_size(res_mem));
- /* Dynamic bus numbering */
- master->bus_num = -1;
master->num_chipselect = 4;
master->mode_bits = SPI_CPHA |
SPI_CPOL |
diff --git a/drivers/spi/spi-sh-hspi.c b/drivers/spi/spi-sh-hspi.c
index 82d2f92..755d7cc 100644
--- a/drivers/spi/spi-sh-hspi.c
+++ b/drivers/spi/spi-sh-hspi.c
@@ -298,7 +298,6 @@ static int hspi_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
- master->num_chipselect = 1;
master->bus_num = pdev->id;
master->setup = hspi_setup;
master->cleanup = hspi_cleanup;
diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c
index 3d10ece..4006495 100644
--- a/drivers/spi/spi-tegra114.c
+++ b/drivers/spi/spi-tegra114.c
@@ -1042,7 +1042,6 @@ static int tegra_spi_probe(struct platform_device *pdev)
master->setup = tegra_spi_setup;
master->transfer_one_message = tegra_spi_transfer_one_message;
master->num_chipselect = MAX_CHIP_SELECT;
- master->bus_num = -1;
master->auto_runtime_pm = true;
tspi->master = master;
diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c
index 5db73c0..47869ea 100644
--- a/drivers/spi/spi-tegra20-sflash.c
+++ b/drivers/spi/spi-tegra20-sflash.c
@@ -450,7 +450,6 @@ static int tegra_sflash_probe(struct platform_device *pdev)
master->transfer_one_message = tegra_sflash_transfer_one_message;
master->auto_runtime_pm = true;
master->num_chipselect = MAX_CHIP_SELECT;
- master->bus_num = -1;
platform_set_drvdata(pdev, master);
tsd = spi_master_get_devdata(master);
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index 8e21651..e3c1b93 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -1038,7 +1038,6 @@ static int tegra_slink_probe(struct platform_device *pdev)
master->unprepare_message = tegra_slink_unprepare_message;
master->auto_runtime_pm = true;
master->num_chipselect = MAX_CHIP_SELECT;
- master->bus_num = -1;
platform_set_drvdata(pdev, master);
tspi = spi_master_get_devdata(master);
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 7eb2cef..49ddfc7 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -429,7 +429,6 @@ static int ti_qspi_probe(struct platform_device *pdev)
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_RX_DUAL | SPI_RX_QUAD;
- master->bus_num = -1;
master->flags = SPI_MASTER_HALF_DUPLEX;
master->setup = ti_qspi_setup;
master->auto_runtime_pm = true;
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-16 1:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <~B52fa2f760000.52fb9e020000.000d.mml.120010381@phoenix>
2014-02-12 16:21 ` [PATCH] spi: Remove explictly set bus_num and num_chipselect to default setting Stephen Warren
2014-02-11 14:10 Axel Lin
2014-02-11 15:21 ` Uwe Kleine-König
2014-02-11 18:28 ` David Daney
2014-02-16 1:51 ` Mark Brown
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.