linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi/fsl-espi: Add missing cell-index OF property
@ 2018-06-19 16:23 Joakim Tjernlund
  2018-06-19 16:29 ` York Sun
  0 siblings, 1 reply; 3+ messages in thread
From: Joakim Tjernlund @ 2018-06-19 16:23 UTC (permalink / raw)
  To: York Sun, linuxppc-dev

espi does not look for a OF cell-index property which
makes the bus numbering dynamic only. This add an
optional cell-index.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
---
 drivers/spi/spi-fsl-espi.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c
index 1d332e23f6ed..56b71c5e2f10 100644
--- a/drivers/spi/spi-fsl-espi.c
+++ b/drivers/spi/spi-fsl-espi.c
@@ -672,6 +672,14 @@ static int fsl_espi_probe(struct device *dev, struct resource *mem,
 
 	dev_set_drvdata(dev, master);
 
+	if (dev->of_node) {
+		u32 cell_index;
+
+		if (!of_property_read_u32(dev->of_node, "cell-index",
+					  &cell_index))
+			master->bus_num = cell_index;
+	}
+
 	master->mode_bits = SPI_RX_DUAL | SPI_CPOL | SPI_CPHA | SPI_CS_HIGH |
 			    SPI_LSB_FIRST | SPI_LOOP;
 	master->dev.of_node = dev->of_node;
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] spi/fsl-espi: Add missing cell-index OF property
  2018-06-19 16:23 [PATCH] spi/fsl-espi: Add missing cell-index OF property Joakim Tjernlund
@ 2018-06-19 16:29 ` York Sun
  2018-06-20 10:36   ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: York Sun @ 2018-06-19 16:29 UTC (permalink / raw)
  To: jocke@infinera.com, linuxppc-dev, broonie

Joakim,=0A=
=0A=
I am not the maintainer for this driver. Adding Mark Brown.=0A=
=0A=
York=0A=
=0A=
On 06/19/2018 09:23 AM, Joakim Tjernlund wrote:=0A=
> espi does not look for a OF cell-index property which=0A=
> makes the bus numbering dynamic only. This add an=0A=
> optional cell-index.=0A=
> =0A=
> Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>=0A=
> ---=0A=
>  drivers/spi/spi-fsl-espi.c | 8 ++++++++=0A=
>  1 file changed, 8 insertions(+)=0A=
> =0A=
> diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c=0A=
> index 1d332e23f6ed..56b71c5e2f10 100644=0A=
> --- a/drivers/spi/spi-fsl-espi.c=0A=
> +++ b/drivers/spi/spi-fsl-espi.c=0A=
> @@ -672,6 +672,14 @@ static int fsl_espi_probe(struct device *dev, struct=
 resource *mem,=0A=
>  =0A=
>  	dev_set_drvdata(dev, master);=0A=
>  =0A=
> +	if (dev->of_node) {=0A=
> +		u32 cell_index;=0A=
> +=0A=
> +		if (!of_property_read_u32(dev->of_node, "cell-index",=0A=
> +					  &cell_index))=0A=
> +			master->bus_num =3D cell_index;=0A=
> +	}=0A=
> +=0A=
>  	master->mode_bits =3D SPI_RX_DUAL | SPI_CPOL | SPI_CPHA | SPI_CS_HIGH |=
=0A=
>  			    SPI_LSB_FIRST | SPI_LOOP;=0A=
>  	master->dev.of_node =3D dev->of_node;=0A=
> =0A=
=0A=

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] spi/fsl-espi: Add missing cell-index OF property
  2018-06-19 16:29 ` York Sun
@ 2018-06-20 10:36   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2018-06-20 10:36 UTC (permalink / raw)
  To: York Sun; +Cc: jocke@infinera.com, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

On Tue, Jun 19, 2018 at 04:29:35PM +0000, York Sun wrote:
> Joakim,
> 
> I am not the maintainer for this driver. Adding Mark Brown.
> 
> York
> 
> On 06/19/2018 09:23 AM, Joakim Tjernlund wrote:
> > espi does not look for a OF cell-index property which
> > makes the bus numbering dynamic only. This add an

As documented in SubmittingPatches please send patches to the 
maintainers for the code you would like to change.  The normal kernel
workflow is that people apply patches from their inboxes, if they aren't
copied they are likely to not see the patch at all and it is much more
difficult to apply patches.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-20 10:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-19 16:23 [PATCH] spi/fsl-espi: Add missing cell-index OF property Joakim Tjernlund
2018-06-19 16:29 ` York Sun
2018-06-20 10:36   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).